dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit b107e7126157002895ddb62edc8d2e08d781bda8
parent bb24563287a296809789750763955066b955b676
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sat, 12 Jan 2019 12:30:36 +0100

Add news status in statusbar

Diffstat:
Mlinks/.config/i3/i3blocks | 5+++++
Mlinks/.config/i3/i3scripts/i3news | 6+++---
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/links/.config/i3/i3blocks b/links/.config/i3/i3blocks @@ -40,6 +40,11 @@ label= interval=10 signal=2 +[i3news] +label= +interval=120 +signal=17 + [i3layout] interval=once signal=3 diff --git a/links/.config/i3/i3scripts/i3news b/links/.config/i3/i3scripts/i3news @@ -5,8 +5,8 @@ # When clicked, brings up `newsboat`. case $BLOCK_BUTTON in - 1) setsid "$TERMINAL" -e newsboat ;; - 2) setsid newsup >/dev/null ;; + 1) setsid st -e newsboat ;; + 2) setsid newsup >/dev/null & exit ;; 3) pgrep -x dunst >/dev/null && notify-send "<b>📰 News module:</b> - Shows unread news items - Shows 🔃 if updating with \`newsup\` @@ -15,4 +15,4 @@ case $BLOCK_BUTTON in <b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;; esac -echo "$(newsboat -x print-unread | awk '{ print $1}' | sed s/^0$//g)$(cat ~/.config/newsboat/.update 2>/dev/null)" +cat ~/.config/newsboat/.update 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ print $1}' | sed s/^0$//g)$(cat ~/.config/newsboat/.update 2>/dev/null)"