-
Notifications
You must be signed in to change notification settings - Fork 133
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
Display date in pueue status
#212
Comments
I guess one could do this with a few simple rules.
It's just a proposal, I guess we would just have to see at how it looks. This logic is solely in the pueue client, so we don't have to touch any daemon/shared library logic. Edit: |
I like what you've proposed. As far as date formatting goes, I think it would be safe enough to use ISO-8601 formatting |
Let's just go with
I don't think we need an option to configure this. Unless somebody complains and comes up with a good use-case, there's no need to increase the code's complexity :) |
FYI I started working on this. |
One possible alternative which could be a nice replacement for the |
I just tried out the changes in #214 and it looks great to me! Thank you very much! I think I personally would lean toward no newline between the date and time. I've noticed that everything will normally be on a single line if you have a wide terminal, but if you have a skinnier terminal the command and path will wrap across multiple lines (but not the start/end date if the newline is removed from the format string). I think it would be nice if that wrapping behavior worked similarly for the start/end columns: on wide terminals, keep date and time on a single line; on smaller terminals, show date and time on separate lines. I tried mucking around with https://docs.rs/comfy-table/3.0.0/comfy_table/enum.ColumnConstraint.html#variant.MaxWidth to get that working. I'm not sure if that's the right kind of solution (new to rust, never used comfy-tables etc). Thoughts? |
Yep, the constrains could be a good solution for this. Something like MaxPercent(15).
A full 1080p screen with (at least for me) normal font size has about 240 Columns. Worst case (dependency failed + deps + enqueue at) - 8*2 padding Best case (no dependency failed, no deps, no enqueue at) - 6*2 padding I guess we would have to experiment a little and we also might have to adjust the absolute max percentage depending on the amount of columns. MaxPercentage also comes with a caveat, where the date is butchered as soon as the terminal has too few columns (80 columns). At that point, the date doesn't fit into a single column. An alternative to this would be to use |
@codekoala After some consideration, I actually went ahead and added a config option, which allows users to customize the time and datetime format string. I did this, as I'm personally in favor of a newline, but this is obviously personal preference. FYI. The branch is based upon some other heavy refactorings, which introduce breaking non-backward compatible changes. |
@Nukesor that sounds great to me! Thank you! I'll give it a whirl today. Sorry for the delayed response--I was out of town for a long weekend and have been playing catch-up for the past couple of days. |
Just tried it out, and it's working wonderfully for me! ✔️ |
Is your feature request related to a problem? Please describe.
This is not a problem at all, simply a convenience.
Describe the solution you'd like
I think it would be useful to see the date associated with each task. I have cronjobs that queue tasks, and readily seeing date for each task would be quiet nice.
Describe alternatives you've considered
I have considered using
pueue status --json
and piping the output throughjq
to extract date information. Eh.Additional context
Perhaps the visibility of the date could be configurable?
The text was updated successfully, but these errors were encountered: