Skip to content

Launcher - switch to an app's open window instead of relaunching - #31

Merged
cpow merged 3 commits into
typecraft-dev:mainfrom
gcaraciolo:focus-open-app-windows
Oct 29, 2026
Merged

cpow merged 3 commits into
typecraft-dev:mainfrom
gcaraciolo:focus-open-app-windows

Conversation

@gcaraciolo

@gcaraciolo gcaraciolo commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Picking an app that's already open starts a second instance — the app action always called appLibrary.launch, which doesn't look at existing windows.

Coming from Raycast, opening Slack means going to Slack; a new instance should be the deliberate choice, not the default.

  • Enter switches to the app's most recently used window, workspace included, and launches only when none is open
  • Shift+Enter ("Open New Window" in Ctrl+K) always starts a new instance
  • Web apps and apps whose window class differs from their desktop entry are recognised too
  • Focus lands after the launcher closes, so Hyprland doesn't hand it back to the previous window
  • On Omarchy 4.5's floating workspaces the window comes to the top, and one minimized to the dock comes back first, the way the dock does it

@gcaraciolo

Copy link
Copy Markdown
Contributor Author

I was using my own switcher, but yours has better ui. I was used to macos behavior too of using alt+space for app switching all the time. never user mouse to nav between apps.

@gcaraciolo gcaraciolo closed this Oct 26, 2026
@gcaraciolo gcaraciolo reopened this Oct 26, 2026
cpreston321 added a commit to cpreston321/oma-cast that referenced this pull request Oct 26, 2026
@cpow

cpow commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

hey there @gcaraciolo I like this change! wanna fix the conflict and I can merge?

gcaraciolo and others added 3 commits October 29, 2026 09:02
Enter on an app now focuses its most recently used window, which also
switches to its workspace, and launches only when no window is open.
Windows match by desktop id, StartupWMClass, or the URL Chromium/Brave
web app classes are built from. Shift+Enter ("Open New Window") always
starts a new instance.

The focus waits for the launcher's layer to unmap: Hyprland refuses
focus while it holds exclusive keyboard focus and refocuses the previous
window when it goes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
On Omarchy 4.5's floating workspaces focus doesn't raise a window, so
switching to an open app could leave it behind the others. After focus
lands the window is now brought to the top, and one minimized to the
dock is first moved back to the current workspace, the same way the
dock does it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cpow
cpow force-pushed the focus-open-app-windows branch from 1be6a36 to 8a89b66 Compare October 29, 2026 13:02
@cpow
cpow merged commit 582bc73 into typecraft-dev:main Oct 29, 2026
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