Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for application-title dependent menus #169

Closed
Crunchbits opened this issue Aug 22, 2023 · 7 comments · Fixed by #480
Closed

Support for application-title dependent menus #169

Crunchbits opened this issue Aug 22, 2023 · 7 comments · Fixed by #480
Labels
feature request New feature or request

Comments

@Crunchbits
Copy link

I know that there are plans to implement application dependent menus, but I think it would also be nice to add support for application-title dependent menus. That is to say different menus depending on the title of the focused program window. For example, this would be helpful for having different menus depending on the current website you are on(such as google, youtube, gmail, etc.)

If implemented, the title detection could have different options where the text you configure has to either match exactly, show at the start, or show at the end of the focused window's title.

@Schneegans Schneegans added the feature request New feature or request label Aug 22, 2023
@Schneegans
Copy link
Contributor

That's a good idea and should definitely be possible to implement!

@hamishC0
Copy link
Contributor

until you can do this i have a solution that I've used. Using BTT you can set a keyboard shortcut to trigger another keyboard shortcut with conditions. Set a condition that if the focused window title contains "string_of_your_choice" it will trigger a certain keyboard input. then set different menus in the menus config file setting shortcuts for each one.

for example when i hit right option in finder BTT triggers Cmd+Ctrl+M and that brings up a finder specific menu. When I hit right option in any other application it triggers Cmd+Ctrl+K which brings up a global menu.

@Schneegans
Copy link
Contributor

This will be definitely one of the next issues to tackles. @ClearStaff volunteered to look into this, so I'll add some information here! I think that this can be implemented in two separate pull requests:

1: The backend side of things

Each backend already brings the possibility to query the name of the currently running app and window. So this is already implemented. We "only" need to choose the correct menu based on this. Currently, the menu for a given shortcut is chosen here (it simply takes the first one). The info object in this line contains the name of the window and app of the currently focused window. So some refactoring will be required to have the information where we need it. But it should be possible.

And of course, we need to add a setting to the menu for the app-name filter. The menu type is defined here.

2: The menu-editor side of things

This will be not exactly easy. However, I already posted mockups of how this could look like several months ago: https://storage.ko-fi.com/cdn/useruploads/34eab0ee-cb9f-4353-a71c-ba7003091189_editor1.png

Maybe we could implement this in a similar fashion, but maybe we have better ideas!

@Schneegans
Copy link
Contributor

Btw, you can also join our Discord server to discuss this in detail!

https://discord.gg/hZwbVSDkhy

@ClearStaff
Copy link
Contributor

Progress info: i already have a working prototype on my local PC, i have to separate changes into smaller ones and then discuss changes with Schneegans. So if going from prototype to release will be as smooth as creating prototype you can expect this feature to land in some nearby future.

2024-06-10_10-39-34.mp4

@cogscides
Copy link

Just got a try to Kando, can't wait to see this feature in life. It will gonna boost all my workflows 🖤

@Schneegans
Copy link
Contributor

I started working on the editor for the conditions:

image

@Schneegans Schneegans linked a pull request Jun 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants