Are there any plans to support a "tray" area?
Or is this out of scope for yambar?
You you accept a PR given I can find the time to do it?
Are there any plans to support a "tray" area?
Or is this out of scope for yambar?
You you accept a PR given I can find the time to do it?
There aren't any concrete plans, but I have considered it. It's not something I need/use myself, which is why I never got around to implement it.
It's definitely not out of scope, and yes, I would gladly accept a PR.
I hacked together some scripts around putting a tray in my yambar.
Runs both scripts. They MUST be the right-most scripts.
https://github.com/sagotsky/.dotfiles/blob/master/config/yambar/config.yml#L186-L196
Launches trayer. Stalonetray flickered in my wm. I needed the trayer-srg fork. There's nothing to output yet. I like having yambar launch trayer so that if yambar gets killed, it takes trayer with it.
https://github.com/sagotsky/.dotfiles/blob/master/home/scripts/yambar-tray.sh
Outputs padding. This script figures out how wide the trayer window is, attempts to convert pixels to a number of spaces, and outputs that as a yambar variable. This padding pushes the next right most module towards the middle of the screen. I have this refreshing every 10 seconds because I'm still tweaking it, but it could probably be lowered since systray apps don't launch or die very frequently.
https://github.com/sagotsky/.dotfiles/blob/master/home/scripts/yambar-tray-width.sh
Hi
I am looking into this subject.
I took a look to waybar and swaybar to see how DBus shall be used to retrieve infos about the icon. I also succeeded in using nanosvg to make yambar display a scaled svg icon.
I have a question about the theming, I would like to find a way to resolve the icon given by the DBus message into the correct icon path for the current gdk theme.
However I did not found anything except using gtk. You said you prefer not using cairo in this project. If I use gtk I guess I'll have to link against cairo. I still plan to use nanosvg and pixman to render the icon, I just need gtk to resolve the path of the corresponding icon.
Do you have an idea about how to do this ?
Regards
I am looking into this subject.
@aacebedo thanks! I'm sure this is something that will be appreciated by a lot of people :)
Do you have an idea about how to do this ?
fnott already does this, and I think you should be able to reuse its code. See https://codeberg.org/dnkl/fnott/src/branch/master/icon.c#L329 and https://codeberg.org/dnkl/fnott/src/branch/master/icon.c#L28.
Thank you for the response !
I'll take a look to the code.
You confirm I shall avoid gtk too ?
I'll try to obtain a first version with only icons but no menus. Without gtk it is going to be quite complex to implement menu support I think.
You confirm I shall avoid gtk too ?
Yes, let's do a first iteration without gtk. I also think the tray feature on a whole should be optional (i.e. we shouldn't force a dbus dependency on people who don't want the tray feature).
Without gtk it is going to be quite complex to implement menu support I think.
Yeah, let's start with that. After that we can make a decision on whether to use gtk, or draw menus ourselves.
There are other feature requests that would benefit from tooltip/menu style popups, which makes it slightly more "ok" to implement them ourselves. But one step a time; we'll get to that later.
Yeah I agree about the gtk dependency this shall be only needed if the module "tray" is compiled and/or loaded. I'll try without for the moment.
I am not used to draw stuff in programs. Your help will be very welcome if we ended to implement stuff like menus ;)
Would it be easier to only implement tray icons, for starters? Without menus, like swaybar does for now.
I wrote a little tool that renders DBus tray menus using fzf, so the tray support would be very useful to me even without menus.
Is this thread worth bumping? Do you guys have anything to share about the tray so far? It's been a year since this thread was posted so I thought I would ask..
I'd love to have a tray, but unfortunately this is rather annoying to implement. You can see @dnkl put a "help wanted" tag on this particular issue.
I am currently a little busy with life, and am (slowly) trying to get an hwmon (see #257) working. The hwmon also turned out to be more annoying than I had predicted.
Overall, this is likely still going to take a while.
Would it be easier to only implement tray icons, for starters? Without menus, like swaybar does for now.
I wrote a little tool that renders DBus tray menus using fzf, so the tray support would be very useful to me even without menus.
Is the tool available anywhere ? @adamantgarth
Would it be easier to only implement tray icons, for starters? Without menus, like swaybar does for now.
I wrote a little tool that renders DBus tray menus using fzf, so the tray support would be very useful to me even without menus.
Is the tool available anywhere ? @adamantgarth
@Eragon, here you go: https://codeberg.org/adamantgarth/traytool
Some disclaimers:
So, no warranty, it may not work, it may burn your house, yada yada.
sudo make install will place the binary into /usr/local/bin/traytool. I think it requires somewhat recent version systemd, but I don't remember which one or how recent it is.
Run the tool without arguments first to find out the IDs of your tray items, and then use, for example, -cm qBittorrent to show the menu (with colors) using fzf.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?