72 lines
2.5 KiB
Nix
72 lines
2.5 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
inputs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
options = {
|
|
desktop.window-managers = {
|
|
sway = {
|
|
};
|
|
};
|
|
|
|
};
|
|
config = lib.mkIf osConfig.desktop.window-managers.sway.enable {
|
|
wayland.windowManager.sway = {
|
|
enable = true;
|
|
package = pkgs.swayfx;
|
|
config = {
|
|
modifier = "Mod4";
|
|
startup = [
|
|
{ command = "elephant"; }
|
|
];
|
|
keybindings =
|
|
let
|
|
modifier = config.wayland.windowManager.sway.config.modifier;
|
|
in
|
|
{
|
|
"${modifier}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}";
|
|
"${modifier}+Shift+q" = "kill";
|
|
"${modifier}+d" = "exec walker";
|
|
"${modifier}+o" = "exec zen";
|
|
"${modifier}+Control+right" = "exec /home/marty/.config/sway/scripts/workspaceswitcher right";
|
|
"${modifier}+Control+left" = "exec /home/marty/.config/sway/scripts/workspaceswitcher left";
|
|
"${modifier}+f" = "fullscreen";
|
|
|
|
"${modifier}+1" = "workspace number 1";
|
|
"${modifier}+2" = "workspace number 2";
|
|
"${modifier}+3" = "workspace number 3";
|
|
"${modifier}+4" = "workspace number 4";
|
|
"${modifier}+5" = "workspace number 5";
|
|
"${modifier}+6" = "workspace number 6";
|
|
"${modifier}+7" = "workspace number 7";
|
|
"${modifier}+8" = "workspace number 8";
|
|
"${modifier}+9" = "workspace number 9";
|
|
"${modifier}+s" = "workspace number 0";
|
|
|
|
"${modifier}+Shift+1" = "move container to workspace number 1";
|
|
"${modifier}+Shift+2" = "move container to workspace number 2";
|
|
"${modifier}+Shift+3" = "move container to workspace number 3";
|
|
"${modifier}+Shift+4" = "move container to workspace number 4";
|
|
"${modifier}+Shift+5" = "move container to workspace number 5";
|
|
"${modifier}+Shift+6" = "move container to workspace number 6";
|
|
"${modifier}+Shift+7" = "move container to workspace number 7";
|
|
"${modifier}+Shift+8" = "move container to workspace number 8";
|
|
"${modifier}+Shift+9" = "move container to workspace number 9";
|
|
"${modifier}+Shift+s" = "move container to workspace number 0";
|
|
};
|
|
input = {
|
|
"*" = {
|
|
xkb_layout = builtins.substring 0 2 osConfig.system.locale;
|
|
};
|
|
};
|
|
defaultWorkspace = "workspace number 1";
|
|
terminal = osConfig.desktop.defaults.terminal.binary;
|
|
};
|
|
checkConfig = false;
|
|
};
|
|
};
|
|
}
|