Update waybar config
This commit is contained in:
@ -8,25 +8,19 @@ function is-desktop-p {
|
||||
! is-laptop-p
|
||||
}
|
||||
|
||||
systemctl --user --quiet is-active swayidle.service \
|
||||
&& swayidle_state="Enabled" || swayidle_state="Disabled"
|
||||
|
||||
# Format: label action condition
|
||||
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" 'system-sleep-menu.sh' 'true'
|
||||
'Enable or disable TV' 'tv-power-menu.sh' 'is-desktop-p'
|
||||
'Configure USB device access' 'usbguard-menu.py' 'pgrep usbguard-daemon'
|
||||
'Power settings (restart and shutdown)' 'system-power-menu.sh' 'true'
|
||||
'Login to captive portal protected WiFi' 'login-to-wifi.sh' 'is-laptop-p'
|
||||
# I'm not using eww right now
|
||||
# 'Restart top bar' 'river-restart-eww.sh' '[[ "${XDG_CURRENT_DESKTOP}" == river ]]'
|
||||
)
|
||||
'Login to captive portal protected WiFi' 'login-to-wifi.sh' 'is-laptop-p')
|
||||
|
||||
local entry_array=()
|
||||
local enabled_entries=()
|
||||
for ((i = 1; i <= ${#entries}; i+=3)); do
|
||||
if eval "${entries[${i} + 2]}" >/dev/null 2>&1; then
|
||||
entry_array[$((${i} / 3 + 1))]="${entries[${i}]}"
|
||||
entry_array[$((i / 3 + 1))]="${entries[i]}"
|
||||
enabled_entries+=(${entries[@]:${i} - 1:3})
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user