eww: Fixed bar's connectivity widget SSID length
This commit is contained in:
parent
66cda354ba
commit
3042205f77
2 changed files with 3 additions and 2 deletions
|
@ -38,7 +38,8 @@
|
||||||
:onclick "bash -c 'iwgtk &> /dev/null &'"
|
:onclick "bash -c 'iwgtk &> /dev/null &'"
|
||||||
(label
|
(label
|
||||||
:class "connectivity"
|
:class "connectivity"
|
||||||
:text " ${connectivity.status == "down" ? "down" : connectivity.ssid}")
|
:text " ${connectivity.status == "down" ? "down" : connectivity.ssid}"
|
||||||
|
:limit-width 14)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ status (){
|
||||||
status=$(cat /sys/class/net/wlan0/operstate)
|
status=$(cat /sys/class/net/wlan0/operstate)
|
||||||
|
|
||||||
if [ "$status" != "down" ]; then
|
if [ "$status" != "down" ]; then
|
||||||
ssid=$(iw dev wlan0 link | grep SSID | awk '{print $2}')
|
ssid="$(iw dev wlan0 link | grep SSID | cut -d':' -f2)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "{\"status\": \"$status\", \"ssid\": \"$ssid\"}"
|
echo "{\"status\": \"$status\", \"ssid\": \"$ssid\"}"
|
||||||
|
|
Loading…
Reference in a new issue