dotfiles/.local/scripts/0040_1_wifi

15 lines
370 B
Plaintext
Raw Normal View History

2022-08-14 02:10:53 +08:00
#!/bin/bash
2022-08-16 18:50:49 +08:00
COLOR1="#009CFF"
COLOR2="#005083"
2022-08-14 02:10:53 +08:00
power=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f8)
name=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f14)
2022-08-15 00:40:32 +08:00
if [[ ! $name ]]
then
2022-08-16 18:50:49 +08:00
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^  ^d^"
2022-08-15 00:40:32 +08:00
else
2022-08-16 18:50:49 +08:00
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ $name $power ^d^"
2022-08-15 00:40:32 +08:00
fi