sway: Add screenlocker

This commit is contained in:
PapaTutuWawa 2021-10-22 22:50:57 +02:00
parent 8b0c4cb43d
commit 0ac64e0949

View File

@ -27,6 +27,8 @@ let
makoWrapper = mkWrapperScript "${pkgs.mako}/bin/mako" "--default-timeout=3000"; makoWrapper = mkWrapperScript "${pkgs.mako}/bin/mako" "--default-timeout=3000";
waybarWrapper = mkWrapperScript "${pkgs.waybar}/bin/waybar" ""; waybarWrapper = mkWrapperScript "${pkgs.waybar}/bin/waybar" "";
kanshiWrapper = mkWrapperScript "${pkgs.kanshi}/bin/kanshi" ""; kanshiWrapper = mkWrapperScript "${pkgs.kanshi}/bin/kanshi" "";
# TODO: Fuse this with kanshi
swayIdleWrapper = mkWrapperScript "${pkgs.swayidle}/bin/swayidle" "-w before-sleep '${pkgs.swaylock}/bin/swaylock -f --image $(find ~/Data/Wallpaper/horizontal/ -maxdepth 1 -type f | shuf -n 1)'";
in { in {
home-manager.users."${config.system.singleUser}" = { home-manager.users."${config.system.singleUser}" = {
wayland.windowManager.sway = { wayland.windowManager.sway = {
@ -38,6 +40,7 @@ in {
{ command = "${waybarWrapper}"; always = true; } { command = "${waybarWrapper}"; always = true; }
{ command = "${kanshiWrapper}"; always = true; } { command = "${kanshiWrapper}"; always = true; }
{ command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; always = true; } { command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; always = true; }
{ command = "${swayIdleWrapper}"; always = true; }
]; ];
modifier = "${modifier}"; modifier = "${modifier}";
gaps = { gaps = {