15
									
								
								nix/base.nix
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								nix/base.nix
									
									
									
									
									
								
							@@ -69,4 +69,19 @@ startup = do
 | 
			
		||||
    };
 | 
			
		||||
    wantedBy = [ "sysinit.target" ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  systemd.user.services."xrandr" = {
 | 
			
		||||
    script = "${pkgs.xorg.xrandr}/bin/xrandr --output Virtual-1 --mode $(${pkgs.xorg.xrandr}/bin/xrandr | grep '   ' | head -n 2 | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $1 }')";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  systemd.user.timers."xrandr" = {
 | 
			
		||||
    description = "Auto update resolution crutch";
 | 
			
		||||
    timerConfig = {
 | 
			
		||||
      OnBootSec = "1s";
 | 
			
		||||
      OnUnitInactiveSec = "1s";
 | 
			
		||||
      Unit = "xrandr.service";
 | 
			
		||||
      AccuracySec = "1us";
 | 
			
		||||
    };
 | 
			
		||||
    wantedBy = ["timers.target"];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user