prasanthrangan / hyprdots

// Aesthetic, dynamic and minimal dots for Arch hyprland
GNU General Public License v3.0
5.78k stars 696 forks source link

[Bug]: Missing system tray icons #856

Closed TitanHZZ closed 5 months ago

TitanHZZ commented 5 months ago

Bug Report

Description

Some apps like Spotify should have system tray icons but they do not. Others like OpenRGB, only have an icon in the system tray when opened as a regular user, as root there is no icon but, please note that i manually compiled OpenRGB as i am developing support for a new device, i didn't test any package.
Also, i am using Brave and i think it should have a tray icon but it does not. Not sure tho.
But, some apps do work as expected such as Discord and Stremio, so not really sure what is going on.

Steps to Reproduce

  1. Install, as an example, Spotify
  2. Open Spotify

Expected Behavior

Waybar would have a tray icon for Spotify.

Actual Behavior

No system tray icon.

Environment

flags: (if any)

kRHYME7 commented 5 months ago

Spotify and Brave do not have a tray icon. Are pertaining to Active window Icons?

Tray Icons are different things and specific to applications. Discord has a tray icon.

Can we see a screenshot of your waybar?

TitanHZZ commented 5 months ago

Spotify did have a tray icon in X11, OpenBox.

I am not sure what you asking here Are pertaining to Active window Icons?, sorry.

This is my waybar: image

RookiexCookie commented 5 months ago

@TitanHZZ Brave doesnt have a tray icon but spotify does yes can you check in the spotify setting under equalizer have you checked this option? image

if you did it will look like this image

kRHYME7 commented 5 months ago

My bad, spotify does indeed have an Icon.

What I mean by active window icons are this at the center. image

this is the module for windows hyprland/window

TitanHZZ commented 5 months ago

@RookiexCookie That did it for Spotify, thanks. My bad ( tho i don't remember ever enabling that :/ ). I also installed OpenRGB and, just like the manually compiled version, it works well as a normal user but no tray icon (or even qt theme!) when running as root. I am assuming Waybar only "accepts" tray icons for normal users, is that right?

kRHYME7 commented 5 months ago

@TitanHZZ I think tray icons are coded by the application itself. Not all apps have a system tray.

window:center systemtray: rightmost image

, it works well as a normal user but no tray icon (or even qt theme!) when running as root.

Did you run waybar and hyprland as root also?

TitanHZZ commented 5 months ago

Did you run waybar and hyprland as root also?

No, just OpenRGB.

kRHYME7 commented 5 months ago

Why run it as root? Based on my basic knowledge of the Linux file system I think if you run an application with root the session of that application is in root / not in /home/$user/ Now if your configs are inside your home directory and also the session is primarily launch by user like Hyprland or waybar, how would your application even know where to find those configs/data?

BTW, openrgb works fine like you said. Where are we now for the issue again? image

Also, i am using Brave and i think it should have a tray icon

Do brave have a system icon?

TitanHZZ commented 5 months ago

Why run it as root?

I was testing support for a new device. That is why i opened it as root and noticed that there is no tray icon or qt theme applied. But sometimes apps do need root to work like Grub Customizer and as a result they have no theme. In the case of Grub Customizer there is no tray icon anyway so no problems there.

Based on my basic knowledge of the Linux file system I think if you run an application with root the session of that application is in root / not in /home/$user/ Now if your configs are inside your home directory and also the session is primarily launch by user like Hyprland or waybar, how would your application even know where to find those configs/data?

Yeah, that makes total sense.

Where are we now for the issue again?

Not really sure to be honest. I do think apps should be able to have tray icons (and themes) regardless of the user that started them but i totally understand if that is not something relevant to the project because GUI apps with root privileges are not that common as far as i know.

Do brave have a system icon?

Yes it does. System icons work well but it does not have a tray icon as it is not supposed to have one (sorry about that).

kRHYME7 commented 5 months ago

Yes I understand now, let's just say that this project is basically dot files or .config files. This means that configurations are only on USER wide scale. Some apps need to run with sudo because they are systemwide apps.

GUI apps with root privileges are not that common as far as i know.

Unless the GUI needs to access systemwide files /. then a polkit will popup asking for sudo.

BTW I've seen on your waybar, that you're not enabling the module that displays the window icons, is that your preference?

Thanks to this open issue I reenabled Spotify's systray.

TitanHZZ commented 5 months ago

Yes I understand now, let's just say that this project is basically dot files or .config files. This means that configurations are only on USER wide scale. Some apps need to run with sudo because they are systemwide apps.

So, we would need to apply those same dot files and config files to the root user to get the themes and tray icons to work? Symlinks, env variables pointing to the user configs? We could just apply all the configs to the root user as well but that just sounds overkill and honestly, i am not really sure if applying custom configs to the root user is something normal in Linux ricing.

Unless the GUI needs to access systemwide files /. then a polkit will popup asking for sudo.

That is exactly what happens with Grub Customizer.

BTW I've seen on your waybar, that you're not enabling the module that displays the window icons, is that your preference?

Uhm, weird. I just selected the waybar style i liked the most, i didn't disable anything.

kRHYME7 commented 5 months ago

So, we would need to apply those same dot files and config files to the root user to get the themes and tray icons to work? Symlinks, env variables pointing to the user configs? We could just apply all the configs to the root user as well but that just sounds overkill and honestly, i am not really sure if applying custom configs to the root user is something normal in Linux pricing.

That's not even a good practice

Uhm, weird. I just selected the waybar style i liked the most, i didn't disable anything.

I see here's how you can add window icons to your bar also how to modify https://github.com/prasanthrangan/hyprdots/wiki/Theming#waybar image

TitanHZZ commented 5 months ago

That's not even a good practice

Yeah, kinda saw that coming.

I see here's how you can add window icons to your bar also how to modify https://github.com/prasanthrangan/hyprdots/wiki/Theming#waybar

Gonna take a look a that. Thank you.

RookiexCookie commented 5 months ago

@TitanHZZ i think brave only have a tray icon for one thing i asked phind ai and it searched and got results from github , reddit and stuff to find that only for vpn connection brave has a tray icon, heck i've never seen that icon cuz i never used vpn feature of brave but so ya image

kRHYME7 commented 5 months ago

@TitanHZZ is this issue resolved for now? Can we close this?

TitanHZZ commented 5 months ago

Yeah, i think we can.