Coder Social home page Coder Social logo

System tray icons about buzz HOT 13 CLOSED

DanielVoogsgerd avatar DanielVoogsgerd commented on May 20, 2024
System tray icons

from buzz.

Comments (13)

DanielVoogsgerd avatar DanielVoogsgerd commented on May 20, 2024 2

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

from buzz.

jonhoo avatar jonhoo commented on May 20, 2024 1

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

from buzz.

hamidrezakp avatar hamidrezakp commented on May 20, 2024 1

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?

from buzz.

DanielVoogsgerd avatar DanielVoogsgerd commented on May 20, 2024 1

Yep

from buzz.

jonhoo avatar jonhoo commented on May 20, 2024

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!

from buzz.

DanielVoogsgerd avatar DanielVoogsgerd commented on May 20, 2024

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 :)

from buzz.

jonhoo avatar jonhoo commented on May 20, 2024

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 = "[email protected]"
pwcmd = "gnome-keyring-query get gmail_pw"

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

from buzz.

LiHRaM avatar LiHRaM commented on May 20, 2024

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

from buzz.

jonhoo avatar jonhoo commented on May 20, 2024

Ooooh, that'd be neat!

from buzz.

DanielVoogsgerd avatar DanielVoogsgerd commented on May 20, 2024

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.

from buzz.

jonhoo avatar jonhoo commented on May 20, 2024

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?

from buzz.

hamidrezakp avatar hamidrezakp commented on May 20, 2024

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.

from buzz.

jonhoo avatar jonhoo commented on May 20, 2024

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

from buzz.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.