From dcc3c1fd4c5960f49f9bce443b77393430a95f38 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Wed, 2 Apr 2025 15:02:36 +1100
Subject: sidebar: add date time to time pane

---
 src/modules/sidebar/time.tsx | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

(limited to 'src/modules/sidebar/time.tsx')

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">
-- 
cgit v1.2.3-freya

