-
Notifications
You must be signed in to change notification settings - Fork 18
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
Transform script into a daemon #10
Comments
Start, stop, restart, start with different times can already be done with the current version by setting the correct timestamp. Synchronization between several machines via Dropbox is already possible by letting Dropbox handle the session file. Also, in which situation would we want pomodoro to keep running while script is down? |
Start/StopThe only way to stop a pomodoro right now would be to delete the session file. I don't think it's a good idea to have a shortcut bound to "rm ~/.pymodoro/session_file". DropboxI know. That's what I meant. Pomodoros keep running while the script is downI can close the script when the Pomodoro is down to 20 minutes, open it after five minutes and it will show fifteen remaining minutes. The time is not handled by the script itself. That's great. Different timesI think the advantage of a daemon would be the possibiltiy to change its behaviour while it is running. Let's say I'm not doing Pomodoros (25 min.) for the moment but I'd like the script to count the time until my noodles (10 min.) are done. I could type something like "pymodoro.py 10" in any command line and it would switch the session duration of the running instance in the bar to ten minutes. Right now there is no way to do this without restarting Xmobar. |
For stopping, you can set the session_file time to 25 minutes earlier. A simple way to accomplish this is to set the time with touch -r pomodoro.py session_file which should work most of the time (except within the first 25 minutes after which the user download the entire script). For starting a different time, it is quite simple, simply add a command mode for pymodoro.py pymodoro.py touch 10 This should set the session file so it has 10 minutes left. This method can also extend to handling Stopping a pomodoro session: pymodoro.py touch -1 |
You're right. I hadn't thought about that. I'm still not completely convinced, though. The progress bar would not reflect the change. |
I do agree that there are other ways than daemonizing (see also the suggestions in Issue #4) but don't you think a daemon would be comfortable? |
I think daemonizing will eventually be realized. I don't feel that the complexity of the feature-set requires this yet. |
I added support for setting times in the session file (closes Issue #4). |
Would provide a way to communicate with the running script:
Session file would no longer be required but I would still keep it because of its obvious features:
Other way to implement both: Timestamp in a configuration file.
Daemon template: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
The text was updated successfully, but these errors were encountered: