diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-11-16 17:57:31 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-11-16 17:57:31 +0200 |
| commit | c6c79174d7df71a311d5a865db88dac54196701b (patch) | |
| tree | c6b7f2bffb043b0becec871ef357327c85010feb /.config/eww | |
| parent | 0d526ffcc59b2c79e5053ec9de39525b105887de (diff) | |
| download | dotfiles-c6c79174d7df71a311d5a865db88dac54196701b.tar.gz dotfiles-c6c79174d7df71a311d5a865db88dac54196701b.zip | |
Add wifi script
Diffstat (limited to '.config/eww')
| -rwxr-xr-x | .config/eww/scripts/wifi | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.config/eww/scripts/wifi b/.config/eww/scripts/wifi new file mode 100755 index 0000000..5d7cc59 --- /dev/null +++ b/.config/eww/scripts/wifi @@ -0,0 +1,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 + |
