add *.sh
This commit is contained in:
11
toggle_wifi.sh
Executable file
11
toggle_wifi.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
wifi_block=$(rfkill list wifi | grep Soft | awk '{print $3}')
|
||||
if [ "$wifi_block" == "yes" ]
|
||||
then
|
||||
rfkill unblock wifi
|
||||
notify-send "Wifi is now enabled"
|
||||
else
|
||||
rfkill block wifi
|
||||
notify-send "Wifi is now disabled"
|
||||
fi
|
||||
sleep 0.2
|
Reference in New Issue
Block a user