feat: add tray and time widget

This commit is contained in:
tux
2025-05-31 18:38:21 +05:30
parent 56a87702f6
commit d5a24064e9
4 changed files with 36 additions and 0 deletions

12
widget/bar/time.tsx Normal file
View File

@@ -0,0 +1,12 @@
import { GLib, Variable } from "astal";
export const Time = () => {
const time = Variable("").poll(
1000,
() => GLib.DateTime.new_now_local().format("%I:%M:%S %p")!,
);
return (
<label cssClasses={["time"]} onDestroy={() => time.drop()} label={time()} />
);
};