minor updates

This commit is contained in:
Solomon Laing 2022-08-18 06:51:46 +09:30
parent eb19ad59cb
commit d1d1c02ef1
3 changed files with 10 additions and 10 deletions

View File

@ -9,7 +9,7 @@ state=${parts[1]}
status="$current%" status="$current%"
if [[ "$state" == "discharging" ]]; then if [[ "$state" == "discharging" ]]; then
case $((current/20)) in case $(((current/20)+1)) in
1) 1)
icon="" icon=""
;; ;;

View File

@ -24,7 +24,7 @@ layout="$(xkb-switch)"
case $layout in case $layout in
${stdlayout}) color=$green; icon=" "; name=$stdname ;; # f11c fa-keyboard-o ${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 esac
echo "<fc=$color><fn=1>$icon</fn> ${name}</fc>" echo "<fc=$color><fn=1>$icon</fn> ${name}</fc>"

View File

@ -35,11 +35,11 @@ wifi_icon=""
connectivity="$(nmcli networking connectivity)" connectivity="$(nmcli networking connectivity)"
case $connectivity in case $connectivity in
none) color=$red; icon=" " ;; # f056 fa-minus-circle none) color=$red; icon="" ;; # f056 fa-minus-circle
portal) color=$yellow; icon=" " ;; # f05c fa-times-circle-o portal) color=$yellow; icon="" ;; # f05c fa-times-circle-o
limited) color=$yellow; icon=" " ;; # f01b fa-arrow-circle-o-up limited) color=$yellow; icon="" ;; # f01b fa-arrow-circle-o-up
full) color=$std_color; icon=" " ;; # f0aa fa-arrow-circle-up full) color=$std_color; icon="" ;; # f0aa fa-arrow-circle-up
*) color=$red; icon=" " ;; # f29c fa-question-circle-o *) color=$red; icon="" ;; # f29c fa-question-circle-o
esac esac
eth="$(ip -o address | grep -i "$dev_eth *inet ")" eth="$(ip -o address | grep -i "$dev_eth *inet ")"
@ -67,7 +67,7 @@ then
signal=$((signal/5*5)) # get rid of some jitter signal=$((signal/5*5)) # get rid of some jitter
((signal > 100)) && signal=100 ((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 fi
vpn="$(ip -o address | grep -i "$dev_vpn *inet ")" vpn="$(ip -o address | grep -i "$dev_vpn *inet ")"
@ -75,10 +75,10 @@ if [ -n "$vpn" ]
then then
#vpn="${vpn##*inet }" #vpn="${vpn##*inet }"
#vpn_status="<fn=1></fn> ${vpn%%/*}" #vpn_status="<fn=1></fn> ${vpn%%/*}"
vpn_status="<fn=1> </fn> " vpn_status="<fn=1></fn> "
color=$green color=$green
else else
vpn_status="<fn=1> </fn> " vpn_status="<fn=1></fn> "
fi fi
echo "<fc=$color>${vpn_status}<fn=1>$icon</fn>${connectivity##*full}$wifi_status$eth_status</fc>" echo "<fc=$color>${vpn_status}<fn=1>$icon</fn>${connectivity##*full}$wifi_status$eth_status</fc>"