nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
7.11k stars 1.83k forks source link

bug: waybar cannot find network-manager-applet icons #5365

Closed benjamb closed 3 months ago

benjamb commented 6 months ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

With waybar configured and enabled with the tray module, and the network-manager-applet service enabled with xsession.preferStatusNotifierItems set to true, waybar cannot find the appropriate icons.

It's possible this applies to other applications, though I don't see this with blueman or udiskie, but this is perhaps since I have them installed via home.packages.

A snippet from waybar -l trace:

[2024-05-02 09:53:25.563] [trace] Set tray item property: :1.12.IconName = 'nm-signal-100'
[2024-05-02 09:53:25.563] [trace] Set tray item property: :1.12.IconThemePath = ''
[2024-05-02 09:53:25.563] [trace] Set tray item property: :1.12.Id = 'nm-applet'
[2024-05-02 09:53:25.563] [trace] Set tray item property: nm-applet.Menu = '/org/ayatana/NotificationItem/nm_applet/Menu'
[2024-05-02 09:53:25.564] [trace] Set tray item property: nm-applet.Status = 'Active'
[2024-05-02 09:53:25.564] [trace] Set tray item property: nm-applet.Title = 'Network'
[2024-05-02 09:53:25.564] [trace] Set tray item property: nm-applet.XAyatanaLabel = ''
[2024-05-02 09:53:25.564] [trace] Set tray item property: nm-applet.XAyatanaLabelGuide = ''
[2024-05-02 09:53:25.564] [trace] Set tray item property: nm-applet.XAyatanaOrderingIndex = 0
[2024-05-02 09:53:25.582] [trace] Item 'nm-applet': Icon 'nm-signal-100' not present in theme Adwaita
[2024-05-02 09:53:25.582] [error] Item 'nm-applet': Could not find an icon named 'nm-signal-100' and no pixmap given.

A workaround for this is to set xdg.systemDirs.data = ["${pkgs.networkmanagerapplet}/share"], but this feels like something I shouldn't have to configure myself, but I'm not sure of what the best solution would be.

Some rough ideas from a relative newbie:

Maintainer CC

@cvoges12 @rycee @berbiche

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.1.88, NixOS, 23.11 (Tapir), 23.11.20240429.576ecd4`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/store/xpzmrd7qla29lv913dgg0rma1g335zam-source`
stale[bot] commented 3 months ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

benjamb commented 3 months ago

The b2f56952074cb46e93902ecaabfb04dd93733434 commit does add ["${pkgs.networkmanagerapplet}/share"] to XDG_DATA_DIRS. I'm not certain why this wasn't working for me previously, but if I drop the workaround icons are now loaded properly.

I'll close this since this appears to be fixed.