Repository navigation
Add Maximize Windows as a toggle that survives updates - #21
Merged
henrikklee merged 1 commit intoOct 30, 2026
Merged
Conversation
The menu's Maximize Windows toggle writes its labwc window rule to ~/.local/state/omarchy/xdg-config/labwc/rc.xml, never to ~/.config/labwc/rc.xml, which releases replace. The session puts that directory first in XDG_CONFIG_DIRS and starts labwc with -m, so labwc reads the rule file and then the user's rc.xml. Window rules from merged files accumulate. There is no /etc/xdg/labwc, so -m adds nothing else. Co-Authored-By: Claude Opus 5.5 <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.
Follow-up to #19, as you suggested: the Maximize Windows toggle, with its rule in a file releases don't replace.
How it works
omarchy-toggle-maximize-windowssets themaximize-windowsflag and writes the window rule to~/.local/state/omarchy/xdg-config/labwc/rc.xml. Toggling off removes both. It never touches~/.config/labwc/rc.xml. Then it sends labwcSIGHUP, as before.login-sessionputs~/.local/state/omarchy/xdg-configfirst inXDG_CONFIG_DIRSand runslabwc -m. With--merge-config, labwc 0.20.2 readslabwc/rc.xmlfrom each XDG config dir, least important first, then~/.config/labwc/rc.xml(rcxml.c:2024-2052). Window rules from all of them add up (fill_window_rule()appends,rcxml.c:289). So when a release replaces rc.xml, the rule stays, and the flag stays accurate.-malso merges autostart, environment, menu and theme files from those dirs. J71b has no/etc/xdg/labwc, and the state dir only ever holds thisrc.xml, so in practice nothing else changes. The existingXDG_CONFIG_DIRS(default/etc/xdg) stays on the end, so other programs look up their config as before.Testing
LABWC_UPDATE_ACTIVATION_ENV=0, the running session untouched). With-mit loggedread config file …/xdg-config/labwc/rc.xml, then…/labwc/rc.xml. Without-m, only the latter. The rule itself is the one that has been opening windows maximized on that unit.tests/test_menu_toggles.py: round trip (flag, rule file, SIGHUP; nothing created under~/.config), the session runslabwc -mwith the state dir inXDG_CONFIG_DIRS, and the menu entries. Full suite with the pinned hardware/cli installed (as in Test pushes and pull requests against the pinned hardware and cli #20): 84 tests OK, 1 skipped.🤖 Generated with Claude Code