feat: add vpn icons in statusbar
This commit is contained in:
parent
e2bb1816a5
commit
d65d3cbe3a
@ -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"
|
||||
|
@ -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 }')"
|
||||
|
Reference in New Issue
Block a user