Skip to content

Add configurable max title length - #2

Open
thamrx wants to merge 1 commit into
namchind:mainfrom
thamrx:max-title-length
Open

thamrx wants to merge 1 commit into
namchind:mainfrom
thamrx:max-title-length

Conversation

@thamrx

@thamrx thamrx commented Sep 2, 2026 •

Copy link
Copy Markdown

Closes #1.

Adds a "Title length" row to Preferences: a "Cut after" checkbox plus a slider. When enabled, the window title is cut with an ellipsis after N characters, before layout.

  • New preferences chipTitleLimitEnabled (default on) and chipMaxTitleChars (5..150 in steps of 5, default 50). Both are part of the style token so visible chips restyle live, and both are covered by Restore Defaults.
  • Unchecking "Cut after" disables the character limit; the chip width is then the only limit, as before.
  • Applied in ThumbnailLabelView.configure via ChipStyle.limitedTitle; works in both the cut and wrap modes. The app name is never cut.
  • Preferences window is 40 pt taller to fit the extra row.

The chip width cap still applies, so this can only shorten a title, never widen the chip beyond the thumbnail.

Built and tested on macOS 26 (Darwin 25.6) with Swift 6.3.

Window titles were only cut by the available chip width, which depends on
the thumbnail size, so there was no way to control where the ellipsis
lands. Add a "Title length" row to Preferences with a "Cut after"
checkbox and a slider (5..150 characters, default 50) that cuts the
window title with an ellipsis after N characters before layout.
Unchecking the box disables the character limit entirely. The app name
is never cut.
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.

Make the title cut-off length configurable

1 participant