Repository navigation
Conversation
VykosMolt
force-pushed
the
fix/exec-login-shell-latency
branch
from
August 31, 2026 19:07
cd3ed85 to
3b74be8
Compare
…d calls `bar.run()` hands its command to `Util.execDetached()`, which runs it as `bash -lc`. A login shell sources /etc/profile and every script in /etc/profile.d before the command it was given starts. That is the right trade for most `bar.run()` callers, which launch `omarchy-*` scripts and GUI applications that want the session environment, and `execArgv` already documents why it keeps it. Two callers get nothing from it, and they are the two that run hyprctl. Clicking a workspace does not need hyprctl at all. The widget already holds a Hyprland socket open for `Hyprland.workspaces`, so the focus request goes down that instead of spawning a login shell that execs a client to open a second socket. The dispatched expression is the one tiling.lua binds, so a click and the keybinding cannot drift apart. This is also why SUPER+N felt instant and clicking the bar did not: the keybinding is compiled into Hyprland at config load and dispatched in-process. Clicking the keyboard layout does need a process, because switchxkblayout is a hyprctl command rather than a dispatcher and does not go over the dispatch socket. It gets `Util.execProgram()`, which runs an argv with no shell in between, exposed to widgets as `bar.runProgram()` alongside `bar.run()`. `run`, `execDetached` and `execArgv` are untouched. Passing an argv also means the keyboard device name is no longer pasted into a command line and quoted back out of it. The argv that reaches hyprctl is identical; there is just no longer a string for the quoting to have to be right about. On this machine `bash -lc true` is 110ms against 2ms for `bash -c true`, and it is not the user's dotfiles: with an empty HOME it is still 110ms, because the cost is /etc/profile.d. One script there accounts for 85ms of that, and dropping it still leaves 42ms in front of a bar click.
VykosMolt
force-pushed
the
fix/exec-login-shell-latency
branch
from
September 8, 2026 21:25
3b74be8 to
fca0cbd
Compare
Contributor
[Medium impact] The PR appears safe to merge, with no new actionable issues found. SummaryRemoves the login shell from the bar’s direct Hyprland actions.
No new actionable issues were found. The previous source-text test finding is addressed. Review was based on source inspection; no tests or live Hyprland checks were run.
|
Contributor
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The layout click focuses the monitor over the Hyprland socket instead of hyprctl, and runs the toggle on the monitor's focus change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Workspace and keyboard-layout clicks launch hyprctl through the bar's login shell on the base implementation. Workspace focus now dispatches over the widget's existing Hyprland connection. Keyboard-layout switching uses bar.runProgram() and Util.execProgram() to pass literal arguments directly to Quickshell. The plugin bar facade exposes the same validated array-of-strings operation to cloned widgets. Commands that require the login environment keep their existing path.
Merged current quattro, which added per-monitor workspaces (#15655). Workspace focus keeps its block/slot logic and goes over the Hyprland socket. Clicking the layout glyph on another monitor's bar now also focuses that monitor over the socket, and runs the layout toggle once Hyprland reports that monitor focused; if focus doesn't arrive within a second, the toggle is dropped. At this head the bar (252), keyboard-layout (75), hyprland-floating-workspaces (44) and hyprland-monitor-workspaces (15) checks pass. Not run in a live Hyprland session.
A keyboard-layout click continues to synchronize every device sharing the selected layout list to the same wrapped absolute index. Each device name remains a literal argument, including shell syntax. This revision also retains current Quattro's cycleBackground control and background-mode behavior while resolving the Bar.qml conflict.
Validation against Quattro 60cb9bf: 240 bar checks and 75 keyboard-layout checks pass (233 and 71 on clean Quattro), as does git diff --check. The tests no longer search the source; a workspace click is checked by running focusWorkspace against a fake Hyprland connection. Tests execute the facade → Bar → Util → Quickshell path, reject malformed arrays, preserve literal arguments and verify synchronized devices and wrapping.
Earlier native validation on October 9 clicked a cloned keyboard-layout widget through QMP, switched both guest keyboards from English (US) to German, and showed DE in the cloned bar. The capture and compositor state were inspected and the original configuration restored. That evidence covers the direct-dispatch mechanism; it is historical validation, not a full native run of this newly merged head.