-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Status: elapsed time in minutes, not humanize() #283
base: master
Are you sure you want to change the base?
Conversation
The `humanize()` function is not easy to parse, which is useful for piping watson's status into other applications (e.g.: a AwesomeWM widget).
Yep. |
Hey man, did you find some clean solution to this? I also have this inconvenience in my polybar module |
Well, the solution that I propose is clean, even if it adds a new flag. So, for now, I think it could be accepted as is. Or, if I have to find time to merge |
We'll wait for it then 😉 |
It would be nice to have flags For maximum non-human-readability and other reasons, the time should be returned in seconds. |
You're right, it's a great idea. The
You're right again, it was very hackish to have the time returned in minutes, seconds is way better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have few cosmetic changes, else 👏
Small typo fixed. Co-Authored-By: Julien Maupetit <[email protected]>
I worked on a widget for the AwesomeWM window manager (see my Github repo), which displays watson's status with an icon (if a frame is started, it's a "play" icon, if not it's a "stop" icon, like a music player), surrounded by a (partial) circle which is a (circular) progress bar (reaching the full circle after an hour).

I needed the value of the spent time in the frame, but parsing the result of "humanize()" (given by the
status
command) is not very convenient. I copied the current flag code and wrote a slightly different version, which outputs the duration with a single number, in minutes (which could then be tweaked in the widget to account for hours or days).A better version would probably merge the
-e
and-m
flag to allow a formatting string.