Skip to content

Add optional alphabetical sorting for context menu window list#127

Merged
edumucelli merged 2 commits into
edumucelli:masterfrom
castrapel:window-list-sort
May 28, 2026
Merged

Add optional alphabetical sorting for context menu window list#127
edumucelli merged 2 commits into
edumucelli:masterfrom
castrapel:window-list-sort

Conversation

@castrapel
Copy link
Copy Markdown
Contributor

When apps have many open windows, the right-click window list is hard to scan because windows appear in discovery order. This adds a "Window List Sort" option (Preferences > Behavior > Mouse) that lets users sort the list alphabetically by title.

Default behavior is unchanged: the option defaults to "default" (scan order). Setting it to "alphabetical" sorts window entries by title, case-insensitive. The left-click action
(toggle/cycle/most-recent) is a separate code path and is not affected.

  • New WindowListSort enum in config with "default" and "alphabetical"
  • Config plumbing: default constant, normalizer, dataclass field, post_init normalization (same pattern as LeftClickAction)
  • Sorting in MenuHandler._append_open_windows: only the right-click menu, not preview thumbnails
  • ComboBox in Preferences > Behavior > Mouse section with binding
  • POT regenerated with 3 new translatable strings
  • Backward compatible: missing key gets default; unknown key on older builds is silently ignored

Screenshot showing the results (Sorry for the filter, but you get the idea!)

image

When apps have many open windows, the right-click window list is
hard to scan because windows appear in discovery order. This adds
a "Window List Sort" option (Preferences > Behavior > Mouse) that
lets users sort the list alphabetically by title.

Default behavior is unchanged: the option defaults to "default"
(scan order). Setting it to "alphabetical" sorts window entries
by title, case-insensitive. The left-click action
(toggle/cycle/most-recent) is a separate code path and is not
affected.

- New WindowListSort enum in config with "default" and "alphabetical"
- Config plumbing: default constant, normalizer, dataclass field,
  __post_init__ normalization (same pattern as LeftClickAction)
- Sorting in MenuHandler._append_open_windows: only the right-click
  menu, not preview thumbnails
- ComboBox in Preferences > Behavior > Mouse section with binding
- POT regenerated with 3 new translatable strings
- Backward compatible: missing key gets default; unknown key on
  older builds is silently ignored
@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for dockingbar canceled.

Name Link
🔨 Latest commit 7196345
🔍 Latest deploy log https://app.netlify.com/projects/dockingbar/deploys/6a172411702d5d00089f137f

@edumucelli
Copy link
Copy Markdown
Owner

Hey @castrapel thanks again for this another contribution. I will try to take a look today (late already here) or at last tomorrow and let you know. Thanks!

Copy link
Copy Markdown
Owner

@edumucelli edumucelli left a comment

Choose a reason for hiding this comment

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

All good, thanks! Will need to cut a release, can do this later today.

@edumucelli edumucelli merged commit 9ec6f5b into edumucelli:master May 28, 2026
32 checks passed
@edumucelli
Copy link
Copy Markdown
Owner

@castrapel it went out on the latest release

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