1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Add @DomWillams0's update script (thanks pal)

Source: https://github.com/DomWilliams0/dotfiles/blob/master/i3blocks/blocks/updates
This commit is contained in:
Joe Groocock 2016-04-01 18:04:44 +01:00
parent 4c35a60d23
commit f17fa4416a
2 changed files with 19 additions and 0 deletions

13
.config/i3blocks/blocks/updates Executable file
View File

@ -0,0 +1,13 @@
#!/bin/python2
import commands
import os
button = os.environ.get('BLOCK_BUTTON')
if button == '1':
os.system("i3-sensible-terminal -e 'pacaur -Syu'")
updates = commands.getstatusoutput("/usr/bin/checkupdates | wc -l")[1]
if updates and updates != '0':
print updates
print updates

View File

@ -64,6 +64,12 @@ interval=30
[separator] [separator]
[updates]
label=
interval=600
[separator]
[cpu_usage] [cpu_usage]
label= label=
interval=5 interval=5