aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2015-04-10 23:52:51 +0200
committerEduardo Pedroni <ep625@york.ac.uk>2015-04-10 23:52:51 +0200
commit6fb8bcc8569d06e17a8b48341d9386dda7626347 (patch)
treea8c19ec048423d53713e52b0be773d4324626e27
parent0438e12bbfd5cb62033ae4d9b3b2e72d09f19e5b (diff)
Sorted percent sign
-rwxr-xr-xdwm-statusbar5
1 files changed, 3 insertions, 2 deletions
diff --git a/dwm-statusbar b/dwm-statusbar
index 677e7f1..8e567d5 100755
--- a/dwm-statusbar
+++ b/dwm-statusbar
@@ -124,7 +124,7 @@ print_wifi() {
wifi_status=$(ip addr show dev wlan0 | awk 'NR==1 {print $9}')
if [ "$wifi_status" == "UP" ]; then
- let wifi_strength="10 * $(cat /proc/net/wireless | awk 'NR==3 {print substr($3, 1, 2)}') / 7%"
+ let wifi_strength="10 * $(cat /proc/net/wireless | awk 'NR==3 {print substr($3, 1, 2)}') / 7"
if [ $wifi_strength -lt 25 ]; then
icon_colour=${colour_critical}
wifi_colour=${colour_critical}
@@ -136,12 +136,13 @@ print_wifi() {
wifi_colour=${colour_normal}
fi
+ wifi_strength="${wifi_strength}%"
wifi_ip=$(ip addr show dev wlan0 | awk 'NR==3 {print $2}' | sed -r 's/\/.*/, /')
else
icon_colour=${colour_faded}
fi
- #uE0E4
+
echo -ne "${icon_colour}\uE401${wifi_colour}${wifi_ip}${wifi_strength}"
}