1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-26 13:18:35 -06:00
random/wifi-toggle

11 lines
211 B
Text
Raw Normal View History

2021-04-19 13:54:49 -05:00
# Toggles WiFi on a Linux system. Make sure that you have nmcli installed.
# I use it with a shortcut.
2021-12-28 02:54:26 -06:00
#!/bin/sh
2021-04-19 13:54:49 -05:00
if [ $(nmcli r wifi | grep -c enabled) -eq 1 ]; then
nmcli r wifi off
else
nmcli r wifi on
fi