From 53e87eb12e670c0779b50b6caef31f0d48347e37 Mon Sep 17 00:00:00 2001 From: MoetaYuko Date: Wed, 1 May 2024 22:32:20 +0800 Subject: [PATCH] ags: fix systray icon warning take code snippet from ags wiki to fix: ``` (com.github.Aylur.ags:748022): Gjs-Console-WARNING **: 21:42:04.733: Error: can't assign "[object instance wrapper GIName:GdkPixbuf.Pixbuf jsobj@0x37f2745abd08 native@0x62e804712490]" as icon, it is not a file nor a named icon ``` --- .config/ags/modules/bar/normal/tray.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.config/ags/modules/bar/normal/tray.js b/.config/ags/modules/bar/normal/tray.js index 71ca062ca..727c28bbf 100644 --- a/.config/ags/modules/bar/normal/tray.js +++ b/.config/ags/modules/bar/normal/tray.js @@ -5,11 +5,7 @@ const { Gravity } = imports.gi.Gdk; const SysTrayItem = (item) => Button({ className: 'bar-systray-item', - child: Icon({ - hpack: 'center', - icon: `${item.icon}`, - setup: (self) => self.hook(item, (self) => self.icon = item.icon), - }), + child: Icon({hpack: 'center'}).bind('icon', item, 'icon'), setup: (self) => self .hook(item, (self) => self.tooltipMarkup = item['tooltip-markup']) ,