bar: datetime tooltip

This commit is contained in:
2 * r + 2 * t 2025-02-20 23:34:27 +11:00
parent e0038ff74d
commit f70735078f
2 changed files with 4 additions and 3 deletions

View file

@ -4,7 +4,7 @@ import { Astal } from "astal/gtk3";
export const bar = {
vertical: true,
wsPerGroup: 5,
dateTimeFormat: "%d/%m/%y %R",
dateTime: { format: "%d/%m/%y %R", detailed: "%c" },
};
export const launcher = {

View file

@ -484,10 +484,11 @@ const Battery = () => {
const DateTime = () => (
<button
onClick={(self, event) => event.button === Astal.MouseButton.PRIMARY && togglePopup(self, event, "sideright")}
setup={self => setupCustomTooltip(self, bindCurrentTime(config.dateTime.detailed))}
>
<box className="module date-time">
<label className="icon" label="calendar_month" />
<label label={bindCurrentTime(config.dateTimeFormat)} />
<label label={bindCurrentTime(config.dateTime.format)} />
</box>
</button>
);
@ -495,7 +496,7 @@ const DateTime = () => (
const DateTimeVertical = () => (
<button
onClick={(self, event) => event.button === Astal.MouseButton.PRIMARY && togglePopup(self, event, "sideright")}
setup={self => setupCustomTooltip(self, bindCurrentTime(config.dateTimeFormat))}
setup={self => setupCustomTooltip(self, bindCurrentTime(config.dateTime.detailed))}
>
<box vertical className="module date-time">
<label className="icon" label="calendar_month" />