dotfiles/.local/scripts/0040_1_wifi

15 lines
370 B
Bash
Executable File

#!/bin/bash
COLOR1="#009CFF"
COLOR2="#005083"
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)
if [[ ! $name ]]
then
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^  ^d^"
else
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ $name $power ^d^"
fi