Skip to content

Add Maximize Windows as a toggle that survives updates - #21

Merged
henrikklee merged 1 commit into
OrchardLinux:mainfrom
dl-alexandre:maximize-windows-state-config
Oct 30, 2026
Merged

henrikklee merged 1 commit into
OrchardLinux:mainfrom
dl-alexandre:maximize-windows-state-config

Conversation

@dl-alexandre

Copy link
Copy Markdown
Contributor

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-windows sets the maximize-windows flag 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 labwc SIGHUP, as before.
  • login-session puts ~/.local/state/omarchy/xdg-config first in XDG_CONFIG_DIRS and runs labwc -m. With --merge-config, labwc 0.20.2 reads labwc/rc.xml from 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.
  • -m also merges autostart, environment, menu and theme files from those dirs. J71b has no /etc/xdg/labwc, and the state dir only ever holds this rc.xml, so in practice nothing else changes. The existing XDG_CONFIG_DIRS (default /etc/xdg) stays on the end, so other programs look up their config as before.
  • The menu entries are the same as in Make the menu's toggles work and add Maximize Windows #19.

Testing

  • On a J71b running 0.1.10, I ran a throwaway headless labwc 0.20.2 with its own config home (LABWC_UPDATE_ACTIVATION_ENV=0, the running session untouched). With -m it logged read 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 runs labwc -m with the state dir in XDG_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

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>
@henrikklee
henrikklee merged commit 87d2305 into OrchardLinux:main Oct 30, 2026
5 of 7 checks passed
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.

2 participants