diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2022-11-06 18:15:56 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2022-11-06 18:15:56 +0530 |
commit | 8d513837b076b31c131e49b9ee47a5816fef3030 (patch) | |
tree | fef9facfcc1c97b6af1e4bf90cb7c5166ceaf5e3 /.scripts/wifi-menu | |
parent | 371d02c202c19e68d240729260e2e526a33e41ae (diff) |
wifi-menu notification+icon addition
Diffstat (limited to '.scripts/wifi-menu')
-rwxr-xr-x | .scripts/wifi-menu | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/.scripts/wifi-menu b/.scripts/wifi-menu index 4713c00..df9f9e5 100755 --- a/.scripts/wifi-menu +++ b/.scripts/wifi-menu @@ -5,7 +5,15 @@ choice=$(echo -e "up\ndown\nconnect" | dmenu -p "Do you wish to connect to a wi- case $choice in "up"|"down") ssid=$(nmcli -t -f ssid dev wifi| cut -d\' -f2 | dmenu -p "Select Wifi " -l 20) - nmcli c "$choice" "$ssid" ;; + nmcli c "$choice" "$ssid"; + if [ "$choice" == "up" ]; then + dunstify "Connected" "You are now connected to $ssid" -i wifi-solid + elif [ "$choice" == "down" ]; then + dunstify "Disconnected" "You have disconnected from $ssid"-i wifi-slash + else + : + fi;; + "connect") bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | dmenu -p "Select Wi-Fi :" -l 20 | cut -d' ' -f1) pass=$(echo "" | dmenu -P -p "Enter Password : ") |