.files/.config/waybar/scripts/toggle_wifi

12 lines
193 B
Text
Raw Normal View History

2024-10-17 15:16:09 +00:00
#!/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