mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
tray: filter out empty tray items (#717)
This commit is contained in:
commit
78f622963f
1 changed files with 3 additions and 3 deletions
|
|
@ -3,15 +3,15 @@ import SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js';
|
|||
const { Box, Icon, Button, Revealer } = Widget;
|
||||
const { Gravity } = imports.gi.Gdk;
|
||||
|
||||
const SysTrayItem = (item) => Button({
|
||||
const SysTrayItem = (item) => item.id !== null ? Button({
|
||||
className: 'bar-systray-item',
|
||||
child: Icon({hpack: 'center'}).bind('icon', item, 'icon'),
|
||||
child: Icon({ hpack: 'center' }).bind('icon', item, 'icon'),
|
||||
setup: (self) => self
|
||||
.hook(item, (self) => self.tooltipMarkup = item['tooltip-markup'])
|
||||
,
|
||||
onPrimaryClick: (_, event) => item.activate(event),
|
||||
onSecondaryClick: (btn, event) => item.menu.popup_at_widget(btn, Gravity.SOUTH, Gravity.NORTH, null),
|
||||
});
|
||||
}) : null;
|
||||
|
||||
export const Tray = (props = {}) => {
|
||||
const trayContent = Box({
|
||||
|
|
|
|||
Loading…
Reference in a new issue