home/natto/ags: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
17
home/natto/ags/windows/bar/tray.js
Normal file
17
home/natto/ags/windows/bar/tray.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const systemtray = await Service.import("systemtray");
|
||||
|
||||
const SysTrayItem = (item) =>
|
||||
Widget.Button({
|
||||
className: "system-tray-item",
|
||||
child: Widget.Icon().bind("icon", item, "icon"),
|
||||
tooltipMarkup: item.bind("tooltip_markup"),
|
||||
onPrimaryClick: (_, event) => item.activate(event),
|
||||
onSecondaryClick: (_, event) => item.openMenu(event),
|
||||
cursor: "pointer",
|
||||
});
|
||||
|
||||
export default () =>
|
||||
Widget.Box({
|
||||
className: "system-tray-unwrapped",
|
||||
children: systemtray.bind("items").as((i) => i.map(SysTrayItem)),
|
||||
});
|
Reference in New Issue
Block a user