Fix: Stop Refresh.sh relaunching Waybar, drop dead special:nyx rule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 08:17:25 +01:00
parent aefa68f24c
commit 0e9dbf0abc
2 changed files with 6 additions and 17 deletions

View File

@@ -98,7 +98,6 @@ hl.window_rule({ name = "windowrule-46", tag = "+settings", match = { class = "^
-- Custom rule -- Custom rule
hl.window_rule({ name = "windowrule-47", tile = true, match = { class = "^([Cc]hromium)$" } }) hl.window_rule({ name = "windowrule-47", tile = true, match = { class = "^([Cc]hromium)$" } })
hl.window_rule({ name = "windowrule-48", size = "monitor_w*0.25 monitor_h*0.55", float = true, match = { class = "^(com.network.manager)$" } }) hl.window_rule({ name = "windowrule-48", size = "monitor_w*0.25 monitor_h*0.55", float = true, match = { class = "^(com.network.manager)$" } })
hl.window_rule({ name = "windowrule-49", workspace = "special:nyx", match = { class = "^([Vv]esktop|[Dd]iscord|[Ss]potify)$" } })
hl.window_rule({ name = "windowrule-255", size = "monitor_w*0.75 monitor_h*0.80", float = true, match = { class = "^([Bb]itwarden)$" } }) hl.window_rule({ name = "windowrule-255", size = "monitor_w*0.75 monitor_h*0.80", float = true, match = { class = "^([Bb]itwarden)$" } })
-- System updater terminal (quickshell/scripts/update-system.sh) — float + center it instead of -- System updater terminal (quickshell/scripts/update-system.sh) — float + center it instead of
-- tiling into the current workspace. Matches the title the script launches it with, so it works -- tiling into the current workspace. Matches the title the script launches it with, so it works
@@ -139,11 +138,8 @@ hl.window_rule({
-- hl.window_rule({ idle_inhibit = "fullscreen", match = { title = "^(*)$" } }) -- hl.window_rule({ idle_inhibit = "fullscreen", match = { title = "^(*)$" } })
hl.window_rule({ name = "windowrule-60", idle_inhibit = "fullscreen", match = { fullscreen = true } }) hl.window_rule({ name = "windowrule-60", idle_inhibit = "fullscreen", match = { fullscreen = true } })
-- Discord to workspace 3 -- Discord / Spotify / Plexamp to workspace 3 (the portrait LG). An older rule also sent
-- NOTE: these two used the old single-line windowrule syntax in the source .conf (match packed -- Vesktop/Discord/Spotify to special:nyx; this one always won, so that rule was removed.
-- oddly with the rule); windowrule-49 above already sends the same apps to special:nyx, so this
-- looks like a pre-existing conflict in the original config rather than something introduced here —
-- ported literally, last-defined-wins as before.
hl.window_rule({ workspace = "3", match = { class = "^([Vv]esktop|[Dd]iscord|[Ss]potify|[Pp]lexamp)$" } }) hl.window_rule({ workspace = "3", match = { class = "^([Vv]esktop|[Dd]iscord|[Ss]potify|[Pp]lexamp)$" } })
hl.window_rule({ size = "20% 20%", match = { class = "^([Pp]lexamp)" } }) hl.window_rule({ size = "20% 20%", match = { class = "^([Pp]lexamp)" } })

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# HyprFlux — https://github.com/ahmad9059/HyprFlux # HyprFlux — https://github.com/ahmad9059/HyprFlux
# Scripts for refreshing waybar, rofi, swaync # Scripts for refreshing quickshell, rofi, swaync (Waybar is retired — not restarted here)
SCRIPTSDIR=$HOME/.config/hypr/scripts SCRIPTSDIR=$HOME/.config/hypr/scripts
UserScripts=$HOME/.config/hypr/UserScripts UserScripts=$HOME/.config/hypr/UserScripts
@@ -15,31 +15,24 @@ file_exists() {
} }
# Kill already running processes # Kill already running processes
_ps=(waybar rofi swaync ags) _ps=(rofi swaync ags)
for _prs in "${_ps[@]}"; do for _prs in "${_ps[@]}"; do
if pidof "${_prs}" >/dev/null; then if pidof "${_prs}" >/dev/null; then
pkill "${_prs}" pkill "${_prs}"
fi fi
done done
# ensure waybar fully reloads
killall -SIGUSR2 waybar
# quit ags & relaunch ags # quit ags & relaunch ags
#ags -q && ags & #ags -q && ags &
# quit quickshell & relaunch quickshell # quit quickshell & relaunch quickshell
pkill qs && qs & pkill -x qs; qs &
# some process to kill # some process to kill
for pid in $(pidof waybar rofi swaync ags swaybg); do for pid in $(pidof rofi swaync ags swaybg); do
kill -SIGUSR1 "$pid" kill -SIGUSR1 "$pid"
done done
#Restart waybar
sleep 1
waybar &
# relaunch swaync # relaunch swaync
sleep 0.5 sleep 0.5
swaync > /dev/null 2>&1 & swaync > /dev/null 2>&1 &