sway: Add extraKeybinds option

This commit is contained in:
Erwin Boskma 2023-10-10 09:55:04 +02:00
parent 3c12099de6
commit 7e86becbb2
Signed by: erwin
SSH key fingerprint: SHA256:9LmFDe1C6jSrEyqxxvX8NtJBmcbB105XoqyUZF092bg
2 changed files with 13 additions and 2 deletions

View file

@ -63,6 +63,12 @@ in
});
default = [ ];
};
extraKeybindings = mkOption {
description = "Extra keybindings";
type = types.attrsOf types.str;
default = { };
};
};
config = mkIf cfg.enable {
@ -236,7 +242,8 @@ in
"${mod}+d" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel --skip-wait";
"${mod}+Shift+d" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait";
};
} // cfg.extraKeybindings;
modes = {
passthrough = {

View file

@ -172,9 +172,13 @@ in
};
startup = [
{ command = "${ewwDaemon} --restart open bar-work"; always = true; }
{ command = "${pkgs.wayvnc}/bin/wayvnc -g 0.0.0.0"; always = true; }
{ command = "${pkgs.wayvnc}/bin/wayvnc 0.0.0.0"; always = true; }
];
workspaceOutputs = workspacePartition;
extraKeybindings = {
"Ctrl+Alt+1" = "exec ${pkgs.wayvnc}/bin/wayvncctl output-set DP-1";
"Ctrl+Alt+2" = "exec ${pkgs.wayvnc}/bin/wayvncctl output-set DP-3";
};
};
swaynotificationcenter.enable = true;
tmux.enable = true;