Skip to content

Add separate options for window control buttons - #789

Open
Niapoll wants to merge 1 commit into
Samillion:mainfrom
Niapollab:main
Open

Niapoll wants to merge 1 commit into
Samillion:mainfrom
Niapollab:main

Conversation

@Niapoll

@Niapoll Niapoll commented Sep 23, 2026

Copy link
Copy Markdown

Description

Previously, window_controls was an all-or-nothing toggle that rendered all three controls (minimize, maximize, close) in fixed geometries. On certain Window Managers (WM) and Desktop Environments (DE), minimizing windows is unsupported or handled entirely via keybindings, leaving non-functional buttons or unwanted controls in the top bar.

With this change applied, we'll have individual configuration options to enable or disable each window control button independently.

The control box width, element hitboxes, and button layouts are now calculated dynamically based on which buttons are active. Remaining controls neatly right-align without leaving dead space or misaligned click zones.


Previews

Default (All Buttons) No Minimize
Default No Minimize
Only Close Custom Combination
Only Close Custom Combination

Testing

  • Tested with various button combinations (all on, only close, min disabled, all disabled).
  • Verified click hitboxes, hover effects, and title clipping dynamically adapt to the resized control box.
  • Tested across windowed and fullscreen/borderless modes.

Changes

  • modernz.lua: Added window_close_button, window_min_button, and window_max_button options and dynamic geometry calculation.
  • modernz.conf: Added the new options to the default configuration template.
  • docs/USER_OPTS.md: Updated the options table in the documentation.

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