diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet index 7fe6d4a..f35864e 100755 --- a/.local/bin/statusbar/sb-internet +++ b/.local/bin/statusbar/sb-internet @@ -12,9 +12,12 @@ # Wifi quality percentage and  icon if ethernet is connected. wifi="$(grep "^\s*w" /proc/net/wireless | awk '{ printf int($3 * 100 / 70) }')" -[ $wifi -ne 0 ] && printf " 直 %3d%% " $wifi || printf " 睊 --- " +[ $wifi -ne 0 ] && str="$(printf "直 %3d%%" $wifi)" || str="$(printf "睊 ---")" eth="$(cat /sys/class/net/enp0s25/operstate)" if [ "up" = "$eth" ]; then - printf " /  " + str="$(printf "%s /  " "$str")" fi +vpn="$(pidof openvpn)" +[ -n "$vpn" ] && str="$(printf "() %s" "$str")" +printf " %s " "$str" diff --git a/.local/bin/statusbar/sb-torrent b/.local/bin/statusbar/sb-torrent index 45035b3..f65d5f8 100755 --- a/.local/bin/statusbar/sb-torrent +++ b/.local/bin/statusbar/sb-torrent @@ -16,7 +16,7 @@ out="$(transmission-remote --list)" cntd="$(echo "$out" | grep -e "Downloading" | wc -l)" cntu="$(echo "$out" | grep -e "Seeding" | wc -l)" cntud="$(echo "$out" | grep -e "Up & Down" | wc -l)" -cntd="$(expr $ctnd + $cntud)" +cntd="$(expr $cntd + $cntud)" cntu="$(expr $cntu + $cntud)" infos="$(echo "$out"| tail -n1)" spdd="$(echo "$infos" | awk -F " " '{ printf "%.2f", $5/1024 }')"