Configuration files for my GNU/Linux installation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
dotfiles/eww/.config/eww/scripts/wifi

13 lines
272 B

#!/bin/sh
status() {
[ $(cat /sys/class/net/w*/operstate) = down ] && echo false && exit
echo true
}
name() {
nmcli | grep "^wlp" | sed 's/\ connected\ to\ /Connected to /g' | cut -d ':' -f2
}
[ "$1" = "status" ] && status && exit
[ "$1" = "name" ] && name && exit