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

System tray icons #6

Closed
DanielVoogsgerd opened this issue Mar 29, 2019 · 13 comments
Closed

System tray icons #6

DanielVoogsgerd opened this issue Mar 29, 2019 · 13 comments

Comments

@DanielVoogsgerd
Copy link
Contributor

I recently added Buzz to my system and so far I've really liked it.

I noticed that the icons in the system tray were not showing up. It looks like it's because the icons are hardcoded and are not installed on my system. Now I'm thinking of the best way of making these icons configurable, and so far the best solution I've come up with it making a special category in config.toml that is not an account but instead defines the location of the icons.

What do you think?

@jonhoo
Copy link
Owner

jonhoo commented Apr 1, 2019

Ah, interesting. I actually don't know the best way to set icons without hard-coding the path... Making the icons customizeable would certainly be one way to do it though. Any chance you might be able to submit a PR? I'd be happy to review!

@DanielVoogsgerd
Copy link
Contributor Author

DanielVoogsgerd commented Apr 1, 2019

Absolutely. I was thinking of either one of three solutions.

  • Moving $XDG_CONFIG_HOME/buzz.toml to $XDG_CONFIG_HOME/buzz/accounts.toml and creating a config.toml for settings.
  • Prefixing the toml-groups (is that what they are called?) with something like account-
  • Creating a settings group, and filter it when the accounts are converted to a table.

Any preference?

Also, I must admit, I've only been writing rust for like 3 days, so this might take a couple of attempts :)

@jonhoo
Copy link
Owner

jonhoo commented Apr 1, 2019

I think maybe the nicest thing would be to have accounts be an array of tables, so that the (single) configuration file ends up looking like this:

[icons]
empty = "/usr/share/icons/Faenza/categories/scalable/applications-mail.svg"
# ...

[[account]]
name = "personal"
server = "imap.gmail.com"
port = 993
username = "jon@gmail.com"
pwcmd = "gnome-keyring-query get gmail_pw"

[[account]]
name = "work"
server = "imap.outlook.com"
port = 993
username = "jon@outlook.com"
pwcmd = "pass outlook_pw"

@DanielVoogsgerd
Copy link
Contributor Author

Ah, cool, did not know this was a thing. Sounds like a plan 👍

@jonhoo
Copy link
Owner

jonhoo commented Apr 1, 2019

Feel free to submit a draft PR and I'll try to guide you along if you want :)

@LiHRaM
Copy link
Contributor

LiHRaM commented Jul 4, 2020

Currently we're using set_icon_by_file, but it looks like set_icon_by_name will be supported soon(?), which automatically uses the current theme.
qdot/systray-rs#41

@jonhoo
Copy link
Owner

jonhoo commented Jul 4, 2020

Ooooh, that'd be neat!

@DanielVoogsgerd
Copy link
Contributor Author

Unfortunately, systray-rs seems to be deprecated and archived (dec 2020). The version of libappindicator-rs it depends on (version 0.5.1) does not build anymore on my machine. I looked into a couple alternatives and tray-item or tray-icon seem like the best alternatives.

tray-item should even be cross platform which could be nice. However, the different platforms do have different apis it seems. This should not be a big problem, however it would not be a drop in replacement.

@hamidrezakp
Copy link
Contributor

hamidrezakp commented Oct 6, 2023

What if we use some hard-coded icons by default and optionally let users set their custom icons either by name or file (using tray-item).

Here is some icons i have designed for buzz (inspired by FontAwesome icons):

icons

What do you think?

@jonhoo
Copy link
Owner

jonhoo commented Oct 7, 2023

Yeah, the whole system tray story on Linux in particular is a mess at the moment. There's some ongoing work to standardize, but it looks like many of the toolkits are pseudo-dropping libappindicator without a real replacement being available. I'd be okay switching over to something else, especially if it lets us abstract away from the choice!

I'd prefer to not hard-code our own icons and instead use the ones from the user's theme — that at least feels like a more sane default. But maybe we can allow users to override the icons in the config?

@hamidrezakp
Copy link
Contributor

hamidrezakp commented Oct 8, 2023

I'd prefer to not hard-code our own icons and instead use the ones from the user's theme

I'd love to do this, sadly the icons we want are a little rare in themes found in linux and if found, they are used by other apps such as NetworkManager (in case of connect and disconnect) witch cause confusion for the user.

But maybe we can allow users to override the icons in the config?

If we do this, we can always fallback to our hard-coded icons if there is no user-icon provided or not existed.

@jonhoo
Copy link
Owner

jonhoo commented Apr 28, 2024

I think this can now be closed (between #25 and #28)?

@DanielVoogsgerd
Copy link
Contributor Author

Yep

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

Successfully merging a pull request may close this issue.

4 participants