diff --git a/dotfiles/polybar.org b/dotfiles/polybar.org index 991e34a..6f1b5cf 100644 --- a/dotfiles/polybar.org +++ b/dotfiles/polybar.org @@ -439,11 +439,12 @@ :header-args+: :shebang "#!/usr/bin/env bash" :END: #+begin_src bash - if pgrep -x "newsboat" >/dev/null; then - dunstify --replace=38492 "Newsboat " "Already running"; - else - dunstify --replace=38492 "Newsboat " "Reloading..."; + dunstify --replace=38492 "Newsboat " "Reloading..."; + if pgrep -x "newsboat" >/dev/null; then + # If newsboat is already running, try to refresh in the tmux session + tmux send-keys -t newsboat R + else newsboat -x reload && / news_nb=`newsboat -x print-unread | cut -d " " -f1` && \ dunstify --replace=38492 "Newsboat " "$news_nb Unread News";