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

Is it possible to use a URI scheme to start the timer? #56

Closed
andreatitolo opened this issue Aug 1, 2023 · 7 comments
Closed

Is it possible to use a URI scheme to start the timer? #56

andreatitolo opened this issue Aug 1, 2023 · 7 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@andreatitolo
Copy link

Hi! Thanks for the app :) I am using it daily by now, and I don't think I could use anything else.

I was wondering if there is built-in support (or you would consider adding support) for custom URI scheme to control the app from the command line. Something along the lines of what KeepingYouAwake did (newmarcel/KeepingYouAwake#16).

e.g.

open tomatobar://start
open tomatobar://stop

In this way, one could also control the app from things like Alfred or Raycast, which could be a big plus.
Of course, I have no idea how complicated it is to implement something like this or if it is feasible at all for the app :)

@ivoronin ivoronin added the enhancement New feature or request label Sep 5, 2023
@ivoronin
Copy link
Owner

ivoronin commented Sep 5, 2023

Implemented in 1c5f607

@andreatitolo
Copy link
Author

Mmmh, I'm getting an error when using open tomatobar:///startStop, or any other variation (e.g. open tomatobar:///start)

No application knows how to open URL tomatobar:///startStop (Error Domain=NSOSStatusErrorDomain Code=-10814 "kLSApplicationNotFoundErr: E.g. no application claims the file" UserInfo={_LSLine=1569, _LSFunction=runEvaluator})

@ivoronin ivoronin added the bug Something isn't working label Sep 6, 2023
@ivoronin
Copy link
Owner

ivoronin commented Sep 6, 2023

Have you installed latest prerelease build?

@andreatitolo
Copy link
Author

Thank you for your patience, I downloaded the latest prerelease build, and I managed to start the app correctly. However, does the URI allow to start the timer? (and not just the app). I tried either open tomatobar:///startStop and open tomatobar:///start but the timer didn't start.

I can open a different issue if you prefer :)

@ivoronin
Copy link
Owner

You should use only two slashes in this URLs: open tomatobar://startStop

@andreatitolo
Copy link
Author

Thanks, I completely missed that!
I created a workflow to interact with your app (https://github.com/andreatitolo/tomatobar-alfred), thanks for the amazing app :)

@cdr-chakotay
Copy link

Hey I am seeing the same error despite using two slashes!:

open tomatobar://startStop No application knows how to open URL tomatobar://startStop (Error Domain=NSOSStatusErrorDomain Code=-10814 "kLSApplicationNotFoundErr: E.g. no application claims the file" UserInfo={_LSLine=1608, _LSFunction=runEvaluator}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants