aboutsummaryrefslogtreecommitdiff
path: root/dot-config/yambar/scripts
diff options
context:
space:
mode:
authorBlake Romero <blake@blkrom.com>2024-12-23 23:18:23 +0000
committerBlake Romero <blake@blkrom.com>2024-12-23 23:18:23 +0000
commitbc140a70f0b7976005fcef3430477310feacd438 (patch)
treeed7cd5b7cb4a69ed6acd5429cd3e80a370d4ec26 /dot-config/yambar/scripts
parent5ee7284e64c7b28a7ac8975f0a48fbb57298610c (diff)
Fix yambar pacman notification when no updates
Diffstat (limited to 'dot-config/yambar/scripts')
-rwxr-xr-xdot-config/yambar/scripts/pacman2
-rwxr-xr-xdot-config/yambar/scripts/pacman-notify2
2 files changed, 2 insertions, 2 deletions
diff --git a/dot-config/yambar/scripts/pacman b/dot-config/yambar/scripts/pacman
index 7015e5b..3899172 100755
--- a/dot-config/yambar/scripts/pacman
+++ b/dot-config/yambar/scripts/pacman
@@ -1,7 +1,7 @@
#!/bin/sh
# Get package count
-count=$(wc -l < ~/.cache/updates)
+count=$(sed '/^$/d' ~/.cache/updates | wc -l)
# Display count
printf "%s\n\n" "count|int|$count"
diff --git a/dot-config/yambar/scripts/pacman-notify b/dot-config/yambar/scripts/pacman-notify
index 9c6a84b..25ff146 100755
--- a/dot-config/yambar/scripts/pacman-notify
+++ b/dot-config/yambar/scripts/pacman-notify
@@ -1,7 +1,7 @@
#!/bin/sh
# Get package count
-count=$(wc -l < ~/.cache/updates)
+count=$(sed '/^$/d' ~/.cache/updates | wc -l)
# Generate message
if [ "$count" = 0 ]; then