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

Any tips on how to write custom shell-scripts? #275

Open
poppingtonic opened this issue Feb 25, 2017 · 9 comments
Open

Any tips on how to write custom shell-scripts? #275

poppingtonic opened this issue Feb 25, 2017 · 9 comments

Comments

@poppingtonic
Copy link

I can't see any documentation.

@psukys
Copy link
Contributor

psukys commented Feb 25, 2017

Can you elaborate on what "custom shell-scripts" are in the scope of this project?

@kamilprusko
Copy link
Collaborator

kamilprusko commented Feb 25, 2017

Commands work pretty much the same as custom keyboard shortcuts in your system settings, only commands are executed on timer events.

A command needs to point to an executable (optionally with params), shell syntax like &&, >> will be ignored or treated as text. If you want to use bash you need to write your own scripts.

To start playing with custom actions I suggest adding a command

echo $(state) ":" $(triggers)

toggle all triggers, and run gnome-pomodoro in a terminal

$ gnome-pomodoro --quit
$ gnome-pomodoro

@kamilprusko
Copy link
Collaborator

I don't think that putting info in a wiki or website will be effective. Ideally, this feature should be self-explanatory - I'm open to suggestions. Or maybe add usual help window/pages in Mallard?

@NicolasWebDev
Copy link

Personally, I think that to begin with a really simple wiki page on the subject would help HUGELY as a last resource, to avoid people from opening any more issues on this topic.
Once this is done, maybe it could be linked to in the program itself.

Only the small trick you gave above helped me understand how to use it. I had problems with the shell syntax not working, so I moved all the logic to a during_pomodoro.sh and a during_pause.sh.

@ginkgomzd
Copy link

I was initially stumped because it is a pretty common paradigm that you can manage preferences from the plugin management. A gear icon next to enable/disable, for instance.

Finally, I noticed that enabling the plugin adds command management to the main preferences.

@dmhowcroft
Copy link

Thank you @ginkgomzd! I also missed this detail. I wish there was more documentation for this :)

@josehbez
Copy link
Contributor

Hi @poppingtonic . I write a simple custom action gnome-pomodoro-tracking that time tracking with external providers. I hope it will be of great help.

@subhasishdas159
Copy link

it's still relevant

@josehbez
Copy link
Contributor

josehbez commented Jan 3, 2022

I don't think so.

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

No branches or pull requests

8 participants