mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-11 13:21:55 +05:30
feat: add tray and time widget
This commit is contained in:
12
widget/bar/time.tsx
Normal file
12
widget/bar/time.tsx
Normal 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()} />
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user