diff --git a/modules/programs/sway/default.nix b/modules/programs/sway/default.nix index ba0b365..cda28fb 100644 --- a/modules/programs/sway/default.nix +++ b/modules/programs/sway/default.nix @@ -1,10 +1,17 @@ { config -, lib -, sway, mako +, lib, writeScript +, stdenv +, sway, mako, bemenu }: -{ +let + passwordDmenu = writeShellScript "password_menu" '' + #!${stdenv.shell} + password=$(gopass list --flat | bmenu) + gopass show -c "$password + ''; +in { environment.systemPackages = [ sway ]; home-manager.users."${config.system.singleUser}" = { @@ -38,6 +45,11 @@ "${modifier}+e" = "exec emacs"; "${modifier}+Shift+q" = "kill"; "${modifer}+f" = "exec firefox"; + "${modifier}+d" = "exec ${bemenu}/bin/bemenu-run"; + "${modifier}+p" = "exec ${passwordDmenu}"; + "Mod4+s" = "exec systemctl suspend"; + # TODO: Screenlock + #"Mod4+l" = "exec ..." "F1" = "exec pactl set-sink-volume ${speakers} toggle"; "F2" = "exec pactl set-sink-volume ${speakers} -10%"; "F3" = "exec pactl set-sink-volume ${speakers} +10%";