This repository has been archived on 2024-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-dotfiles/user/configs/wayland/ags/ags-config/js/panel/widgets/sysTray.js

18 lines
597 B
JavaScript

export default () => ags.Widget.Box({
className: 'tray',
connections: [[ags.Service.SystemTray, box => {
box.children = ags.Service.SystemTray.items.map(item => ags.Widget.Button({
className: 'tray-icon',
child: ags.Widget.Icon(),
onPrimaryClick: (_, event) => item.activate(event),
onSecondaryClick: (_, event) => item.openMenu(event),
connections: [[item, button => {
button.child.icon = item.icon;
button.tooltipMarkup = item.tooltipMarkup;
}]],
}));
}]],
});