Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom icon for tray items #63

Open
ThatOneCalculator opened this issue Nov 22, 2023 · 4 comments
Open

Custom icon for tray items #63

ThatOneCalculator opened this issue Nov 22, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@ThatOneCalculator
Copy link

          Also, being able to choose a custom icon for tray items like Discord would be nice.

image

image

Originally posted by @ThatOneCalculator in #56 (comment)

@scorpion-26 scorpion-26 added the enhancement New feature or request label Nov 29, 2023
@scorpion-26
Copy link
Owner

Working on it.

scorpion-26 added a commit that referenced this issue Dec 3, 2023
This adds a config option to override the name of the icons displayed.
This also removes the frankenstein monster of the icon location
querying, which was a giant mess and not even remotely close to being
compliant with the XDG spec. Instead we use the much simpler Gtk API
which has the added benefit of properly supporting themes.

The SNI filter also now work for items without a set tooltip (e.g. steam).
For these items the object name is matched instead.

Implements #63
@scorpion-26
Copy link
Owner

gBar now respects which icon theme is used by the system. Some items still don't use them though (most notably discord). For those the icon needs to be manually set with SNIIconName.

@ThatOneCalculator
Copy link
Author

Nice! Could you also make it possible to set it to a fonticon/text (given that's what I use for all the other icons)?

@scorpion-26
Copy link
Owner

You can either directly download the icon as svg (if supported, e.g. for material icons you can) or extract it from the font directly. Then you can paste them into ~/.local/share/icons/ or /usr/share/icons/ with a unique name and then use that as SNIIconName. Or you can convert them to png using e.g. gimp and use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants