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

TimeWarrior block #1703

Open
notramo opened this issue Jan 18, 2023 · 4 comments · May be fixed by #1878
Open

TimeWarrior block #1703

notramo opened this issue Jan 18, 2023 · 4 comments · May be fixed by #1878

Comments

@notramo
Copy link

notramo commented Jan 18, 2023

Please add a TimeWarrior block for easy visibility of currently tracked tags.

@Mice7R
Copy link

Mice7R commented Feb 1, 2023

I also wanted this, and yesterday I worked on it. I made a simple working prototype that displays the time of the current task.
https://github.com/Mice7R/i3status-rust/tree/issue_1703_timewarrior

The block has two options: interval and format. And the formatting accepts: icon, elapsed, tags, annotation.
It's just a prototype right now so everything is subject to change.

Take a look at it @notramo and tell me what you think. I'll make a PR once I clean the code a bit and add docu and maybe add something else.

@notramo
Copy link
Author

notramo commented Feb 1, 2023

@Mice7R, thanks for your work. I haven't been able to test it, because I couldn't compile it (Void Linux currently ships Rust 1.64, which is unable to compile a dependency).

Could you also add stop/continue functionality if it's not too difficult? Clicking on the block would stop the timer if it's running (timew stop), and continue with the previous tags if it's stopped (timew continue). It could shell out to the timew executable.

How does the block behave after suspend/resume. Does it need any special code to handle?

@Mice7R
Copy link

Mice7R commented Feb 1, 2023

I've been using it myself today and I will add the stop and continue, I also find it useful.

As for the suspend/resume it uses the task startdate to calculate elapsed time, which is the same behaviour as timew. If you want for the time to not count whilst suspended you'll have to stop the task before suspension.

@Mice7R
Copy link

Mice7R commented Apr 25, 2023

I've been using this for a few months already and I kind of forgot of this issue. Anyway, I've added the missing documentation and made the PR #1878 .

@MaxVerevkin MaxVerevkin linked a pull request Apr 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants