minor updates
This commit is contained in:
parent
eb19ad59cb
commit
d1d1c02ef1
@ -9,7 +9,7 @@ state=${parts[1]}
|
||||
status="$current%"
|
||||
|
||||
if [[ "$state" == "discharging" ]]; then
|
||||
case $((current/20)) in
|
||||
case $(((current/20)+1)) in
|
||||
1)
|
||||
icon=""
|
||||
;;
|
||||
|
||||
@ -24,7 +24,7 @@ layout="$(xkb-switch)"
|
||||
|
||||
case $layout in
|
||||
${stdlayout}) color=$green; icon=" "; name=$stdname ;; # f11c fa-keyboard-o
|
||||
*) color=$magenta; icon=" "; name="dvorak" ;; # f11c fa-keyboard-o
|
||||
*) color=$magenta; icon=""; name="dvorak" ;; # f11c fa-keyboard-o
|
||||
esac
|
||||
|
||||
echo "<fc=$color><fn=1>$icon</fn> ${name}</fc>"
|
||||
|
||||
@ -35,11 +35,11 @@ wifi_icon=""
|
||||
connectivity="$(nmcli networking connectivity)"
|
||||
|
||||
case $connectivity in
|
||||
none) color=$red; icon=" " ;; # f056 fa-minus-circle
|
||||
portal) color=$yellow; icon=" " ;; # f05c fa-times-circle-o
|
||||
limited) color=$yellow; icon=" " ;; # f01b fa-arrow-circle-o-up
|
||||
full) color=$std_color; icon=" " ;; # f0aa fa-arrow-circle-up
|
||||
*) color=$red; icon=" " ;; # f29c fa-question-circle-o
|
||||
none) color=$red; icon="" ;; # f056 fa-minus-circle
|
||||
portal) color=$yellow; icon="" ;; # f05c fa-times-circle-o
|
||||
limited) color=$yellow; icon="" ;; # f01b fa-arrow-circle-o-up
|
||||
full) color=$std_color; icon="" ;; # f0aa fa-arrow-circle-up
|
||||
*) color=$red; icon="" ;; # f29c fa-question-circle-o
|
||||
esac
|
||||
|
||||
eth="$(ip -o address | grep -i "$dev_eth *inet ")"
|
||||
@ -67,7 +67,7 @@ then
|
||||
|
||||
signal=$((signal/5*5)) # get rid of some jitter
|
||||
((signal > 100)) && signal=100
|
||||
wifi_status=" <fn=1>$wifi_icon </fn> <fc=$green>${signal}</fc>% ${ssid##*SSID: }"
|
||||
wifi_status=" <fn=1>$wifi_icon</fn> <fc=$green>${signal}</fc>% ${ssid##*SSID: }"
|
||||
fi
|
||||
|
||||
vpn="$(ip -o address | grep -i "$dev_vpn *inet ")"
|
||||
@ -75,10 +75,10 @@ if [ -n "$vpn" ]
|
||||
then
|
||||
#vpn="${vpn##*inet }"
|
||||
#vpn_status="<fn=1></fn> ${vpn%%/*}"
|
||||
vpn_status="<fn=1> </fn> "
|
||||
vpn_status="<fn=1></fn> "
|
||||
color=$green
|
||||
else
|
||||
vpn_status="<fn=1> </fn> "
|
||||
vpn_status="<fn=1></fn> "
|
||||
fi
|
||||
|
||||
echo "<fc=$color>${vpn_status}<fn=1>$icon</fn>${connectivity##*full}$wifi_status$eth_status</fc>"
|
||||
|
||||
Reference in New Issue
Block a user