Skip to content

feat(kde): open ghostty windows fullscreen instead of at a fixed size - #360

Merged
palazzem merged 4 commits into
mainfrom
ghostty-fullscreen
Sep 17, 2026
Merged

palazzem merged 4 commits into
mainfrom
ghostty-fullscreen

Conversation

@palazzem

@palazzem palazzem commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Related Issues

No related issue. Requested by the maintainer: ghostty should start fullscreen instead of at a fixed number of pixels.

Proposed Changes:

The hanzo-ghostty KWin window rule (kde_window_rules in roles/kde/defaults/main.yml) applied a 1600x1001 size to every new ghostty window. It now applies fullscreen initially: fullscreen=true with fullscreenrule=3 ("Apply initially"), the same thing System Settings > Window Rules writes when the Fullscreen property is enabled with that rule type.

Both keys come from source, not guesswork: fullscreen is a Bool and fullscreenrule a Rules::SetRule int in plasma/kwin src/rulesettings.kcfg. XdgToplevelWindow::initialize() in src/xdgshellwindow.cpp applies initial rules in a fixed order (size, then maximize, then fullscreen), so a fullscreen rule wins at mapping time.

The size keys are simply gone from the rule. community.general.ini_file only writes the keys it is given, so a machine provisioned with the old rule keeps size/sizerule in kwinrulesrc; that is by design. Provisioning targets a fresh, clean machine and is never backward compatible, now stated as rule 8 in CLAUDE.md, so there is no cleanup task. On an existing machine, remove the leftover Size property from the hanzo-ghostty rule in System Settings > Window Rules if you want it gone.

The kde-config skill's lessons/window-rules.md gained the fullscreen and maximize keys, the initial-state order, and a note that a dropped property stays on an already-provisioned machine.

Testing:

  • pre-commit run --all-files: every hook passed, including ansible-lint.
  • The container --check build was not run locally: the Docker daemon is not running on the authoring host. CI runs it. The kde role is skipped in the container regardless (no Plasma, host_has_kde is false), so the container build proves syntax for this change, not behaviour.
  • Live verification is owed on the Plasma machine: run hanzo, expect the window-rule task to report fullscreen and fullscreenrule changed and the Reconfigure KWin handler to fire; open a new ghostty window (an Apply rule only affects windows mapped after the reload) and confirm it is fullscreen; run hanzo again and confirm no change.

Extra Notes (optional):

Fullscreen and maximized are distinct KWin properties: fullscreen hides the panel and the title bar, maximized keeps both. If maximized is what is wanted, the rule takes maximizevert/maximizehoriz with their *rule companions instead.

If the hand-made UUID rule from #340 is still present, it keeps applying its size while this rule applies fullscreen; the properties do not overlap, so both take effect.

Checklist

  • Related issue and proposed changes are filled: no related issue exists; proposed changes above stand in.
  • Tests are defining the correct and expected behavior: no test harness exists for role behaviour beyond the container --check build and the manual Plasma verification described above.
  • Commits follow Conventional commit types
  • Lint passes: pre-commit run --all-files
  • Container test passes: docker build -f tests/Containerfile -t hanzo:test .: not run locally (Docker daemon not running); CI runs it, and the kde role is skipped in the container regardless.

The hanzo-ghostty KWin rule applied a 1600x1001 size to every new
ghostty window. It now applies fullscreen initially (fullscreen=true,
fullscreenrule=3) and retires the size keys.

Dropping a property from kde_window_rules would have left the old keys
in kwinrulesrc on every machine that already had them, so a rule
property set to null is now removed from its group (ini_file
state=absent) instead of written. The size keys are declared null until
every machine has converged.

Keys and application order confirmed from plasma/kwin:
src/rulesettings.kcfg (fullscreen Bool, fullscreenrule SetRule) and
XdgToplevelWindow::initialize() in src/xdgshellwindow.cpp, which applies
size, then maximize, then fullscreen.
@palazzem palazzem self-assigned this Sep 17, 2026
Comment thread roles/kde/defaults/main.yml Outdated
Provisioning targets a fresh machine, so the size keys are simply gone
from the rule and no task cleans them up on machines that already have
them. CLAUDE.md now states the rule: never be backward compatible.
Comment thread CLAUDE.md
Rule 9: once a PR that changes provisioned state is merged, the agent
asks whether to apply it to the current machine, reproduces the end
state directly instead of running hanzo on the host, and describes the
plan step by step before executing what the user confirms.
@palazzem
palazzem merged commit da77faa into main Sep 17, 2026
2 checks passed
@palazzem
palazzem deleted the ghostty-fullscreen branch September 17, 2026 14:48
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.

1 participant