12 lines
193 B
Text
12 lines
193 B
Text
|
#!/usr/bin/env bash
|
||
|
|
||
|
# Check the current Wi-Fi state
|
||
|
state=$(nmcli radio wifi)
|
||
|
|
||
|
# Toggle Wi-Fi state
|
||
|
if [ "$state" == "enabled" ]; then
|
||
|
nmcli radio wifi off
|
||
|
else
|
||
|
nmcli radio wifi on
|
||
|
fi
|