diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-02 15:02:36 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-02 15:02:36 +1100 |
| commit | dcc3c1fd4c5960f49f9bce443b77393430a95f38 (patch) | |
| tree | dd73373f234d222eebad5be5dbaec42508714891 /src/modules/sidebar | |
| parent | sidebar: show events for each day (diff) | |
| download | caelestia-shell-dcc3c1fd4c5960f49f9bce443b77393430a95f38.tar.gz caelestia-shell-dcc3c1fd4c5960f49f9bce443b77393430a95f38.tar.bz2 caelestia-shell-dcc3c1fd4c5960f49f9bce443b77393430a95f38.zip | |
sidebar: add date time to time pane
Diffstat (limited to 'src/modules/sidebar')
| -rw-r--r-- | src/modules/sidebar/time.tsx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/sidebar/time.tsx b/src/modules/sidebar/time.tsx index c7b68ba..1f5ef99 100644 --- a/src/modules/sidebar/time.tsx +++ b/src/modules/sidebar/time.tsx @@ -1,7 +1,17 @@ +import { bindCurrentTime } from "@/utils/system"; +import { Gtk } from "astal/gtk3"; import Calendar from "./modules/calendar"; import Upcoming from "./modules/upcoming"; -const TimeDate = () => <box></box>; +const TimeDate = () => ( + <box vertical className="time-date"> + <box halign={Gtk.Align.CENTER}> + <label label={bindCurrentTime("%I:%M:%S")} /> + <label className="ampm" label={bindCurrentTime("%p", c => (c.get_hour() < 12 ? "AM" : "PM"))} /> + </box> + <label className="date" label={bindCurrentTime("%A, %d %B")} /> + </box> +); export default () => ( <box vertical className="pane time" name="time"> |