From b069ca66de4f3b7adc98a984712f3d9ece9ccc1f Mon Sep 17 00:00:00 2001 From: Harzo Date: Sat, 27 May 2023 22:22:18 +0200 Subject: [PATCH] checkupdates: Hide when no updates Simply returning empty echo for 0 new packages. --- .config/waybar/scripts/checkupdates | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/waybar/scripts/checkupdates b/.config/waybar/scripts/checkupdates index 6b963ed..82cbb37 100755 --- a/.config/waybar/scripts/checkupdates +++ b/.config/waybar/scripts/checkupdates @@ -29,4 +29,6 @@ elif [ "$count" -gt 10 ]; then class="warning" fi +[ "$class" = "ok" ] && echo && exit + echo '{"text": "'$count'", "tooltip": "Updates pending: '$count'", "class": "'$class'"}'