Add updates block to i3 bar

master
Jonathan Hodgson 7 years ago
parent 19906d627e
commit cbc0c7b4c4
  1. 19
      i3/blocks/pacmanUpdates
  2. 7
      i3/i3blocks.conf

@ -0,0 +1,19 @@
#!/usr/bin/sh
if ! command -v checkupdates > /dev/null; then
echo "You need to install checkupdates";
echo "";
echo "#FF0000"
else
count=$(checkupdates | wc -l)
if [ "$count" = "0" ]; then
count=""
fi
echo $count
echo $count
if [ "$count" -gt "5" ]; then
echo "#FFOOOO"
else
echo "#FF8000"
fi
fi

@ -157,9 +157,14 @@ interval=5
[archNews] [archNews]
command=~/.dotfiles/i3/blocks/archNews command=~/.dotfiles/i3/blocks/archNews
interval=3600 interval=120
color=#FF0000 color=#FF0000
[updates]
command=~/.dotfiles/i3/blocks/pacmanUpdates
label=Updates:
interval=120
# Date Time # Date Time
# #
[time] [time]

Loading…
Cancel
Save