diff --git a/home/.local/bin/scripts/gui/gh-notification b/home/.local/bin/scripts/gui/gh-notification index 1f47f51..2a43520 100755 --- a/home/.local/bin/scripts/gui/gh-notification +++ b/home/.local/bin/scripts/gui/gh-notification @@ -190,6 +190,12 @@ send_notify() { # Request unread notifications with gh-notify extension for github-cli [ "$ALL" -eq 1 ] && out="$(gh notify -s -a -n "$MAX_AMOUNT")" || out="$(gh notify -s -n "$MAX_AMOUNT")" +# When no notifications were found, set output to empty string, to avoid 'All caught up!' line +# being treated as notification +if [ "$out" == "All caught up!" ]; then + out="" +fi + total="$(printf "%s\n" "$out" | wc -l)" # Since we always end with a newline (to count the last entry as a line), we always get # at least 1 as a total here, even if $out is empty. If we didn't use the \n, we'd always