aboutsummaryrefslogtreecommitdiff
path: root/.config/eww/scripts/wifi
blob: 5d7cc59afe48b594030e24c2d0d81cfc29161821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

status=$(nmcli g | grep -oE "disconnected")
essid=$(nmcli c | grep wlp2s0 | awk '{print ($1)}')

if [ $status ] ; then
    icon=""
    text=""
    col="#575268"

else
    icon=""
    text="${essid}"
    col="#a1bdce"
fi



if [[ "$1" == "--COL" ]]; then
    echo $col	
elif [[ "$1" == "--ESSID" ]]; then
	echo $text
elif [[ "$1" == "--ICON" ]]; then
	echo $icon
fi