oliverschwendener / ueli

Cross-Platform Keystroke Launcher
https://ueli.app
MIT License
3.62k stars 239 forks source link

[Question] About the config file #1130

Closed kristus123 closed 3 months ago

kristus123 commented 3 months ago

the new config for workflows look like this:

"extension[Workflow].workflows": [ { "actions": [ { "id": "workflow-action-46f0ff87-ba2d-4bbc-99be-e86d134c0018", "args": { "url": "www.google.com" }, "name": "hi", "handlerId": "OpenUrl" } ], "name": "hi", "id": "workflow-bc023763-4622-4e73-b612-8d2bca122d28" } ],

is the 'id' just a random uuid?

i am asking because i want to programatically generated my config

oliverschwendener commented 3 months ago

Yes it's a random UUID generated with crypto.randomUUID(): https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID.

If you want to generate the config programmatically, just make sure that the id is unique among all the workflows. I also recommend prefixing them with the "workflow" or something similar so that they won't collide with other search result items.

kristus123 commented 3 months ago

thank you!

kristus123 commented 3 months ago

would it be possible to do some sort of js config? e.q you could use js to generate config, and have programmable config generation more built into ueli.

what do you think?

oliverschwendener commented 3 months ago

I don't understand what you mean.

kristus123 commented 3 months ago

this is what i hade done in order to use ueli. i don't think the ui is good, and it is easier to just write code to set up the config

for example:

for repo in repos_list:
    add_url_shortcut(
        name=repo + " - main page",
        url=f"https://github.com/kristus123/{repo}",
        icon="https://github.com/favicon.ico",
        search_prefix="g")

    add_url_shortcut(
        name=repo + " - commits",
        url=f"https://github.com/kristus123/{repo}/commits/master",
        icon="https://github.com/favicon.ico",
        search_prefix="gc")
kristus123 commented 3 months ago

would it be easy to natively support 'programatic config'? or else, if you would be interested, i could maintain a 'programatic config tool'

oliverschwendener commented 3 months ago

As far as I can see it already supports a programmatic config. Just make sure that the config file that you generate is valid. Or am I missing something?

kristus123 commented 3 months ago

yes it does support it, but i have to write a wrapper for it. which means everyone has to write their own wrapper

kristus123 commented 3 months ago

if they want to do the same as me

oliverschwendener commented 3 months ago

I'm completly fine with that.

kristus123 commented 3 months ago

that is respectable. would you be interested in collabing on a 'programatic config tool' that i could maintain and other people could use?

i guess the only thing i would need from you is to be able to refresh the config without having to restart ueli

kristus123 commented 3 months ago

and have you removed shortcuts?

how can i create a shortcut for opening a url?

and does 'websearchengines' still exist? that was quite useful: e.q i could make my own google search thing

oliverschwendener commented 3 months ago

With "I'm completly fine with that" I mean that I'm completly fine if everyone (who wants to populate the settings programmatically) has to find their own way how to do it.

everyone has to write their own wrapper

Not if you make your script available for others.

would you be interested in collabing

No, unfortunately not

the only thing i would need from you is to be able to refresh the config without having to restart ueli

I see, this is currently not possible. I'll see what I can do about this.

oliverschwendener commented 3 months ago

and have you removed shortcuts?

Yes

kristus123 commented 3 months ago

and have you removed shortcuts?

Yes

aaaaaaw. that is an insanely useful tool. will it be reintroduced later?

oliverschwendener commented 3 months ago

Shortcuts was replaced by Workflows, as they are very similar. The Workflows feature is basically the same, just with the ability to invoke multiple things at once, instead of just one thing. With Workflows you can achieve the exact same result as with Shortcuts.

kristus123 commented 3 months ago

what about search engine?

and does 'websearchengines' still exist? that was quite useful: e.q i could make my own google search thing

oliverschwendener commented 3 months ago

There is an extension called Web Search, supporting Google and DuckDuckGo, but there is currently no way to add your custom web search.

kristus123 commented 3 months ago

the only thing i would need from you is to be able to refresh the config without having to restart ueli

I see, this is currently not possible. I'll see what I can do about this.

if you could make it possible to refresh config without having to restart ueli, i can make my code public. right now it is super hacky to make it easy for me to change config. and people who use it will probably not wanna use it because of that

kristus123 commented 3 months ago

There is an extension called Web Search, supporting Google and DuckDuckGo, but there is currently no way to add your custom web search.

would it be possible to add that back? that is a super useful feature

oliverschwendener commented 3 months ago

Yes it is possible but I won't promise any timeline as this is a project that I work on in my free time.

kristus123 commented 3 months ago

that's very understandable. you should have a donation button!

probably many people using your tool in a professional setting

oliverschwendener commented 3 months ago

There is ;)

image