diff options
Diffstat (limited to '.local/bin/statusbar')
| -rwxr-xr-x | .local/bin/statusbar/sb-forecast | 2 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-internet | 4 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-mailbox | 2 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-torrent | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast index 368c17f..d8a16aa 100755 --- a/.local/bin/statusbar/sb-forecast +++ b/.local/bin/statusbar/sb-forecast @@ -7,7 +7,7 @@ url="${WTTRURL:-wttr.in}" weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" # Get a weather report from 'wttr.in' and save it locally. -getforecast() { curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; } +getforecast() { timeout --signal=1 2s curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; } # Forecast should be updated only once a day. checkforecast() { diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet index 4c8131c..5440a52 100755 --- a/.local/bin/statusbar/sb-internet +++ b/.local/bin/statusbar/sb-internet @@ -25,9 +25,9 @@ elif [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ] ; then fi # Ethernet -[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="🌐 " || ethericon="❎ " +[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="🌐" || ethericon="❎" # TUN -[ -n "$(cat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon="🔒 " +[ -n "$(cat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon=" 🔒" printf "%s%s%s\n" "$wifiicon" "$ethericon" "$tunicon" diff --git a/.local/bin/statusbar/sb-mailbox b/.local/bin/statusbar/sb-mailbox index 2132184..88522f2 100755 --- a/.local/bin/statusbar/sb-mailbox +++ b/.local/bin/statusbar/sb-mailbox @@ -4,7 +4,7 @@ # When clicked, brings up `neomutt`. case $BLOCK_BUTTON in - 1) setsid -f "$TERMINAL" -e neomutt ;; + 1) setsid -w -f "$TERMINAL" -e neomutt; pkill -RTMIN+12 "${STATUSBAR:-dwmblocks}" ;; 2) setsid -f mw -Y >/dev/null ;; 3) notify-send "📬 Mail module" "\- Shows unread mail - Shows 🔃 if syncing mail diff --git a/.local/bin/statusbar/sb-torrent b/.local/bin/statusbar/sb-torrent index 6527005..08c9173 100755 --- a/.local/bin/statusbar/sb-torrent +++ b/.local/bin/statusbar/sb-torrent @@ -11,9 +11,9 @@ transmission-remote -l | grep % | sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' - case $BLOCK_BUTTON in - 1) setsid -f "$TERMINAL" -e tremc ;; + 1) setsid -f "$TERMINAL" -e stig ;; 2) td-toggle ;; - 3) notify-send "🌱 Torrent module" "\- Left click to open tremc. + 3) notify-send "🌱 Torrent module" "\- Left click to open stig. - Middle click to toggle transmission. - Shift click to edit script. Module shows number of torrents: |
