Reload news while newsboat is runing
This commit is contained in:
parent
9bc5053e68
commit
21298dd73d
@ -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 " "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 && /
|
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