From f1694b519cd73d1bf2b2424ed893489cd1a8d8b3 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Sun, 9 Aug 2026 03:05:36 -0400 Subject: Fix: waybar startup/restart in Fedora Conflicts with waybar.service when hyprland-uwsm session not selected Fixed startup config files Added gate check for AGS to remove errors when not installed Signed-off-by: Don Williams On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md modified: config/hypr/configs/Startup_Apps.conf modified: config/hypr/lua/startup.lua modified: config/hypr/lua/user_startup_helper.lua modified: config/hypr/scripts/DarkLight.sh modified: config/hypr/scripts/PortalHyprland.sh modified: config/hypr/scripts/Refresh.sh modified: config/hypr/scripts/ToggleWaybarTime.sh modified: config/hypr/scripts/WaybarStartup.sh modified: scripts/migrate-hypr-to-lua.sh --- config/hypr/scripts/Refresh.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'config/hypr/scripts/Refresh.sh') diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index a35b735a..79495d0f 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -33,7 +33,10 @@ pkill -f 'waybar-cava\..*\.conf' 2>/dev/null || true # quit ags & relaunch ags -ags -q && ags & +if command -v ags >/dev/null 2>&1; then + ags -q >/dev/null 2>&1 || true + ags >/dev/null 2>&1 & +fi # quit quickshell & relaunch quickshell pkill qs && qs --log-rules "$QS_TEXTINPUT_LOG_RULE" & @@ -49,8 +52,10 @@ restart_waybar() { local manage_with_systemd=0 if command -v systemctl >/dev/null 2>&1; then - if systemctl --user --quiet is-active waybar.service 2>/dev/null || systemctl --user --quiet is-enabled waybar.service 2>/dev/null; then - manage_with_systemd=1 + if systemctl --user --quiet is-active graphical-session.target 2>/dev/null || systemctl --user --quiet is-active wayland-session@*.target 2>/dev/null; then + if systemctl --user --quiet is-active waybar.service 2>/dev/null || systemctl --user --quiet is-enabled waybar.service 2>/dev/null; then + manage_with_systemd=1 + fi fi fi @@ -80,9 +85,11 @@ restart_waybar # relaunch swaync sleep 0.3 -swaync >/dev/null 2>&1 & -# reload swaync -swaync-client --reload-config +if ! pidof swaync >/dev/null 2>&1; then + swaync >/dev/null 2>&1 & +fi +# reload swaync (asynchronous to prevent DBus timeout delays) +(swaync-client --reload-config >/dev/null 2>&1 &) # Relaunching rainbow borders based on selected mode sleep 1 -- cgit v1.2.3