Skip to content

MacOS improvement#20

Closed
itsmaybetokyo wants to merge 19 commits into
stianhoiland:mainfrom
itsmaybetokyo:main
Closed

MacOS improvement#20
itsmaybetokyo wants to merge 19 commits into
stianhoiland:mainfrom
itsmaybetokyo:main

Conversation

@itsmaybetokyo
Copy link
Copy Markdown

🎨 macOS Style Alt-Tab Switcher

New Features:

  • Larger icons (64px → 96px) for better visibility
  • 🔄 Rounded corners (30px radius) matching macOS style
  • 📏 Bigger switcher (128px → 180px height)
  • 🖼️ Better DPI support for high-resolution displays
  • 🎯 Consistent rendering between debug and release modes

Fixes:

  • 🐛 Fixed white background on icons in release mode
  • 🐛 Fixed black background color in release builds
  • 🐛 Unified configuration values across build types

itsmaybetokyo and others added 9 commits June 7, 2025 12:58
… 180px), iconos más grandes (64px → 96px), esquinas redondeadas personalizadas (30px), mejor DPI, elimina bordes Windows
… estáticas problemáticas, usa fondo transparente para iconos, corrige fondo negro
… o es el escritorio, selecciona la siguiente app real
…appears as separate icon with descriptive names - Window titles used for better identification (e.g., file paths for explorer) - Removed app grouping logic to display all windows individually
stianhoiland added a commit that referenced this pull request Oct 4, 2025
Highlights

- Fix bug causing cmdtab to ask about autorun every time cmdtab autoruns
- Make window switching more robust and fix some fullscreen issues
- Make code easier to read for new contributors
- Add "--debug" flag

Changelog

- make UWP strings non-const (annoying compiler warning, and it wasn't semantically correct anyway)
- let PrintWindowX say "null window" even if compiled with _DEBUG
- style fixes (indentation, comments, whitespace, sizeof)
- fix typo "AppsUsesLightTheme" -> "AppsUseLightTheme" (5345fb8 by @german-one, #18)
- rename struct config -> struct ini
- rebrand "switchApps" and "switchWindows" config options to "enabled" field on hotkeys
- introduce unused/to-be-implemented "groupByApp" config option
- made some slight changes to ease reading from top-to-bottom, especially for new contributors
  - lift mutex and hook handles from main-function to static file-scope variables for consistency
  - refactor initialization code
  - lift initialization from bottom of file to top of cmdtab impl
  - put "Config" amongst other file-scope vars and drop static init
- fix detecting "--autorun" flag
- add "--debug" flag
- print leaks on exit
- actually read Config vars for switcher appearance  (a7a96fc by @itsmaybetokyo, #20)
- don't special case ShowSwitcher, just use same logic as other ShowWindow code (fixes some fullscreen issues)
- remove fancy key name printing that didn't work
- refactor hotkey booleans
- remove commented-out call to WM_SYSCOMMAND, SC_KEYMENU
- add ReceiveLastInputEvent before every and any call to ShowWindowX for consistency and robustness
- add missing returns to OnEventFunctions
- use correct signature for window proc (and remove the cast in InitSwitcherWindow that hid it)
- add %USERNAME% to autorun cmd in README.md so that it's copy/pastable
- add `zip -9` to Makefile release recipe

Errata for 0da13fd, missing attribution:
- don't ReleaseDC in in OnWindowPaint (hmm, why?) (5345fb8 by @german-one, #18)
stianhoiland added a commit that referenced this pull request Oct 9, 2025
- log message when minimizing windows
- remove ill-formed config setting "switcherHeight"
- rename config setting "iconWidth -> iconSize"
- add yet unused config setting "fontSize"
- clarify comments "main window" -> "switcher window"
- implement "groupByApp" option
  - Switcher entries use window title instead of app name when "groupByApp" is false
  - I'm not entirely happy with the implementation, but it works just fine and will stay until (if) I do a big refactor
  - Inspired by contributors @itsmaybetokyo (#20) and @prechelt (#22). Thank you!
- debug: show nice big message box on exit if there were memory leaks
- implement SelectSameApp for Alt-Tilde/Backquote functionality when "groupByApp" is false
- fix operator precedence potentially leading to wrong scaling?
- calculate switcher height from iconSize and vertical margins
- rename BACKGROUND -> WIN_COLOR_BG and TEXT_COLOR -> TXT_COLOR
- add yet unused brush with accent color
- show window count in app name when > 1
- un-special case ShowSelectedWindow
  - Newly implemented SelectSameApp used for window (not app) switching when "groupByApp" is true causes UI changes, so ShowSelectedWindow must now also redraw switcher (inline with ShowSelectedApp)
- swap Config.wrapbump and keyRepeat for microscopically, statistically more performant short-circuting?
- move Deactivation comment for clarity
- hotkeys that hide the switcher would bleedthrough their corresponding keyUp event to foreground windows
  - Hack input bleedthrough for keys that hide the switcher window by making those hotkeys register on keyUp instead of keyDown
  - This should eventually have a proper solution which makes sure that all consumed keyDowns consume a matching subsequent keyUp, so that all hotkeys can continue to be keyDown
- more thorough code warmup by calling UpdateSwitcher (data+gui) instead of UpdateApps (just data)
  - Ref: @german-one (#18), "Ensure the drawing is initialized, it might be instantly used in OnWindowPaint()")
- Makefile: make the 'run' and 'debug' targets/recipes a little easier to use by first killing cmdtab.exe
- Makefile: add a 'start' target/recipe which starts the scheduled, elevated cmdtab task, as advised in the README.md
stianhoiland added a commit that referenced this pull request Oct 9, 2025
- implement "groupByApp" option
  - Switcher entries use window title instead of app name when "groupByApp" is false
  - I'm not entirely happy with the implementation, but it works just fine and will stay until (if) I do a big refactor
  - Inspired by contributors @itsmaybetokyo (#20) and @prechelt (#22). Thank you!
- implement SelectSameApp for Alt-Tilde/Backquote functionality when "groupByApp" is false
- un-special case ShowSelectedWindow
  - Newly implemented SelectSameApp used for window (not app) switching when "groupByApp" is true causes UI changes, so ShowSelectedWindow must now also redraw switcher (inline with ShowSelectedApp)
stianhoiland added a commit that referenced this pull request Oct 9, 2025
- implement "groupByApp" option
  - Switcher entries use window title instead of app name when "groupByApp" is false
  - I'm not entirely happy with the implementation, but it works just fine and will stay until (if) I do a big refactor
  - Inspired by contributors @itsmaybetokyo (#20) and @prechelt (#22). Thank you!
- implement SelectSameApp for Alt-Tilde/Backquote functionality when "groupByApp" is false
- un-special case ShowSelectedWindow
  - Newly implemented SelectSameApp used for window (not app) switching when "groupByApp" is true causes UI changes, so ShowSelectedWindow must now also redraw switcher (inline with ShowSelectedApp)
stianhoiland added a commit that referenced this pull request Oct 9, 2025
- implement "groupByApp" option
  - Switcher entries use window title instead of app name when "groupByApp" is false
  - I'm not entirely happy with the implementation, but it works just fine and will stay until (if) I do a big refactor
  - Inspired by contributors @itsmaybetokyo (#20) and @prechelt (#22). Thank you!
- implement SelectSameApp for Alt-Tilde/Backquote functionality when "groupByApp" is false
- un-special case ShowSelectedWindow
  - Newly implemented SelectSameApp used for window (not app) switching when "groupByApp" is true causes UI changes, so ShowSelectedWindow must now also redraw switcher (inline with ShowSelectedApp)
stianhoiland added a commit that referenced this pull request Oct 9, 2025
- implement "groupByApp" option
  - Switcher entries use window title instead of app name when "groupByApp" is false
  - I'm not entirely happy with the implementation, but it works just fine and will stay until (if) I do a big refactor
  - Inspired by contributors @itsmaybetokyo (#20) and @prechelt (#22). Thank you!
- implement SelectSameApp for Alt-Tilde/Backquote functionality when "groupByApp" is false
- un-special case ShowSelectedWindow
  - Newly implemented SelectSameApp used for window (not app) switching when "groupByApp" is true causes UI changes, so ShowSelectedWindow must now also redraw switcher (inline with ShowSelectedApp)
itsmaybetokyo and others added 10 commits November 13, 2025 20:34
…y at 156px by default for better visibility - Automatically scales down only when needed to fit screen width - Adjusted switcher height to 260px for better proportions - Minimum icon size of 48px when scaling is required
…und height to 280px - Added Windows blur-behind effect for modern glass appearance - Enabled layered window with semi-transparency - Simplified app names to show only program name (e.g., 'Cursor' instead of full window title) - Updated colors for better contrast with blur effect - Made border more subtle to complement blur
… vertical margin now follow icon scaling while respecting 156px/280px base - Increased alpha to make dock background feel more solid - Darkened background and slightly dimmed text to better match dock look
Added a note about the fork being made with AI and updated the image.
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