This commit is contained in:
Luca 2022-11-22 13:25:44 +01:00
parent 8268fba83d
commit 7ed2a6e110
9565 changed files with 1315332 additions and 90 deletions

18
home/.local/bin/scripts/dwifi Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
# Sending Notification With dunst :
notify-send "listing available Wi-Fi networks..."
status=$(nmcli -fields WIFI g)
if [[ "$status" =~ "enabled" ]]; then
toggle="睊 Disable Wi-Fi"
elif [[ "$status" =~ "disabled" ]]; then
toggle="直 Enable Wi-Fi"
fi
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | sed -E "s/WPA*.?\S/ /g" | sed "s/^--/ /g" | sed "s/ //g" | sed "/--/d"| dmenu -i -l 20 -h 25 -p "Select Wifi 直:" | cut -d' ' -f1)
pass=$(echo"" | dmenu -l 20 -h 30 -i -p "Enter the password :")
nmcli device wifi connect $bssid password $pass