Created
February 17, 2018 16:47
-
-
Save NicolaSmaniotto/9bb98b04c0a9e5951a3ed7fc303f878e to your computer and use it in GitHub Desktop.
Available updates polybar module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[module/updates] | |
type = custom/script | |
interval = 10 | |
format = <label> | |
format-prefix = " " | |
format-foreground = ${colors.color0} | |
format-background = ${colors.color4} | |
exec = cat updates.txt | wc -l | |
click-left = notify-send "$(if [ $(cat updates.txt | wc -l) != 0 ]; then echo 'Available updates ('$(cat updates.txt | wc -l)'):'; else echo 'Everything up to date!'; fi)" "$(cat updates.txt | egrep -o '^[^\ ]+')" | |
click-right = urxvt -e zsh -c "sleep 0.2s; i3-msg floating enabled; clear; pacaur -Syu; checkupdates > updates.txt" & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment