screen now turns off when i3lock is called and the system is not suspended. also added background image restoring.
Not setting bg image setting, so that bg image can be different on different machines. Use feh to set background.
This commit is contained in:
		
							parent
							
								
									214ffb5bc1
								
							
						
					
					
						commit
						6fca9f7de2
					
				
					 3 changed files with 30 additions and 5 deletions
				
			
		
							
								
								
									
										19
									
								
								scripts/screen_off
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										19
									
								
								scripts/screen_off
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,19 @@
 | 
			
		|||
#! /bin/bash
 | 
			
		||||
 | 
			
		||||
#warning! $locker MUST NOT FORK! It must wait to exit until after the screen has been unlocked. 
 | 
			
		||||
 | 
			
		||||
#arguments
 | 
			
		||||
 | 
			
		||||
locker=$@
 | 
			
		||||
 | 
			
		||||
#make sure we set screen back to defaults if we force close the script
 | 
			
		||||
cleanup() {
 | 
			
		||||
	xset dpms 0 0 60 #&& echo "cleaned up!"
 | 
			
		||||
	exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
trap "cleanup" EXIT
 | 
			
		||||
 | 
			
		||||
#runs the locker, than makes the screen time out after 1 sec of inactivity
 | 
			
		||||
xset dpms 0 0 1
 | 
			
		||||
$locker
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue