Add login-to-wifi.sh to system-menu

This commit is contained in:
Alexander Rosenberg 2024-08-03 22:01:39 -08:00
parent a582047e7e
commit 3152c90c00
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
2 changed files with 11 additions and 2 deletions

View File

@ -1,13 +1,22 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
function is-laptop-p {
[[ "${HOST}" == *-portable ]] || [[ "${HOST}" == *-laptop ]]
}
function is-desktop-p {
is-laptop
}
pgrep swayidle && swayidle_state="Enabled" || swayidle_state="Disabled" pgrep swayidle && swayidle_state="Enabled" || swayidle_state="Disabled"
# Format: label action condition # Format: label action condition
local entries=('Select system sound output' 'select-sound-output.sh' 'true' local entries=('Select system sound output' 'select-sound-output.sh' 'true'
"Enable or disable system sleep (Current: ${swayidle_state})" 'system-sleep-menu.sh' 'true' "Enable or disable system sleep (Current: ${swayidle_state})" 'system-sleep-menu.sh' 'true'
'Enable or disable TV' 'tv-power-menu.sh' '[[ "${HOST}" = "alexanders-desktop" ]]' 'Enable or disable TV' 'tv-power-menu.sh' 'is-desktop-p'
'Configure USB device access' 'usbguard-menu.py' 'pgrep usbguard-daemon' 'Configure USB device access' 'usbguard-menu.py' 'pgrep usbguard-daemon'
'Power settings (restart and shutdown)' 'system-power-menu.sh' 'true') 'Power settings (restart and shutdown)' 'system-power-menu.sh' 'true'
'Login to captive portal protected WiFi' 'login-to-wifi.sh' 'is-laptop-p')
local entry_array=() local entry_array=()
local enabled_entries=() local enabled_entries=()