Last active
January 29, 2024 19:52
-
-
Save UndeadDevel/3ffeb19d66eee72c85d9c5a94ea2b60d to your computer and use it in GitHub Desktop.
QubesOS: switch WiFi on and off via keyboard shortcut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
qvm-run sys-net -- "if nmcli radio wifi | head -c1 | grep -E 'e'; then nmcli radio wifi off; else nmcli radio wifi on; fi" | |
# If the file /var/lib/NetworkManager/NetworkManager.state with the following content is created in sys-net's template, then WiFi is off by default on boot: | |
# [main] | |
# NetworkingEnabled=true | |
# WirelessEnabled=false | |
# WWANEnabled=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment