mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-12-23 15:49:40 +01:00
27 lines
384 B
Bash
Executable File
27 lines
384 B
Bash
Executable File
#!/bin/bash
|
|
|
|
status=$(nmcli g | grep -oE "disconnected")
|
|
essid=$(nmcli c | grep wlan0 | 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
|
|
|