taffybar / gtk-sni-tray

A StatusNotifierHost widget written using the gtk+3 bindings for haskell provided by gi-gtk.
BSD 3-Clause "New" or "Revised" License
35 stars 2 forks source link

Failing to find icons for some apps #18

Closed benley closed 5 years ago

benley commented 5 years ago

I have the widget working for some things, like pasystray and Steam, but when I try running the Network Manager applet (nm-applet), I get the following:

Got null pixbuf for info ItemInfo {itemServiceName = BusName ":1.490", itemServicePath = ObjectPath "/org/ayatana/NotificationItem/nm_applet", itemId = Just "nm-applet", itemStatus = Just "Active", itemCategory = Just "SystemServices", itemToolTip = Nothing, iconTitle = "Network", iconName = "nm-device-wired-secure", overlayIconName = Nothing, iconThemePath = Just "", iconPixmaps = [], overlayIconPixmaps = [], menuPath = Just (ObjectPath "/org/ayatana/NotificationItem/nm_applet/Menu")}

This is on NixOS, where the icons in question are in /run/current-system/sw/share/icons. Is nm-applet supposed to be doing something differently, or should gtk-sni-tray be getting iconThemePath set, or something else?

colonelpanic8 commented 5 years ago

@benley yeah I actually encountered this issue myself in my nixos configuration. I came up with a solution, but I'm not 100% sure why this is happening, althuogh I do have some ideas. See

https://github.com/NixOS/nixpkgs/issues/43836 for solution and speculation

colonelpanic8 commented 5 years ago

afaik nm-applet is the only affected applet. Do you know of any others that encounter this issue?

benley commented 5 years ago

nm-applet is the only one I'm sure of; I'm still figuring out which apps even support the new SNI style tray interface and only know about a few.

colonelpanic8 commented 5 years ago

One thing you should know is that many electron apps need to be started with

XDG_CURRENT_DESKTOP='Unity'

in order to use sni

colonelpanic8 commented 5 years ago

things I currently have in my sni tray are:

kde-connect https://github.com/IvanMalison/notifications-tray-icon lxqt-powermanagement pasystray udiskie clipit gitter nm-applet steam vlc quassel

you can always use xembedsniproxy to get xembed tray icons in your sni system tray, but its not a perfect solution.

benley commented 5 years ago

Nice, thanks for that list! I've tried xembedsniproxy from plasma-workspace and it basically works, but clicking on widgets acts strangely and the icons look fuzzy - which is something I remember seeing when I was running KDE as well, and now I have some clue about why :-)

colonelpanic8 commented 5 years ago

I'm going to close this since it is more of a nixos issue than anything else. Do let me know if you have any other problems.

benley commented 5 years ago

Reasonable. Thanks for the info.

NickHu commented 4 years ago

Hi, I think for the past year or so I haven't been able to get nm-applet working with taffybar on nixos. I don't get the issue described in the OP, but I think maybe at one point I did. I also don't get any errors in either status-notifier-watcher or nm-applet itself, and running status-notifier-watcher with -l DEBUG shows that it registers just fine:

MethodCall {methodCallPath = ObjectPath "/StatusNotifierWatcher", methodCallInterface = Just (InterfaceName "org.kde.StatusNotifierWatcher"), methodCallMember = MemberName "RegisterStatusNotifierItem", methodCallSender = Just (BusName ":1.58"), methodCallDestination = Just (BusName ":1.50"), methodCallReplyExpected = True, methodCallAutoStart = True, methodCallBody = [Variant "/org/ayatana/NotificationItem/nm_applet"]}
MethodCall {methodCallPath = ObjectPath "/StatusNotifierWatcher", methodCallInterface = Just (InterfaceName "org.kde.StatusNotifierWatcher"), methodCallMember = MemberName "GetObjectPathForItemName", methodCallSender = Just (BusName ":1.17"), methodCallDestination = Just (BusName "org.kde.StatusNotifierWatcher"), methodCallReplyExpected = True, methodCallAutoStart = True, methodCallBody = [Variant ":1.58"]}

(I'm running nm-applet --sm-disable --indicator) If I launch without --indicator, then it shows up via xembed-sni-proxy, but I can't interact with it because of general xembed weirdness (everything is like this, although I could've sworn it worked at some point).

It feels like to me it might silently be not able to find the icons. As for how I've set up NetworkManager, I just have networking.networkmanager.enable = true; in my configuration.nix and services.network-manager-applet.enable = true; in my home-manager configuration. Are either of the two of you able to get nm-applet working? I'm thinking it might be a case of my not having installed some package or something, as is historical with nixos and icon bugs.

colonelpanic8 commented 4 years ago

@NickHu I had this issue quite some time ago, and @erolb was just having this issue a few days ago. See: NixOS/nixpkgs#43836

kurnevsky commented 3 years ago

I have this issue for clipit in nixos - taffybar can't find clipit-trayicon. But I see the icon installed in hicolor theme...

Added: fixed after I set services.xserver.gdk-pixbuf.modulePackages, thanks to https://github.com/taffybar/taffybar/issues/403#issuecomment-843666681