Move swayidle script
This commit is contained in:
		
							parent
							
								
									523a4be565
								
							
						
					
					
						commit
						0e622c6aba
					
				
					 2 changed files with 18 additions and 3 deletions
				
			
		
							
								
								
									
										6
									
								
								arch/stow/_scripts/.scripts/wlsunset.sh
									
										
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										6
									
								
								arch/stow/_scripts/.scripts/wlsunset.sh
									
										
									
									
									
										
										
										Executable file → Normal file
									
								
							|  | @ -6,10 +6,10 @@ pid=$(pgrep wlsunset) | ||||||
| 
 | 
 | ||||||
| if [[ -z ${pid} ]] ; then  | if [[ -z ${pid} ]] ; then  | ||||||
|         # Start wlsunset right away. |         # Start wlsunset right away. | ||||||
|         wlsunset -l 50 -L 4 -t 2500 & |         wlsunset -l 50.50 -L 4.00 -t 3000 -T 6500 & | ||||||
| else | else | ||||||
|         # Currently stop wlsunset but restart in an hour.  |         # Currently stop wlsunset but restart in an hour.  | ||||||
|         kill ${pid} |         kill ${pid} | ||||||
|         ~/.scripts/notify.sh 'Stopping sunset' 'Restarting in an hour' |         notify-send 'Stopping sunset' 'Restarting in an hour' | ||||||
|         at now +1 hours -f ~/.scripts/wlsunset.sh |         at now +1 hours -f "${0}" | ||||||
| fi | fi | ||||||
|  |  | ||||||
							
								
								
									
										15
									
								
								scripts/sunset.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								scripts/sunset.sh
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,15 @@ | ||||||
|  | #!/usr/bin/env bash | ||||||
|  | # Script to disable for an hour or immediately continue wlsunset. 'Toggle' | ||||||
|  | 
 | ||||||
|  | # Check if wlsunset is still running | ||||||
|  | pid=$(pgrep wlsunset) | ||||||
|  | 
 | ||||||
|  | if [[ -z ${pid} ]] ; then  | ||||||
|  |         # Start wlsunset right away. | ||||||
|  |         wlsunset -l 50.50 -L 4.00 -t 3000 -T 6500 & | ||||||
|  | else | ||||||
|  |         # Currently stop wlsunset but restart in an hour.  | ||||||
|  |         kill ${pid} | ||||||
|  |         notify-send 'Stopping sunset' 'Restarting in an hour' | ||||||
|  |         at now +1 hours -f "${0}" | ||||||
|  | fi | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue