.files/.config/waybar/scripts/toggle_wifi
2024-10-17 17:16:09 +02:00

11 lines
193 B
Bash

#!/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