Update for waybar

This commit is contained in:
2025-10-09 22:40:38 -07:00
parent d7fbed68bf
commit 5b551a4075
5 changed files with 31 additions and 7 deletions

View File

@ -19,7 +19,9 @@ local entries=('Select system sound output' 'select-sound-output.sh' 'true'
'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'
'Restart top bar' 'river-restart-eww.sh' '[[ "${XDG_CURRENT_DESKTOP}" == river ]]')
# I'm not using eww right now
# 'Restart top bar' 'river-restart-eww.sh' '[[ "${XDG_CURRENT_DESKTOP}" == river ]]'
)
local entry_array=()
local enabled_entries=()

View File

@ -18,9 +18,12 @@ case "${choice}" in
0)
if [[ "${swayidle_state}" == 'Disabled' ]]; then
local cmd_cache=(${(0)"$(<"${CACHE_PATH}")"})
set -x
cd "${cmd_cache[1]}"
exec ${=${cmd_cache[2]}}
{
set -x
cd "${cmd_cache[1]}"
exec ${=${cmd_cache[2]}}
} &
disown
fi
;;
1)
@ -37,6 +40,7 @@ esac
if [[ "${XDG_CURRENT_DESKTOP}" == 'river' ]]; then
eww -c "${HOME}/.config/river/config/" update swayidle="$(( ! ${choice} ))"
pkill -RTMIN+3 waybar
elif [[ "${XDG_CURRENT_DESKTOP}" == 'Hyprland' ]]; then
pkill -SIGRTMIN+1 waybar
fi