fix: compositor dispatch edge cases, workspace scroll monitor match, tray hot-reload - #965
Open
dacrab wants to merge 1 commit into
Open
Conversation
…tray hot-reload
- workspaces: scroll used substring monitor matching while the view
filter deliberately uses equality — the eDP-1 bar scrolled the DP-1
monitor's workspaces (same false match the view comment warns about)
- niri: CustomDispatch("spawn") passed the whole args string as one
argv element, so any command with flags never worked; split on
whitespace
- hyprland: Lua dispatch interpolated workspace/dispatcher names into
the generated program unescaped; a name containing \ or " broke
toggling on Lua-config systems
- tray: config hot-reload was silently skipped (only module without
ConfigReloaded), so [tray] blocklist/right_click changes needed a
restart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the cleanup discussed in #964 — this is the standalone bug-fix slice (each fix independent, no behavior questions beyond what's described).
Workspaces: scroll monitor matching
Message::Scrolllocated the current workspace withname.contains(w.monitor.as_str()), while theview()filter a few lines below deliberately uses equality — its comment explains.contains()"falsely matches any pair where one name is a substring of the other — most commonlyeDP-1vsDP-1". The scroll handler apparently predated that fix. Consequence: scrolling the laptop (eDP-1) bar matched aDP-1workspace as current and navigated the external monitor's workspaces. One-line change to==, mirroring the view filter.Niri:
spawncustom dispatchCustomDispatch("spawn", args)builtAction::Spawn { command: vec![args] }— the whole args string as a single argv element, sospawn kitty --hold sh(or anything with flags) never worked. Split on whitespace like a shell would (no quoting support; happy to switch to shlex if you'd rather).Hyprland: unescaped interpolation into Lua dispatch
toggle_special("…")/focus special:…/CustomDispatchinterpolated user-controlled names straight into the generated Lua string. A special-workspace name containing"or\(both legal in Hyprland config) produced a Lua syntax error and silently broke toggling on Lua-config systems. Adds a smallescape_lua_stringhelper used at the three interpolation sites.Tray: config hot-reload silently skipped
Tray was the only module with a config but no
ConfigReloadedhandling inApp::refresh_config, so changing[tray] blocklist/right_clickin config.toml did nothing until restart while every sibling hot-reloads. Adds the variant +updatearm + wiring, mirroring hownotifications/osddo it.