kando
kando copied to clipboard
Support for application-title dependent menus
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.
That's a good idea and should definitely be possible to implement!
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.
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!
Btw, you can also join our Discord server to discuss this in detail!
https://discord.gg/hZwbVSDkhy
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.
https://github.com/kando-menu/kando/assets/5238901/cbc91851-9eed-40c0-ac44-c0d0350b8fd9
Just got a try to Kando, can't wait to see this feature in life. It will gonna boost all my workflows 🖤
I started working on the editor for the conditions: