mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-11 05:11:55 +05:30
feat: add tray and time widget
This commit is contained in:
18
widget/bar/tray.tsx
Normal file
18
widget/bar/tray.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { bind } from "astal";
|
||||
import AstalTray from "gi://AstalTray";
|
||||
|
||||
export const Tray = () => {
|
||||
const tray = AstalTray.get_default();
|
||||
|
||||
for (const item of tray.get_items()) {
|
||||
print(item.title);
|
||||
}
|
||||
|
||||
return (
|
||||
<box cssClasses={["tray"]}>
|
||||
{bind(tray, "items").as((items) =>
|
||||
items.map((item) => <image gicon={bind(item, "gicon")} />),
|
||||
)}
|
||||
</box>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user