mirror of
				https://github.com/frebib/dotfiles.git
				synced 2024-06-14 12:57:23 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			313 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			313 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/python2
 | |
| 
 | |
| import commands
 | |
| import os
 | |
| 
 | |
| button = os.environ.get('BLOCK_BUTTON')
 | |
| if button == '1':
 | |
|   os.system("i3-sensible-terminal -r i3blocks-update-term -e 'pacaur -Syu'")
 | |
| 
 | |
| updates = commands.getstatusoutput("/usr/bin/checkupdates | wc -l")[1]
 | |
| if updates and updates != '0':
 | |
|   print updates
 | |
|   print updates
 |