modules: add waylock

This commit is contained in:
Dmitriy Pleshevskiy 2024-04-23 12:55:20 +03:00
parent 105d7278dd
commit a8677496d4
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2
2 changed files with 26 additions and 18 deletions

View file

@ -114,48 +114,50 @@ in
"$fileManager" = "vifm";
"$menu" = "dmenu-wl_run";
"$mod" = "ALT_L";
"$m1" = "ALT_L";
"$m4" = "MOD4";
bind = lib.flatten [
# programs
"$mod SHIFT, Return, exec, $terminal"
"$mod SHIFT, B, exec, $browser"
"$mod, p, exec, $menu"
"$m1 SHIFT, Return, exec, $terminal"
"$m1 SHIFT, B, exec, $browser"
"$m1, p, exec, $menu"
# focus
(lib.flip lib.mapAttrsToList { k = "prev"; j = "next"; } (k: d: [
"$mod, ${k}, layoutmsg, cycle${d}"
"$mod SHIFT, ${k}, layoutmsg, swap${d}"
"$m1, ${k}, layoutmsg, cycle${d}"
"$m1 SHIFT, ${k}, layoutmsg, swap${d}"
]))
"$mod, Return, layoutmsg, swapwithmaster, master"
"$mod, s, exec, ${easyfocus}/bin/easyfocus-hyprland"
"$m1, Return, layoutmsg, swapwithmaster, master"
"$m1, s, exec, ${easyfocus}/bin/easyfocus-hyprland"
# comma (,)
"$mod, code:44, layoutmsg, addmaster"
"$m1, code:44, layoutmsg, addmaster"
# period (.)
"$mod, code:46, layoutmsg, removemaster"
"$m1, code:46, layoutmsg, removemaster"
# windows
"MOD4 SHIFT, C, killactive"
"$mod, Space, fullscreen, 0"
"$m4 SHIFT, C, killactive"
"$m1, Space, fullscreen, 0"
# workspaces
(lib.flip map [ 1 2 3 4 5 6 7 8 9 0 ] (i:
let wid = if i == 0 then 10 else i; in
[
# switch warkspaces with mod + [0-9]
"$mod, ${toString i}, workspace, ${toString wid}"
"$m1, ${toString i}, workspace, ${toString wid}"
# move active window to a workspace with mod + shift + [0-9]
"$mod SHIFT, ${toString i}, movetoworkspacesilent, ${toString wid}"
"$m1 SHIFT, ${toString i}, movetoworkspacesilent, ${toString wid}"
]
))
# syste
"MOD4 SHIFT, Q, exit"
# system
"$m4, L, exec, waylock"
"$m4 SHIFT, Q, exit"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$m1, mouse:272, movewindow"
"$m1, mouse:273, resizewindow"
];
input = let kb = config.home.keyboard; in {

View file

@ -15,5 +15,11 @@ in
};
programs.gnupg.agent.pinentryFlavor = "gtk2";
environment.systemPackages = [ pkgs.unstable.waylock ];
security.pam.services.waylock .text = ''
auth required pam_unix.so try_first_pass nullok
auth optional pam_permit.so
'';
};
}