config for swayidle and swaylock
This commit is contained in:
		
							parent
							
								
									059666fb3b
								
							
						
					
					
						commit
						ab3aee54ac
					
				@ -46,6 +46,7 @@
 | 
			
		||||
    systemPackages = with pkgs; [
 | 
			
		||||
      xdg-desktop-portal-wlr
 | 
			
		||||
      swaylock
 | 
			
		||||
      swayidle
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -117,7 +117,9 @@
 | 
			
		||||
  };
 | 
			
		||||
  programs.swaylock.settings = {
 | 
			
		||||
    color = "000000";
 | 
			
		||||
    image = "$HOME/.config/wall"; 
 | 
			
		||||
    image = "$HOME/.config/lockwall"; 
 | 
			
		||||
    indicator-caps-lock = true;
 | 
			
		||||
    show-keyboard-layout = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  services.swayidle = {
 | 
			
		||||
@ -125,11 +127,11 @@
 | 
			
		||||
    events = [
 | 
			
		||||
      { event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; }
 | 
			
		||||
      { 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 = [
 | 
			
		||||
      { 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"; }
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user