waybar: extract _sway_idle_toggle script
This commit is contained in:
		
							parent
							
								
									8d980ed634
								
							
						
					
					
						commit
						517086541e
					
				
					 4 changed files with 14 additions and 10 deletions
				
			
		
							
								
								
									
										11
									
								
								scripts/_sway_idle_toggle
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								scripts/_sway_idle_toggle
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
swayidlectl() {
 | 
			
		||||
  systemctl --user $1 swayidle.service
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if swayidlectl status > /dev/null; then
 | 
			
		||||
    swayidlectl stop
 | 
			
		||||
else
 | 
			
		||||
    swayidlectl start
 | 
			
		||||
fi
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue