christophgysin / pasystray

PulseAudio system tray
GNU Lesser General Public License v2.1
448 stars 43 forks source link

How to use custom theme icons with pasystray ? #162

Open Jubijub opened 2 years ago

Jubijub commented 2 years ago

pasystray version 0.8.0, from Arch package

My theme config :

[Settings]
gtk-theme-name = Catppuccin-Macchiato
gtk-icon-theme-name=Papirus-Dark
gtk-cursor-theme-name = Catppuccin-Macchiato-Dark

I have been trying to change the systray icons without success.

From the code I gather that the program is looking for icons named :

static icon_set_t volume_icon_names = {
[ICON_IDX_MUTED] = "audio-volume-muted",
[ICON_IDX_LOW] = "audio-volume-low",
[ICON_IDX_MEDIUM] = "audio-volume-medium",
[ICON_IDX_HIGH] = "audio-volume-high"

and that it's looking for icon size 48x48 :

gtk_image_set_from_icon_name(image, icon_name, GTK_ICON_SIZE_DIALOG);

I tried to supply my icons in ./local/share/icons/Papirus-Dark/48x48/status/ , both in svg and png, and pasystray still displays that black volume icon. I also tried to play with -symbolic suffix, it didn't work either.

Can you confirm which icon name shall be used, and if pasystray honours the GTK theme ? thanks !

japanoise commented 1 year ago

I'm also having this issue. Pasystray is using some default dark icon which is invisible against a dark background, dark panel, etc. It would be nice if I could pick one or force the use of some icon set. Failing that, a hardcoded one that's visible against a dark background and a light background would be acceptable.

The only workaround I can think of here is of deleting every icon of this type in /usr/share/icons and replacing them with one that I like, but that's really hacky and I don't want to do that...

japanoise commented 1 year ago

@Jubijub After a bit of fiddling around, I found out it does in fact respect the gtk3 icon theme. You can set it using your distro's preferred method, or using the config files: https://wiki.archlinux.org/title/GTK#Configuration

If this solves the problem (it did for me) then this issue could be closed.