-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add support for "pausing" tracking? #5
Comments
Hm, a paused entry would actually be two entries, one stopped at a certain time and a following one started at a later time. So basically you'd like to have a way to stop a running entry and then start a new tracker (on the same project/task) without having to manually specify all the details again, right? What I could think of is an alias to |
That's a good way to think about it.. Probably just need to be a little careful to capture/re-run the last track command, excluding things like "--begin" if they were specified. |
nothing to do with this issue and perhaps not the best place for this, as a result, but, i just wanted to let you know that I've been using zeit steadily for the past couple months or so, and found it to be really helpful.. thanks for sharing this :) |
@khughitt thank you, appreciate it, glad you enjoy it! Haven't had much time lately to push |
Heh. No worries! To be honest, it's been working great for me, so you aren't holding me up. In case it helps, here are some aliases I defined to save a bit of time:
I still need to get better about remembering to start/stop zeit sometimes (I tend to use |
Hi @khughitt; I wrote the following alias that you may find handy:
Example use case: you go for lunch/a walk/a nap for 28 minutes: Afterwards, you return to your Mac and type:
This will pause the currently running task at the current time -28 minutes, and immediately restart it. This works for me as I only have one task. Not sure how it would work with multiple tasks. |
Thanks, @harnoorsaini ! Great idea. Here is a version that works for me on linux:
It should at least work for times <= 59 mins. |
@khughitt, oh sorry should have mentioned it's for macOS. And I have another of my aliases in there. If you can pass "M" flag into date it should work for any number of minutes? |
@harnoorsaini No worries! You did mention you are on a Mac :) Thanks for the suggestion! |
If you can think of a simple way to support "pausing", that could be pretty useful.
Probably just a single command "zeit pause" to toggle it on/off.
On possible approach might be to create create a "pausedCounter", and then, after each pause/unpause, add - to the counter.
Then when
zeit finish
is called, you can simply check if the counter is non-zero, and if so, subtract that time from the full event duration.The text was updated successfully, but these errors were encountered: