diff --git a/flake.nix b/flake.nix index 468ee2c..b6e0932 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,7 @@ hyprland apps battery + tray ]; }; @@ -51,6 +52,7 @@ hyprland apps battery + tray ]; }) ]; diff --git a/widget/bar/index.tsx b/widget/bar/index.tsx index 5c45a77..7df8795 100644 --- a/widget/bar/index.tsx +++ b/widget/bar/index.tsx @@ -3,6 +3,8 @@ import { FocusedClient, WorkspaceButton } from "./workspace"; import { Battery } from "./battery"; import { Launcher } from "./launcher"; import { Tailscale } from "./tailscale"; +import { Tray } from "./tray"; +import { Time } from "./time"; export const WINDOW_NAME = "bar"; @@ -46,6 +48,8 @@ const End = () => { + + ); }; diff --git a/widget/bar/time.tsx b/widget/bar/time.tsx new file mode 100644 index 0000000..fb11998 --- /dev/null +++ b/widget/bar/time.tsx @@ -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 ( +