From b9ea238dd7e8a56b1d171cdc76e405bb2a8584dd Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 21 Feb 2018 12:18:32 +0000 Subject: Improve i3 status --- i3/.config/i3blocks/bin/updates | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 i3/.config/i3blocks/bin/updates (limited to 'i3/.config/i3blocks/bin/updates') diff --git a/i3/.config/i3blocks/bin/updates b/i3/.config/i3blocks/bin/updates new file mode 100755 index 0000000..325b485 --- /dev/null +++ b/i3/.config/i3blocks/bin/updates @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +if command -v checkupdates > /dev/null; then + n_updates=$(checkupdates | wc -l) + if [[ n_updates -gt 50 ]]; then + color='red' + elif [[ n_updates -gt 10 ]]; then + color='yellow' + else + color='gray' + fi + echo " $n_updates" +fi -- cgit v1.2.3