diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index 1af3117..98f33c2 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -102,8 +102,8 @@ "tooltip": true, "format": "{} ", "interval": 60, - "exec": "checkupdates | wc -l", - "exec-if": "[[ $(checkupdates | wc -l) != 0 ]]", + "exec": "$HOME/.config/waybar/scripts/check_updates.sh", + "exec-if": "[[ `$HOME/.config/waybar/scripts/check_updates.sh` != 0 ]]", "signal": 1 }, diff --git a/.config/waybar/scripts/check_updates.sh b/.config/waybar/scripts/check_updates.sh new file mode 100755 index 0000000..912df7a --- /dev/null +++ b/.config/waybar/scripts/check_updates.sh @@ -0,0 +1,7 @@ +#! /usr/bin/env bash + +main() { + checkupdates | wc -l +} + +main $@