Skip to content

Generalizes launching a new instance of dock applications with Shift + Alt + 1/2/..#142

Merged
dhh merged 2 commits into
basecamp:masterfrom
melopilosyan:generalize-launching-new-app-hotkeys
Aug 2, 2024
Merged

Generalizes launching a new instance of dock applications with Shift + Alt + 1/2/..#142
dhh merged 2 commits into
basecamp:masterfrom
melopilosyan:generalize-launching-new-app-hotkeys

Conversation

@melopilosyan
Copy link
Copy Markdown
Contributor

Alacrity and Chrome get special status for the ability to launch a new instance. I believe the Dock platform should provide equal facilities to all residents. 🙂

Besides, the custom shortcuts are tied to the position and the application beyond the Dock's influence. The Alt+# and Shift+Alt+# friendship will be forever broken if I install, say, Brave in second spot.


Also changes the behaviour of the Alt + 1/2/3 shortcuts to launch/show and minimize applications with the same keystroke.

@dhh
Copy link
Copy Markdown
Member

dhh commented Jul 27, 2024

This is great. Could you rebase, and then we also need to add a migration to remap existing omakub installations.

@melopilosyan melopilosyan force-pushed the generalize-launching-new-app-hotkeys branch from dc07aa0 to 77190a7 Compare July 29, 2024 21:23
…+ Alt + 1/2/..

Removes specific key bindings for launching new Alacrity and Chrome instances.
Sets the Dock icons click action to "focus-minimize-or-previews".
Meaning: launch or focus (if minimized) or minimize (if active) or show
previews (if minimized and there are multiple running instances of the app).
Also applies to the Alt + 1/2/3 bindings.
@melopilosyan melopilosyan force-pushed the generalize-launching-new-app-hotkeys branch from 77190a7 to b6560cb Compare July 29, 2024 23:35
@melopilosyan melopilosyan force-pushed the generalize-launching-new-app-hotkeys branch from b6560cb to da9c4b0 Compare July 29, 2024 23:45
@melopilosyan
Copy link
Copy Markdown
Contributor Author

Rebased and added the migration.

Will be happy to implement further suggestions, if any.

@dhh dhh merged commit ee77989 into basecamp:master Aug 2, 2024
@dhh
Copy link
Copy Markdown
Member

dhh commented Aug 2, 2024

Hmm. I can't get this working on my setup machine after running the migration. None of the hotkeys work. Not alt+1 or ctrl+alt+1. Trying to run this on a fresh install, but something isn't right.

@dhh
Copy link
Copy Markdown
Member

dhh commented Aug 2, 2024

Hmm, yeah, hotkeys don't work on a new install either.

@melopilosyan
Copy link
Copy Markdown
Contributor Author

My bad.

I'm using a different setup based on Omakub. Thought it would be nice to port this behavior here. But didn't think through the differences. And tested only the migration in VM based on my setup.

Long story short, for the app-hotkey family of key bindings to work, the ubuntu-dock extension has to be enabled. Since that's where these mappings get registered. And Omakub disables ubuntu-dock.

This is what the dock panel looks like on my desktop, centred at the bottom.

2024-08-03_02-09

It's only visible on the primary display and disappears when application windows overlap its area, including in full-screen mode. In other words, it's there but doesn't get in the way. Plus I can use the app hotkeys.

Let me know if you'd like to try it. I'll open a new PR. This time properly tested in the context of Omakub.

burno-lima pushed a commit to burno-lima/omakdot that referenced this pull request May 15, 2026
…g-new-app-hotkeys

Generalizes launching a new instance of dock applications with Shift + Alt + 1/2/..
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