Skip to content

taskbar-vd-switcher: add "First letter of desktop name" label format - #3

Open
Cleroth wants to merge 1 commit into
sb4ssman:mainfrom
Cleroth:vd-switcher-name-initial
Open

taskbar-vd-switcher: add "First letter of desktop name" label format#3
Cleroth wants to merge 1 commit into
sb4ssman:mainfrom
Cleroth:vd-switcher-name-initial

Conversation

@Cleroth

@Cleroth Cleroth commented Sep 3, 2026

Copy link
Copy Markdown

Adds a Label format option, First letter of desktop name, to the Content group: each button shows the first letter of the name the desktop has in Task View (Home, Work, Media -> H W M). Unnamed desktops show their number.

  • initial option in Content.LabelFormat, parsed into VdLabelFormat::Initial via sio::LoadChoice like the others
  • First code point kept whole: surrogate pairs for emoji, plus a trailing BMP variation selector / Latin combining mark (é, ❤️). Not full grapheme segmentation: ZWJ sequences, skin tones and flags are cut after the first code point
  • ReadDesktopNames now returns "" for a desktop with no Name value instead of substituting Desktop N, so the label can fall back to the number; the tooltip and the [Layout] tokens: log line apply the Desktop N fallback themselves. No other consumers
  • Folder README and in-file readme updated in sync; @version untouched

Verification: compile-check, verify-readme-sync, verify-settings-order, exit-time-destructor-audit and submission-preflight all pass. The extraction was checked standalone against emoji / combining / VS16 / CJK / RTL / empty / whitespace-only names. Live-tested on Windows 11 with this branch loaded as a local Windhawk mod: the first-letter labels render and switching works.

Worth a look during your 2.0 live test: renaming a desktop in Task View. The slot the mod registers as destroyedIdx (8 on current builds, 9 on the older monitor-aware layout) is VirtualDesktopNameChanged per the public IVirtualDesktopNotification layouts, so a rename should already rebuild the grid; the only uncertainty is whether the registry Name value is written before that callback fires. If it lags, the label catches up on the next switch/create/destroy.

New Content.LabelFormat option `initial` shows the first letter of each
desktop's Task View name, keeping surrogate pairs and a trailing combining
mark or variation selector intact. Desktops that were never renamed have no
Name value and show their number instead. ReadDesktopNames now returns an
empty string for those so the label code can tell; the tooltip and the
token log keep saying "Desktop N".
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