-
-
Notifications
You must be signed in to change notification settings - Fork 742
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
Clock Formatting For %OI #1469
Comments
At least the issue comes from the date utility and the clock module displays info which is provided by the date library.
I don't see any mentions about the library should cut the leading zeros. I see it depends on you LC_TIME environment variable. So at least I would suggest you to check you local configuration to make sure in terminal local date utility shows the output you've expecting. |
Interesting. It had previously worked so in my brain I registered the locale's alternative as meaning "no leading 0" (since my locale didn't change) It seems the easiest way with I also don't have any locales set up that LC_TIME will produce a non leading zero. Seems to be an issue for me and not waybar. Though I would love to have the option to force no-prefix |
Is it agreed that this is indeed a bug? And, is there a known workaround? My waybar-clock config broke recently because I use If the intent of the date library that waybar-clock uses is to mimic the functionality of the
works just fine to provide a single digit hour without leading zero (and |
@bisby, @jayache80 |
For me i get in my logs When running with
But nothing else clock related. |
I tried both 0.9.12 and waybar-git-r1906.503fe9a-1 (arch linux AUR package), and have the same result.
Having this
will work to show a leading 0 hour only. Having this in the
will break, and then I get nothing in the clock area. As @bisby has alluded, is this perhaps caused by a timezone locale configuration, a system date library thing, or some other system config thing? Using the This
yields a leading 0 hour (in NY time, a different timezone than mine. Neat.) This
strangely yields a literal |
I'm using GNU coreutils with the fmt package version - 8.32-r1. Can you check is the same version is installed on your machine or you're using another one or even another fmt package. Actually according the code this fmt package handles text formatting. |
|
I installed
|
I made a request to fmtlib: Either some |
OFF |
Hi @hajosattila , config is Dotfiles |
Hi @bisby is this still actual ? |
I've been back on i3wm so not using waybar recently. but booting it up to check...
for
So yes. clock formatting with no leading zeroes is seemingly still not possible in my locale. |
Hi @jayache80 , @bisby, @iambumblehead according upstream this feature was implemented by the PR#3271 . I've checked the source code and looks like once fmt will be official release Waybar can use this feature. |
Stumbled onto this issue while googling how to remove leading zero. Is this still an issue a year later? |
Still an issue in today's release...
Module formatting...
Expected output (example)...
Actual output...
|
Still an issue on v0.10.2. |
I don't believe fmt uses
you'd want to use:
Anywho, this will be fixed in waybar once
|
This issue has been very frustrating for me because it seems so simple. For a temporary workaround until the fmt side of things is worked out, you can output the
In the jsonc file and add |
@trevin-j, brilliant. THANK YOU for the workaround! Style selector is #custom-clock |
The fix was released in fmt version 11.0.0: https://github.com/fmtlib/fmt/releases/tag/11.0.0 Meson WrapDB has versions 11.0.1-1 and 11.0.2-1 available: https://mesonbuild.com/Wrapdb-projects.html Any other blockers to pulling in the updated dependency? |
Expected Behavior:
The clock module links to https://howardhinnant.github.io/date/date.html#to_stream_formatting - This says
Previously
%0I
returned8
for 8pm, whereas%I
returns08
. So I would expect to have this display8:45pm
Actual Behavior:
The clock module returns nothing. Empty space on the bar. I can still see the module underline. When I click on the module it shows the full time. When I click on the module again it doesn't clear the full time, but full time stops updating.
Relevant Config:
Relevant Log lines:
This works when the
%0I
is changed to%I
, but then the formatting isn't quite what I want. I only consider this an issue though because the linked documentation for date formatting says this should be valid.edit: quick follow once I saw the quote text formatting... it should be
%OI
not%0I
... 0 worked in the past, and O works but still displays the 0 prefix (08
) so is technically still not working.The text was updated successfully, but these errors were encountered: