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

Auto continue after break #8

Open
flanaras opened this issue Feb 7, 2018 · 12 comments
Open

Auto continue after break #8

flanaras opened this issue Feb 7, 2018 · 12 comments

Comments

@flanaras
Copy link
Contributor

flanaras commented Feb 7, 2018

Hello,

I would like to ask if there is meant to be an auto continue function after breaks as it is while running on gnome.
After the break time has passed the pomodoro doesn't start again by itself. It is so or do I have a problem on my system?

i3 version 4.14.1 (2017-09-24) © 2009 Michael Stapelberg and contributors
Pomodoro 0.13.4

Philip

@kantord
Copy link
Owner

kantord commented Feb 7, 2018

Hello,

that's indeed how it's designed to behave. I usually leave my desk during the break, and don't return in 5 minutes sharp. Thence designing it to auto-continue didn't make much sense to me (I don't want to return to a Pomodoro that has been running for a minute or two already). However if this feature would be useful to you, I'll be glad to accept a pull request ;-)

Do you have a suggestion for a possible implementation?

@flanaras
Copy link
Contributor Author

flanaras commented Feb 7, 2018

Thanks for your response,

Yes I definitely agree with you. I was thinking something like the way it runs on gnome, that i has an overlay and listens for any keyboard or mouse events and after that it starts the next pomodoro.
I don't know why it doesn't work like that by default like that on i3.

@kantord
Copy link
Owner

kantord commented Feb 7, 2018

I don't know why it doesn't work like that by default like that on i3.

Do you mean gnome-pomodoro resumes automatically that way under gnome? I've only tried it with i3

@flanaras
Copy link
Contributor Author

flanaras commented Feb 7, 2018

Yes, indeed that is the default behavior.

@kantord
Copy link
Owner

kantord commented Feb 7, 2018

wow, I didn't know. I took a glimpse at gnome-pomodoro's source and I found this: https://github.com/codito/gnome-pomodoro/blob/797be15a5c674a663c7b256f28398a709946c69b/plugins/gnome/gnome-plugin.vala

"pause-when-idle" seems to be handled in gnome-plugin, and in gnome-plugin.vala you see this line:

this.can_enable = GLib.Environment.get_variable (CURRENT_DESKTOP_VARIABLE) == "GNOME";

So it seems gnome-pomodoro is designed to disable this feature altogether if the environment is not gnome.

@kantord
Copy link
Owner

kantord commented Feb 17, 2018

@flanaras do you have a request or suggestion as per how this issue should be resolved?

@flanaras
Copy link
Contributor Author

@kantord There could be an event listener, listening for keyboard or mouse events. When a pomodoro break is done, start the next one on the next input recorded.

@flanaras
Copy link
Contributor Author

Wouldn't this defeat the purpose of the pomodoro technique?

@jakob1379
Copy link
Contributor

Wouldn't this defeat the purpose of the pomodoro technique?

Sorry - I misunderstood what you first meant. But see my proposed solution in the pull request, which does exactly what you proposed ^_^

@uncle-betty
Copy link

uncle-betty commented Feb 18, 2020

Oh, cool, you guys solved this problem already...

I also looked into this a while back and came up with a slightly different solution for myself: a Python daemon that emulates the functionality of the org.gnome.Mutter.IdleMonitor interface provided by the Mutter window manager, which gnome-pomodoro uses (at least on Ubuntu 18.04).

FWIW - https://gist.github.com/uncle-betty/dc0a1a0ecc51b2b1661e6e1ebc5bf7ae

My approach seems a little over-engineered, now that I see your solution. :) Also, I didn't know about X11IdleMonitor and thus poll by invoking /usr/bin/xprintidle.

@jakob1379
Copy link
Contributor

Well I have to make a little revision and make a new pr as I did some mistakes and kantor came with some better namings 🤣

@jakob1379 jakob1379 mentioned this issue Feb 18, 2020
@jakob1379
Copy link
Contributor

Have anyone tried compiling i3-gnome with the source modded to just a static true and see if it works?

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

4 participants