From 18497419838d63c09fa86ed2217b94b7a2b2b32a Mon Sep 17 00:00:00 2001 From: awy Date: Sat, 30 Nov 2024 16:19:05 +0300 Subject: icons --- .local/bin/statusbar/sb-nettraf | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to '.local/bin/statusbar/sb-nettraf') diff --git a/.local/bin/statusbar/sb-nettraf b/.local/bin/statusbar/sb-nettraf index 2f223d6..ce001b0 100755 --- a/.local/bin/statusbar/sb-nettraf +++ b/.local/bin/statusbar/sb-nettraf @@ -6,21 +6,21 @@ case $BLOCK_BUTTON in 1) setsid -f "$TERMINAL" -e bmon ;; - 3) notify-send "🌐 Network traffic module" "🔻: Traffic received -🔺: Traffic transmitted" ;; + 3) notify-send "  Network traffic module" "  : Traffic received +  : Traffic transmitted" ;; 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac update() { - sum=0 - for arg; do - read -r i < "$arg" - sum=$(( sum + i )) - done - cache=/tmp/${1##*/} - [ -f "$cache" ] && read -r old < "$cache" || old=0 - printf %d\\n "$sum" > "$cache" - printf %d\\n $(( sum - old )) + sum=0 + for arg; do + read -r i < "$arg" + sum=$(( sum + i )) + done + cache=/tmp/${1##*/} + [ -f "$cache" ] && read -r old < "$cache" || old=0 + printf %d\\n "$sum" > "$cache" + printf %d\\n $(( sum - old )) } rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes) -- cgit v1.2.3