Skip to content

Keep Hyprland toggle catalog out of new-user state - #3

Merged
themartiano merged 2 commits into
omacom:mainfrom
pfelrodrigues:fix/hypr-toggle-catalog
Aug 26, 2026
Merged

Keep Hyprland toggle catalog out of new-user state#3
themartiano merged 2 commits into
omacom:mainfrom
pfelrodrigues:fix/hypr-toggle-catalog

Conversation

@pfelrodrigues

Copy link
Copy Markdown
Contributor

Fixes #1

omarchy-hyprland-toggle treats any file in ~/.local/state/omarchy/toggles/hypr/ as an enabled flag. materialize-omarchy.sh was copying the catalog from default/hypr/toggles/ into that directory for every new user.

That turned on:

  • window-no-gaps (gaps and borders at 0)
  • single-window-aspect-ratio (first window as a centered 1:1 square)

The catalog stays under /usr/share/omarchy/default/hypr/toggles/ so users can still toggle the flags. New sessions start with an empty state directory.

Existing VMs already copied those files into $HOME. A factory reset (or deleting those two lua files from the toggle state dir) is needed to pick this up.

Copying default/hypr/toggles into ~/.local/state enabled window-no-gaps
and the 1:1 single-window flag for every new session. The catalog is
opt-in; the state directory should start empty.

Fixes omacom#1

@themartiano themartiano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A lot of people noticed this, thanks for fixing!

# Presence of a file here enables that Hyprland flag. default/hypr/toggles is
# the catalog (window-no-gaps, 1:1 single window), not the factory default.
mkdir -p "$root/etc/skel/.local/state/omarchy/toggles/hypr"
copy_contents "$source_dir/default/hypr/toggles" "$root/etc/skel/.local/state/omarchy/toggles/hypr"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Here we stop copying the whole directory, but flags.lua is also there and not the cause of the issue.
Not sure what's the impact, but to keep Omarchy as close to source as possible, can you please import it here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. New sessions now get only flags.lua (the empty-directory sentinel). window-no-gaps and single-window-aspect-ratio stay in the catalog.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Amazing work guys!

The catalog files remain opt-in. flags.lua is the empty-directory
sentinel from upstream, so keep that one file.
@themartiano
themartiano merged commit fefb29f into omacom:main Aug 26, 2026
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.

Tiling window manager

3 participants