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

[BUG] Systray updates #1065

Open
3 tasks done
keiko37 opened this issue Apr 5, 2024 · 10 comments
Open
3 tasks done

[BUG] Systray updates #1065

keiko37 opened this issue Apr 5, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@keiko37
Copy link

keiko37 commented Apr 5, 2024

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

Added the systray widget inside the my systembar but it doesn't want to work properly.

Reproducing the issue

Install eww from last master branch. Code below is a simple bar(I commented some unnecessary lines of code).

My setup(if you need anything else let me know):

  • Arch Linux (6.8.2-zen2-1-zen)
  • LeftWM (0.5.1)

Expected behaviour

Just common behavior as in other bars.
I checked in pair with polybar and it's working instead of eww's systray.
It doesn't launch on every tries. Also it doesn't restore list of applications after reloading wm.

Additional context

Part of my systembar.

(include "./systembar/modules/systray/config.yuck")

(defwindow
  systembar
  :monitor 0
  :geometry (
    geometry
    :x "0%"
    :y "-8px"
    :width "98%"
    :height "40px"
    :anchor "bottom center"
  )
  :hexpand false
  :vexpand false
  :stacking "fg"
  :reserve (struts :distance "48px" :side "bottom")
  :windowtype "dock"
  :wm-ignore false
  (systembar)
)

(defwidget systembar []
  (centerbox
  :class "systembar-wrapper"
    :orientation "horizontal"
    ;(systembar-leftside)
    ;(systembar-centerside)
    (systembar-rightside)
  )
)

(defwidget systembar-rightside []
  (box
    :class "systembar-rightside"
    :orientation "horizontal"
    :halign "end"
    :space-evenly "false" 
    :spacing 16
    (systembar-systray)
    ;(systembar-keyboard-layout)
    ;(systembar-bluetooth)
    ;(systembar-vpn)
    ;(systembar-network)
    ;(systembar-cpu)
    ;(systembar-ram)
    ;(systembar-battery)
    ;(systembar-datetime)
  )
)

(defwidget systembar-systray []
  (systray
    :class "systembar-systray"
    :spacing 5
    :orientation "horizontal"
    :space-evenly "true"
    :icon-size 28
    :prepend-new "true"
  )
)
@keiko37 keiko37 added the bug Something isn't working label Apr 5, 2024
@victorz
Copy link

victorz commented Apr 22, 2024

Could it be because you have set :space-evenly and :prepend-new as strings? They are supposed to be bool values, according to the docs:

https://elkowar.github.io/eww/widgets.html#systray

Does it work if you change it from "true" to true?

@keiko37
Copy link
Author

keiko37 commented May 1, 2024

Could it be because you have set :space-evenly and :prepend-new as strings? They are supposed to be bool values, according to the docs:

https://elkowar.github.io/eww/widgets.html#systray

Does it work if you change it from "true" to true?

I tried and that's didn't help. As I know it's string with boolean type converts to the boolean under the hood. Also I using string variations in other places and everything is ok.

P.S. Sometimes it works. But when it is working most cases it is when you add something into the tray after opening(another words in my case systray just don't restore already opened apps).

@victorz
Copy link

victorz commented May 3, 2024

What does happen, then? You say it doesn't work properly. Does something happen? An error message when you type eww reload?

@keiko37
Copy link
Author

keiko37 commented May 4, 2024

Nothing happened, just normal behavior. I can see systray container in gtk devtools, but it has 0 width with no content. It should at least show the nm-applet which is enabled every time after boot/reload.
But if I try to add width and colors to the space it will be visible. So I think it's enabled, but doesn't want to show the data about current apps.

@Tumbleweeds
Copy link

I'm experiencing something similar. I have 3 programs that use the systray: nextcloud client, keepassxc and udiskie. Out of those, only nextcloud client shows in the eww systray, but if I enable systray in dusk (fork of dwm), all three show. I'm still testing, trying to figure out what are the differences in the notification of those three and will post my findings later this week.

@TheStachelfisch
Copy link

TheStachelfisch commented May 25, 2024

Having the same issue here, out of all tray items that I have, only Vesktop shows up. Other apps like KeepassXC, syncthing-tray and cbatticon just don't show up. I'm using 0.6.0-unstable-2024-04-26 from nixpkgs-unstable.
Is there any way I could debug this further with eww tools? eww debug doesn't provide any data about the system tray.

Fwiw, Trayer also doesn't show any of the system tray icons

@g-regex
Copy link

g-regex commented Jun 25, 2024

I have a similar problem on wayland (hyprland). I don't have many applications at hand to test the tray - only keepassxc and pasystray. Neither of them shows up in the eww tray. In waybar's tray it's working without a problem. For debugging purposes I also tried it on X11 (i3), but it's the same problem there.

@TheStachelfisch
Copy link

TheStachelfisch commented Jun 26, 2024

After a bit more observing, I found that the issue only happens, when apps are started before eww itself is started.
eww doesn't seem to probe for apps that have already been started before eww has been. For instance if I close all my tray apps, then start eww and after that open all my tray apps again they all show up.

It seems to be, that eww needs to probe for already registered tray apps even after it was started.

@fbartelt
Copy link

I encountered a similar issue with nm-applet as @keiko37. Using the current release 0.6.0 of eww with i3wm, initially nm-applet wouldn't display its tray icon even when launched after eww and regardless of other trays being initialized. However, this behavior changed after I switched to nm-applet --indicator. Interestingly, the tray icon now appears even when nm-applet is initialized alone.

Here's a snippet from my i3 configuration

exec_always --no-startup-id /home/fbartelt/.config/eww/launch.sh &
exec --no-startup-id nm-applet --indicator

This setup has worked for me after several reboots, but I cannot guarantee it as a 100% solution.

@g-regex
Copy link

g-regex commented Jun 26, 2024

Like in the case of @fbartelt, it unfortunately does not make any difference for me either whether I start applications before or after eww on X11 or wayland (also irrespective of other bars that might display a tray). Besides keepassxc and pasystray, mentioned in my previous post, I also tried nheko and nicotine, which have tray icons. I do not have nm-applet or nextcloud-client installed to test for their behaviour though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants