config for swayidle and swaylock

This commit is contained in:
Kabbone 2022-10-15 18:13:39 +02:00
parent 059666fb3b
commit ab3aee54ac
2 changed files with 6 additions and 3 deletions

View File

@ -46,6 +46,7 @@
systemPackages = with pkgs; [ systemPackages = with pkgs; [
xdg-desktop-portal-wlr xdg-desktop-portal-wlr
swaylock swaylock
swayidle
]; ];
}; };

View File

@ -117,7 +117,9 @@
}; };
programs.swaylock.settings = { programs.swaylock.settings = {
color = "000000"; color = "000000";
image = "$HOME/.config/wall"; image = "$HOME/.config/lockwall";
indicator-caps-lock = true;
show-keyboard-layout = true;
}; };
services.swayidle = { services.swayidle = {
@ -125,11 +127,11 @@
events = [ events = [
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; } { event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; }
{ event = "lock"; command = "${pkgs.swaylock}/bin/swaylock -fF"; } { event = "lock"; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
{ event = "after-resume"; command = "${pkgs.hyprland}/bin/hyprctl dispatcher dpms on"; } { event = "after-resume"; command = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; }
]; ];
timeouts = [ timeouts = [
{ timeout = 300; command = "${pkgs.swaylock}/bin/swaylock -fF"; } { timeout = 300; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
{ timeout = 600; command = "${pkgs.hyprland}/bin/hyprctl dispatcher dpms off"; } { timeout = 600; command = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; }
]; ];
}; };
} }