Skip to content

fix(end4): state focusOnActivate in the shell config too - #71

Merged
Schnee111 merged 1 commit into
mainfrom
fix/issue-70-focus-on-activate
Oct 25, 2026
Merged

Schnee111 merged 1 commit into
mainfrom
fix/issue-70-focus-on-activate

Conversation

@Schnee111

Copy link
Copy Markdown
Owner

Fixes #70

What this fixes

custom/general.lua enables misc:focus_on_activate (2447308), but the live value was false. The shell's Hyprland settings page writes all of its stored options into shellOverrides/main.lua when it opens, and that file loads after custom/general.lua. Our config.json had no hyprland.misc, so the shell wrote its default false (the option was added upstream in 95ce5b6).

Approach

  • rices/end4/illogical-impulse/config.json gets hyprland.misc.focusOnActivate: true. The key is inserted in Qt's sorted order with the file's 4-space format, so the diff is three lines.
  • New tests/shell-overrides-agree.sh: for each rice that has both files, focus_on_activate in custom/general.lua must equal hyprland.misc.focusOnActivate in config.json. A missing key counts as false, the shell's default. CI already has jq.

The shell side is not changed, because its default matches Hyprland's. The rice simply has to state its choice in the shell's config as well.

Verification

  • bash tests/run.sh: all test files pass. shellcheck is clean.
  • Negative control: with config.json from main, the new test fails with custom/general.lua focus_on_activate = true, config.json hyprland.misc.focusOnActivate = false.
  • Live, on the same machine:
    • the same key was added to ~/.config/illogical-impulse/config.json, and the shell reloaded it (watchChanges);
    • shellOverrides/main.lua was rewritten with the shell's own hyprconfigurator.py --set misc:focus_on_activate 1;
    • after hyprctl reload config-only, hyprctl getoption misc:focus_on_activate reads true, and configerrors is empty.

Risk

Low. The setting now has one value in both places. Turning it off from the settings page still works as before; it then overrides custom/general.lua again, which is that page's purpose.

The shell's Hyprland settings page writes misc:focus_on_activate from
config.json into shellOverrides/main.lua, which loads after
custom/general.lua. config.json had no hyprland.misc, so the shell wrote
its default false over the rice's true. Set the same value there, and
add a test that the two agree.

Fixes #70
Copilot AI balanced review requested due to automatic review settings October 25, 2026 00:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@Schnee111 Schnee111 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autonomous Code Review

Verdict: Approved
Target Commit: 08bcdaa

Summary

Correctly synchronizes hyprland.misc.focusOnActivate in the shell configuration to match Hyprland's custom/general.lua, preventing shell override resets. The accompanying regression test is sound and properly handles default fallbacks.


Shorekeeper Sentinel · Autonomous Quality Gate

@Schnee111
Schnee111 merged commit 7239392 into main Oct 25, 2026
1 check passed
@Schnee111
Schnee111 deleted the fix/issue-70-focus-on-activate branch October 25, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

end4: shell settings page overrides focus_on_activate = true with its default false

2 participants