Open b1rger opened 4 years ago
I'll go 100% on C++20 once possible!
I've worked on waybar for debian and definitely can say that the dependency on hhdate hinders waybars adoption. It'd help waybar's distribution if the dependency on hhdate was optional, even if that costs timezone support.
Just for the record, I've uploaded waybar
to Debian unstable, but for now it is compiled without the clock
module. I have added a README to the Debian package, pointing out that the clock
module is missing and that some of its functionality can be replaced by the custom
module.
I've packaged hhdate and waybar to get the full functionality. Here's the PPA. FWIW it might be ready for inclusion into debian.
Hi @b1rger can you give me a hand setting up the clock using the custom
module, please?
I've done it this way:
{
"layer": "top",
"position": "top",
"height": 26,
"modules-left": [
],
"modules-center": [
"custom/clock"
],
"modules-right": [],
"custom/clock": {
"exec": "date '+%Y-%m-%d %H:%M'",
"format": "{}",
"interval": "45"
}
}
It almost work, but once the clock is initialized it does not update anymore, even though having the interval
set. I am not sure what I'm doing wrong here. :disappointed: Any tips?
Oh, I've also tried restart-interval
instead of only interval
.
Hi @b1rger can you give me a hand setting up the clock using the custom module, please?
I'm not sure, maybe drop the format
?
This works for me:
"custom/clock": {
"exec": "date +'%H:%M %S'",
"interval": 5
},
@b1rger Thanks for the Debian package and the example snippet. Maybe next time you can put this info into the changelog (instead of README.Debian), so users get notified when the upgrade (apt-listchanges
).
@diraol I had the same issue. It's because you've specified the interval as a string ("45"
), but it should be an integer:
"interval": 45
@diraol I had the same issue. It's because you've specified the interval as a string (
"45"
), but it should be an integer:"interval": 45
Oh man! :facepalm: thanks for spotting it!
Any update on this? The lack of a clock
module in Debian is rather annoying
Getting unknown module clock
on Debian Bullseye
@kit-ty-kate @charliebarber have you seen this comment above:
I've packaged hhdate and waybar to get the full functionality. Here's the PPA. FWIW it might be ready for inclusion into debian.
The PPA worked like a charm for me.
Starting waybar I get this error, is it related to this issue?
[2023-05-27 11:26:45.079] [warning] As using a timezone, some format args may be missing as the date library haven't got a release since 2018.
Should this line not be changed? https://github.com/Alexays/Waybar/blob/master/meson.build#L7
Why did those PRs not change that to c++20? I don't have c++20 features unless I change that line. @LukashonakV
EDIT: I figured out that I can pass this as an option to the meson setup command, but maybe we should set c++20 as the default now?
Hi,
according to https://github.com/HowardHinnant/date/issues/565 C++20 seems to implement the functionality of the
date
library, that Waybar uses. Most compilers don't fully implement C++20 yet, but when they do, it would probably make sense to drop the dependency.(For transparency: I've uploaded releases of
waybar
to Debian in the past, but at the moment I'm blocked by the missingdate
dependency. I looked into packagingdate
, but given the fact that its functionality will be provided by C++20 I'm not sure it makes much sense.)