commit c199b829eace6651d00f7f7aed42a5b5b4e495f5 parent 64df5aedd59804ec8935867202ac635e857daf7e Author: oscarbenedito <oscar@oscarbenedito.com> Date: Wed, 27 May 2020 10:49:36 +0200 Added apt-get updates to status bar (i3) Diffstat:
A | dot_config/i3blocks/bin/executable_apt-updates | | | 5 | +++++ |
M | dot_config/i3blocks/config | | | 5 | ++++- |
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dot_config/i3blocks/bin/executable_apt-updates b/dot_config/i3blocks/bin/executable_apt-updates @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +sudo apt-get update > /dev/null 2> /dev/null +UPDATES="$(apt-get upgrade -s |grep -P '^\d+ upgraded'|cut -d" " -f1)" +[ "0" != "$UPDATES" ] && echo "<span font='FontAwesome'></span> $UPDATES" diff --git a/dot_config/i3blocks/config b/dot_config/i3blocks/config @@ -5,6 +5,10 @@ markup=pango command=$HOME/.config/i3blocks/bin/disk interval=30 +[updates] +command=$HOME/.config/i3blocks/bin/apt-updates +interval=3600 + [backlight] command=$HOME/.config/i3blocks/bin/backlight interval=once @@ -17,7 +21,6 @@ signal=1 [battery] command=$HOME/.config/i3blocks/bin/battery2 -markup=pango interval=30 [datetime]