Reload news while newsboat is runing
This commit is contained in:
parent
81e512992f
commit
0d979ccb63
@ -439,11 +439,12 @@
|
|||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
:END:
|
:END:
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
if pgrep -x "newsboat" >/dev/null; then
|
dunstify --replace=38492 "Newsboat " "Reloading...";
|
||||||
dunstify --replace=38492 "Newsboat " "Already running";
|
|
||||||
else
|
|
||||||
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 && /
|
newsboat -x reload && /
|
||||||
news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
|
news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
|
||||||
dunstify --replace=38492 "Newsboat " "$news_nb Unread News";
|
dunstify --replace=38492 "Newsboat " "$news_nb Unread News";
|
||||||
|
Loading…
Reference in New Issue
Block a user