perf: Home-manager to module
feat: Optionise config
This commit is contained in:
12
modules/user/packages/drvs/ags/widget/elements/Time.tsx
Normal file
12
modules/user/packages/drvs/ags/widget/elements/Time.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import { Variable, GLib } from "astal"
|
||||
|
||||
export default function Time({ format = "%e %b - %H:%M %a" }) {
|
||||
const time = Variable<string>("").poll(1000, () =>
|
||||
GLib.DateTime.new_now_local().format(format)!)
|
||||
|
||||
return <label
|
||||
className="Time"
|
||||
onDestroy={() => time.drop()}
|
||||
label={time()}
|
||||
/>
|
||||
}
|
Reference in New Issue
Block a user