Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Libappindicator tray

Alexays opened this issue · comments

Tray beta now shipped :)

Bugs I noticed:

  • Menu not correctly positioned (also Tooltips) #63
  • Support multi modules
  • With multiple apps in tray, only the last is interactive, the others cause crash

Electron apps

You need libappindicator-gtk3 (added to AUR package)
and launch apps with env XDG_CURRENT_DESKTOP=Unity slack

Is it possible to define which bar the tray icons will show up on (multi-monitor setup)?

Not at the moment, but it's a good feature to have :)

I guess I'll report here, instead of spamming issues, since this a beta feature.

When restarting the bar, only Telegram and Keybase icons remain. Slack and Caprine are gone.

Also, Discord never appears at all, for some reason, even with the latest fixes.

Upon further usage, it looks like Keybase doesn't re-appear consistently either, only sometimes.

Right-clicking the Keybase tray outright crashes the bar, every time. Other apps crash the bar too when right-clicking, but I can't consistently reproduce it.

Sometimes the bar fails to start. Can't consistently reproduce either, but it eventually happens after launching and killing it repeatedly (segfault, no special error).

Not sure if of any use, but when launching the bar I get these two:

An object is already exported for the interface org.kde.StatusNotifierWatcher at /StatusNotifierWatcher
GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Status Notifier Host with bus name ':1.308' and object path '/StatusNotifierHost' is already registered

Also, Slack's icon doesn't change when there are new messages. Don't know if Slack's/Electron's or Waybar's fault though. May or may not be affecting Caprine and Keybase too, just haven't received any messages in them yet.

Do you have a multi-screen configuration?
And the fact that the slack icon doesn't change is normal, it's just that there's no code to manage the tray change 😆
I can't reproduce the right click :/
edit: got the sigsev i look at it

Yep, I see where this is going 🙂 I have two monitors, both have a bar.

@jeremejevs Can your check if the crash is still present in the last commit? :)
edit: I reproduced it, too bad :/

Yep, the issue is still there, unfortunately. I have also noticed that in some conditions, if the first icon you right-click on after launching Waybar is Keybase, then right-clicking on other icons still opens Keybase's tray menu. Had that happen with Telegram too. Peculiar.

@jeremejevs I found time to work on it a little bit and it's normally fixed now :) (ba79b4d)

Tested, no crashes or mixed up menus, thanks! 🙂

Only issue remaining - no Discord icon.

Telegram icon always has 1 notification
image
and never updates. is it fixable by some library or do i wait for fix in here?

@rvi64 I didn't implement the icon updates, if I find time I will do it next week

Hi I don't know if I should create a specific issue, or if trail icons related issues are grouped here.
Tell me and I'll create one.

issue :
Some icons are large, (VLC in my case) and resizes the height of the bar to the height of the icon.
I didn't look, in the code yet, but it don't seems difficult to fix.
I can look into it if needed just help me a bit to dive into the codebase.

@NokiDev Oh, I thought I fixed it, so I'm watching it next week. :)

Also getting the large icon issue with Insync, but the rest work fine.

edit: Just got the issue with the VLC applet and the cone is ginormous although the bar doesn't change size, so just a piece of it is visible 🤣

@Alexays tray doesn't show up for me. How do I log this behavior? There are no error messages in the console log

@Sandmonster What are the applications that are supposed to be displayed in the tray?

@Alexays nvm, nm-applet doesn't show up, everything else is as supposed to be

@Sandmonster if you are on archlinux the nm-applet pacakge must be recompiled with a flag to support the new tray protocol

I get the large icon/bar issue with radiotray-ng.

Thanks for the functional example @mxmilkb it's now fixed with aeec80f

On archlinux, with the system updated I'm not seeing the nm-applet nor blueberry-tray icons, any way to make sure they are compiled with the correct flag?

Also, the Telegram icon dissapear if I restart waybar (not sure if this has something to do with the updating icons).

Using both community/waybar and aur/waybar-git.

The AUR has a package "network-manager-applet-indicator" which compiles nm-applet with the correct flags. For bluetooth, blueman-applet works out of the box, but I'm not sure about the details regarding blueberry.

Thanks @tmstieff ! I've replaced blueberry with bluemon and that shows the icon, but the AUR package you say isn't showing up as expected, is this one?

That's the correct package. I forgot to mention that you'll need to pass --indicator on the exec command @fmartingr :

exec --no-startup-id 'nm-applet --indicator'

@tmstieff Oh, that did the trick! Thanks!

@tmstieff Should the right click functionality be working correctly with both of them?

@mijoharas Mine works but the overlay is shown centered on the screen rather tan on mouse cursor position.

Thanks to @alebastr for finishing the tray implementation ❤️
PS: i'll create another issue for the XEmbed proxy and for the the overlay pb look at #63

commented

nm-applet works shows up fine in the tray, but segfaults when trying to connect to unknown wifi networks.

Crashes when running TeamViewer 14. Need a display manager to reproduce though, since TeamViewer won't work without one. Certainly related to SNI:

Failed to create DBus Proxy for org.kde.StatusNotifierItem-11561-1 /StatusNotifierItem: std::bad_cast
commented

image

The popup from QT applications like the one in the image doesn't show on waybar.
I tried it with the app ripcord, I remember it working on polybar.

Reference: https://doc.qt.io/qt-5/qtwidgets-desktop-systray-example.html

nm-applet works shows up fine in the tray, but segfaults when trying to connect to unknown wifi networks.

@varac linking the correct Gnome issue (for those experiencing the same issue with nm-applet)
https://gitlab.gnome.org/GNOME/network-manager-applet/issues/64

Can someone point me towards how I would go about figuring out why for example the blueberry-tray doesn't work with this?

I assume there is some way waybar polls for info and a way tray-apps should publish there info?
If I want to waste my time debugging this, any hints where/how to start on this?
Thanks :)

Here if tray icon has a menu, it appears under window and is not clickable:
20200514_15h46m59s_grim

If somebody stumbles upon this, env XDG_CURRENT_DESKTOP=Unity SOME_ELECTRON_APP is not necessary anymore. Slack works fine on the tray with that value set to sway.

@eoli3n I believe that issue is fixed by swaywm/sway@4a27292

sway 1.4 libappindicator 12.10.0-14 waybar v0.9.2 issues with the menu under window exists

@niktob560 as I mentioned earlier it's an issue with sway.

Waybar v0.9.3 libappindicator 12.10.0.r296-1 and sway 1.5 issue with the menu under window does not existsts

commented

Hi!
On debian bullseye (11), I can't see any electron app icons (Zulip, Element).

dpkg -l | grep -E '(sway|waybar|libappindicator)'
ii  gir1.2-appindicator-0.1:amd64                     0.4.92-8                            amd64        Typelib files for libappindicator1
ii  gir1.2-appindicator3-0.1:amd64                    0.4.92-8                            amd64        Typelib files for libappindicator3-1
ii  libappindicator-dev                               0.4.92-8                            amd64        allow applications to export a menu into the panel -- development
ii  libappindicator-doc                               0.4.92-8                            all          allow applications to export a menu into the panel -- documentation
ii  libappindicator1:amd64                            0.4.92-8                            amd64        allow applications to export a menu into the panel
ii  libappindicator3-1:amd64                          0.4.92-8                            amd64        allow applications to export a menu into the panel -- GTK3 version
ii  sway                                              1.5-7                               amd64        i3-compatible Wayland compositor
ii  sway-backgrounds                                  1.5-7                               all          Set of backgrounds packaged with the sway window manager
ii  swaybg                                            1.0-2                               amd64        Wallpaper utility for Wayland compositors
ii  swayidle                                          1.6-2                               amd64        Idle management daemon for Wayland
ii  swaylock                                          1.5-2                               amd64        Screen locker for Wayland
ii  waybar                                            0.9.4-1                             amd64        Highly customizable Wayland bar for Sway and Wlroots based compositors

I have tested various environment variables:

env | grep XDG
XDG_CURRENT_DESKTOP=sway
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=sway
XDG_SESSION_ID=12
XDG_SESSION_TYPE=wayland
XDG_VTNR=1

Also XDG_CURRENT_DESKTOP=Unity...

The following works though:

  • Telegram
  • blueman
  • nm-applet
  • nextcloud (not always).

What is XDG_SESSION_DESKTOP=Unity supposed to fix anyway? I removed it from my environment some time ago and my tray works fine.

commented

So, I am not sure if this was the reason (because I was trying to fix another problem with podman and cgroups rights), but I installed dbus-user-session and after a reboot I have now all my icons...

And @luispabon I have just tested removing all the XDG env variables, it works.

commented

sparkleshare doesn't show the tray icon. Telegram, however, does.

What could be the problem?

sparkleshare doesn't show the tray icon. Telegram, however, does.

What could be the problem?

I have the same issue with Nextcloud Client

20220306_19h37m18s_grim

how to define icon theme for the tray? I cannot find a way in the manual

how to define icon theme for the tray? I cannot find a way in the manual

@875d were you ever able to sort this out? I tried using gsettings as waybar seems to follow the GTK theme, but I'd like only to change the icons on the tray, not on every app

how to define icon theme for the tray? I cannot find a way in the manual

@875d were you ever able to sort this out? I tried using gsettings as waybar seems to follow the GTK theme, but I'd like only to change the icons on the tray, not on every app

No I didn't. I still have those horrible terrible icons.

how to define icon theme for the tray? I cannot find a way in the manual

@875d were you ever able to sort this out? I tried using gsettings as waybar seems to follow the GTK theme, but I'd like only to change the icons on the tray, not on every app

No I didn't. I still have those horrible terrible icons.

Well, I just opened this issue, which addresses our woes, in case you'd be interested.

Still finding Sparkleshare without a tray icon, fyi (though vlc's icon works fine). Thanks for the work here! ❤️

how to define icon theme for the tray? I cannot find a way in the manual

@875d were you ever able to sort this out? I tried using gsettings as waybar seems to follow the GTK theme, but I'd like only to change the icons on the tray, not on every app

@7ff04da4aa6ac37197e249299066ac30 I believe you must define some strategy via CSS variables (gtk) to obtain the color alternation following the color-scheme key of the org.gnome.desktop.interface schema using gsettings.

Is there a way to specify certain icons to hide or show in the try? If not, is this a possible feature?

i'm using youtube-music Desktop and its icon is displayed correctly but when it tries to display the tooltip logs this error:

(waybar:14052): Gtk-WARNING **: 11:40:26.500: Failed to set text 'YouTube Music: deadmau5 & Kaskade - I Remember' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &

Hello,
I am not able to make my tray appear in my waybar. I have the package libappindicator-gtk3installed and I even tried exporting the variable XDG_CURRENT_DESKTOP=Unity slack but still doesn't work.

Do you have an idea on where may the problem come from?

I am on archlinux.

Thanks in advance!

Hello, I am not able to make my tray appear in my waybar. I have the package libappindicator-gtk3installed and I even tried exporting the variable XDG_CURRENT_DESKTOP=Unity slack but still doesn't work.

@victorballester7 Does this comment help?

Hi! thanks for your answer @jman-schief.

Actually I also tried with sway only but it didn't work either... :(