Add pacman updates module to polybar

This commit is contained in:
2017-11-18 16:30:44 +00:00
parent 21866c38a5
commit 76a05e6d84
2 changed files with 14 additions and 1 deletions

View File

@@ -68,7 +68,7 @@ module-margin = 4
font-0 = fixed:pixelsize=10;2
font-1 = FontAwesome:pixelsize=10;2
modules-left = i3 bitcoin
modules-left = i3 pacman bitcoin
modules-right = filesystem
[module/bspwm]
@@ -259,3 +259,11 @@ bar-used-foreground-4 = ${colors.ramp-4}
bar-used-foreground-5 = ${colors.ramp-5}
bar-used-foreground-6 = ${colors.ramp-6}
bar-used-foreground-7 = ${colors.ramp-7}
[module/pacman]
type = custom/script
interval = 1800
format = <label>
label = "%output:0:30%"
exec = ~/.dotfiles/polybar/scripts/pacman.sh

5
polybar/scripts/pacman.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
pac=$(checkupdates 2> /dev/null | wc -l)
aur=$(cower -u 2> /dev/null | wc -l)
echo "$pac$aur"