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

Drop date dependency and use C++20 (once compilers support it) #668

Open
b1rger opened this issue Apr 13, 2020 · 14 comments
Open

Drop date dependency and use C++20 (once compilers support it) #668

b1rger opened this issue Apr 13, 2020 · 14 comments
Labels
enhancement New feature or request

Comments

@b1rger
Copy link
Contributor

b1rger commented Apr 13, 2020

Hi,

according to HowardHinnant/date#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 missing date dependency. I looked into packaging date, but given the fact that its functionality will be provided by C++20 I'm not sure it makes much sense.)

@Alexays Alexays added the enhancement New feature or request label Apr 13, 2020
@Alexays
Copy link
Owner

Alexays commented Apr 13, 2020

I'll go 100% on C++20 once possible!

@nschloe
Copy link
Contributor

nschloe commented Aug 8, 2020

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.

@b1rger
Copy link
Contributor Author

b1rger commented Oct 27, 2020

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.

@nschloe
Copy link
Contributor

nschloe commented Oct 28, 2020

I've packaged hhdate and waybar to get the full functionality. Here's the PPA. FWIW it might be ready for inclusion into debian.

@diraol
Copy link

diraol commented Oct 29, 2020

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. 😞 Any tips?

Oh, I've also tried restart-interval instead of only interval.

@b1rger
Copy link
Contributor Author

b1rger commented Oct 30, 2020

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
    },

@jacksgt
Copy link

jacksgt commented Nov 3, 2020

@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
Copy link

diraol commented Nov 3, 2020

@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! 🤦 thanks for spotting it!

@kit-ty-kate
Copy link

Any update on this? The lack of a clock module in Debian is rather annoying

@charliebarber
Copy link

Getting unknown module clock on Debian Bullseye

@ulysses4ever
Copy link

@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.

aarongable added a commit to aarongable/dotfiles that referenced this issue Dec 15, 2021
This is caused by Alexays/Waybar#668
and the Debian package maintainer's decision to drop the clock
module from waybar because it can't *yet* be compiled without
a specific dependency... even though it's had that dependency
all along.
@LukashonakV
Copy link
Contributor

LukashonakV commented Jan 24, 2023

Hi @b1rger , @Alexays, @alebastr , looks like finally this issue is satisfied and can be closed. See PR#1959 and PR#1971

@jm355
Copy link

jm355 commented May 27, 2023

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.

@zjeffer
Copy link
Contributor

zjeffer commented Jul 16, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests