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

[clock] Printed tooltip year/month is based on currently selected calendar entry #3414

Closed
Zapeth opened this issue Jul 5, 2024 · 1 comment · Fixed by #3457
Closed

[clock] Printed tooltip year/month is based on currently selected calendar entry #3414

Zapeth opened this issue Jul 5, 2024 · 1 comment · Fixed by #3457

Comments

@Zapeth
Copy link

Zapeth commented Jul 5, 2024

Given a clock configuration that displays a time formatted string and a scrollable calendar in the tooltip, it looks like the printed string is based on the currently selected year/month of the calendar.

I'm not sure if this is intentional behavior, but I would expect any time formatted string to always be based on the current time (with a given timezone offset), especially since the calendar already includes the information of the currently selected year/month.

Sample config for testing the behavior:

 "clock": {
        ...
        "tooltip-format": "<big>{:%Y %B %d}</big>\n<tt><small>{calendar}</small></tt>",
        "actions":  {
                "on-scroll-up": "shift_up",
                "on-scroll-down": "shift_down"
        }
    },

When scrolling up/down the printed month/year (%B and %Y) changes, but the date stays the same (%d), I would expect all formatted values to be constant when scrolling (ie the current year/month/date).

@Zapeth Zapeth changed the title [clock] Printed tooltip year/date is based on currently selected calendar entry [clock] Printed tooltip year/month is based on currently selected calendar entry Jul 5, 2024
RobertMueller2 added a commit to RobertMueller2/Waybar that referenced this issue Jul 20, 2024
Right now, for the tooltip, all times are shifted if shift-down/shift-up
actions are used. But it really only makes sense for this to apply to
the {calendar} replacement, so use shiftedNow there and now for all
the rest.
RobertMueller2 added a commit to RobertMueller2/Waybar that referenced this issue Jul 20, 2024
Right now, for the tooltip, all times are shifted if shift-down/shift-up
actions are used. But it really only makes sense for this to apply to
the {calendar} replacement, so use shiftedNow there and now for all
the rest.
@RobertMueller2
Copy link
Contributor

RobertMueller2 commented Jul 20, 2024

I got this gem from my ancient waybar config:

satty-20240707-14:02:18

I think the {calendar} replacement wasn't always this powerful, so stating the month + year separately was the only way to indicate which month you're actually displaying in the calendar. I don't think I intended having two lines displaying month and year, but the latter wasn't part of {calendar}.

Alexays added a commit that referenced this issue Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants