From 7f729d18d9d85f914b6cb1f4df81207caeee4b61 Mon Sep 17 00:00:00 2001
From: Jasper Ras <jras@hostnet.nl>
Date: Thu, 28 Nov 2024 10:03:42 +0100
Subject: init

---
 widget/Battery.tsx | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 widget/Battery.tsx

(limited to 'widget/Battery.tsx')

diff --git a/widget/Battery.tsx b/widget/Battery.tsx
new file mode 100644
index 0000000..d1b70d6
--- /dev/null
+++ b/widget/Battery.tsx
@@ -0,0 +1,12 @@
+import Battery from "gi://AstalBattery"
+import { bind } from "astal"
+
+export default function BatteryPercentage() {
+  const bat = Battery.get_default()
+
+  return <box>
+    <button onClick="echo hello" />
+    <label label="hi" />
+    <label label={bind(bat, "percentage").as((p) => p * 100 + "%")} />
+  </box>
+}
-- 
cgit v1.2.3

