Giter Site home page Giter Site logo

Add support for tray icons about beeep HOT 4 CLOSED

gen2brain avatar gen2brain commented on September 20, 2024
Add support for tray icons

from beeep.

Comments (4)

gen2brain avatar gen2brain commented on September 20, 2024

Systray icons are probably better to be in their own repo. Windows notifications currently use good library that can be used for that github.com/tadvi/systray.

For Linux, I don't think it is possible without CGO, usually, GTK+ or Qt is used there. I know there is pure/native lib for X11 https://github.com/BurntSushi/xgb, but not sure if that alone is enough to implement that, probably is, but for older standard.

And again, for macOS probably not possible without CGO.

from beeep.

srlehn avatar srlehn commented on September 20, 2024

Here is a solution in C https://stackoverflow.com/a/45406723 which could be translated to xgb with Xembed(?) without the need for cgo.

Specs:
https://specifications.freedesktop.org/systemtray-spec/systemtray-spec-0.3.html (old)
https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/ (new) - this probably only needs dbus

from beeep.

gen2brain avatar gen2brain commented on September 20, 2024

Xembed is here https://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html, but not sure how is used in relation to systemtray-spec-0.3. It looks like that can work, in theory at least, together with StatusNotifier support and dbus.

Usually, you want to add some menu to tray icon, and then you will need some toolkit, or at least to draw controls with plain X, something like that. But just handling mouse events can also be useful I think.

from beeep.

sampaioletti avatar sampaioletti commented on September 20, 2024

Ok sounds good, I was going to research it to see how possible it was, but this makes sense.

Thanks for the great repo!

from beeep.

Related Issues (20)

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.