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

show hotkey triggers in the subtext of each macro #8

Closed
nikitavoloboev opened this issue Nov 30, 2016 · 12 comments
Closed

show hotkey triggers in the subtext of each macro #8

nikitavoloboev opened this issue Nov 30, 2016 · 12 comments

Comments

@nikitavoloboev
Copy link
Collaborator

Right now the subfields are currently quite useless as they just repeat the text from the main field. These ones :

2016-11-30 at 15 18

I wish instead it would show the hotkey trigger that is used for this macro. These ones :

2016-11-30 at 15 20

This would be absolutely phenomenal to have.

@iansinnott
Copy link
Owner

Yes, good point. I forgot about this since I never end up reading that field.

I'm actually planning a rewrite of this plugin, so that would be a good time to address this. One consideration is that they hot key can actually be empty, in which case i'm not sure what (if anything) I should display there.

@nikitavoloboev
Copy link
Collaborator Author

Should just display nothing, in this case. I think that's the best option. Would be nice to also display other triggers too, like typed text string trigger. In case there are multiple triggers, I guess either show the first one and have three dots or show all separated by comma.

@nikitavoloboev
Copy link
Collaborator Author

Just wanted to ask, if there whether you had some time to work on the update?

I would really love these additions and some kind of speed boost for macros shown. Right now there is some delay after trigger before results are displayed. :(

@nikitavoloboev
Copy link
Collaborator Author

Also would love to have improvements to search made. For example I wish if I had a macro names 'a: make markdown link from selection'

2017-01-11 at 03 46

This search would also match the name of it :

2017-01-11 at 03 46

Right now it returns nothing.

@iansinnott
Copy link
Owner

@nikitavoloboev I did start rewriting this recently... but then other became a priority. I would welcome a PR. The code in question is likely somewhere around here https://github.com/iansinnott/alfred-maestro/blob/master/main.php#L124

@iansinnott
Copy link
Owner

To your second point, it sounds like your suggesting something like fuzzy matching. The current implementation certainly doesn't do anything fancy, it just checks for the existence of the string you typed. I agree that fuzzy matching would be great. That was originally on my todo list for this project, but it works well enough as is that I decided the effort could be better spent elswhere. But after a rewrite would be a good time to revisit this and improve the searching logic

@iansinnott
Copy link
Owner

Looked in to this a bit more. It unfortunately looks like there is a tradeoff to be made due to the KM API. In this script I get all the macros known to KM. However, the results returned do not include the hotkeys. That info is simply not returned. However, if I remove the and getall from the script it does return the hotkeys.

So it seems that adding and getall tells it we don't care about hotkeys getting returned. That is unfortunate because without get all it only returns macros for which there is either a hotkey or trigger string. This means we're limited either way... but if all your macros do indeed have a hotkey or a trigger string then the latter limitation won't affect you.

@nikitavoloboev
Copy link
Collaborator Author

If I understood you right, you mean that with a new update, it won't actually show all the macros and only show ones that have a trigger on them?

That's actually quite bad for me as I have a lot of macros I call from applescript externally and still want to search though them.

@iansinnott
Copy link
Owner

Agreed that it sucks, but it's an issue at the KM API level. I'm still running KM 6 though. Perhaps it's changed in a more recent version.

@nikitavoloboev
Copy link
Collaborator Author

Just wanting to ask if this is perhaps possible? It would really make my life a lot better as I have too many macros and a quick refresher on the hotkey trigger would be amazing.

@iansinnott
Copy link
Owner

Yeah, I totally get the use case. But the tradeoff/issue with KM itself still exists. To reiterate, it seems we have to choose to either search through ALL macros but get no hotkeys, or search through ONLY macros with hotkeys but we get the hotkey string along with it.

I think being able to create macros without a hotkey trigger is a prime benefit of using alfred maestro, because hotkeys are limited and easy to forget, but now you just need to remember the title or your macro.

This is of course subjective, but I haven't found a way to get the best of both worlds (hotkeys and ALL macros). I'm definitely open to suggestions (or even better, pull requests 😄 ).


Actually, the creator of stairways might be open to modifying keyboard maestro itself. He did this once before to support the use case of alfred maestro. 🤔

@iansinnott
Copy link
Owner

Thanks @maltsev!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants