From fb086cb88513ae8fda2b05d276e3a095307d2b3a Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 19 May 2025 10:35:27 +0200 Subject: [PATCH] chore(waybar): add script to check updates --- .config/waybar/config.jsonc | 4 ++-- .config/waybar/scripts/check_updates.sh | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 .config/waybar/scripts/check_updates.sh 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 $@