nix/home/wayland/sway.nix
2022-02-27 15:57:58 -05:00

75 lines
2 KiB
Nix

{
pkgs,
config,
...
}: {
# imports = [ ./keybindings.nix ];
wayland.windowManager.sway = {
enable = true;
systemdIntegration = true;
wrapperFeatures.base = true;
wrapperFeatures.gtk = true;
config = {
terminal = "${pkgs.nixgl.nixGLIntel}/bin/nixGLIntel ${pkgs.kitty}/bin/kitty";
menu = "exec ${config.wayland.windowManager.sway.config.terminal} --detach --class=launcher -o initial_window_height=570 -o initial_window_width=460 -o font_size=16 ${pkgs.my-pkgs.sway-launcher-desktop}/bin/sway-launcher-desktop";
modifier = "Mod4";
bars = [
{command = "${pkgs.waybar}/bin/waybar";}
];
focus = {
followMouse = true;
mouseWarping = true;
newWindow = "smart";
};
fonts = {
names = ["FuraMono Nerd Font Mono"];
style = "Regular";
size = 12;
};
gaps = {
inner = 4;
outer = 4;
smartBorders = "on";
smartGaps = true;
};
input = {
"type:keyboard" = {
xkb_options = "caps:escape";
};
"type:mouse" = {
accel_profile = "flat";
};
"type:touchpad" = {
accel_profile = "adaptive";
scroll_factor = "1.5";
tap = "enabled";
};
};
modes = {
resize = {
Escape = "mode default";
Return = "mode default";
Up = "resize shrink height 10 px";
Down = "resize grow height 10 px";
Left = "resize shrink width 10 px";
Right = "resize grow width 10 px";
h = "resize shrink width 10 px";
j = "resize grow height 10 px";
k = "resize shrink height 10 px";
l = "resize grow width 10 px";
};
};
output = {
eDP-1 = {
scale = "1.2";
};
"*" = {
bg = "~/nix/background.png fill";
};
};
startup = [
{command = "${pkgs.dex}/bin/dex -a";}
];
};
};
}