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

cmst not showing in systray when using stalonetray #269

Closed
RayZ0rr opened this issue Mar 24, 2022 · 5 comments
Closed

cmst not showing in systray when using stalonetray #269

RayZ0rr opened this issue Mar 24, 2022 · 5 comments

Comments

@RayZ0rr
Copy link

RayZ0rr commented Mar 24, 2022

I am using stalonetray as system tray for my window manager. However, I don't always keep it open. I only open it when required with the following in my polybar:

#!/bin/bash

if pgrep -x "stalonetray" > /dev/null
then
    killall stalonetray
else
    stalonetray
fi

However, if I open cmst without stalonetray visible it shows dialog on not spawning systray instance. Other applications like flameshot, virt-manager and steam doesn't have this issue. They create systray instance nonetheless.

@andrew-bibb
Copy link
Owner

Sorry for the delay, been buried trying to push a new release out.

The behavior you are describing is intentional. If a systemtray does not exist at program startup CMST will throw up that popup. The wait time to search for the tray can be specified in the "Preferences" which can be helpful if you start the stalonetray when you start CMST and you need to give it some more time. If you only want to run CMST without being able to minimize it to the system tray you can completely disable the tray icon in "Preferences". Both of these are also available as command line switches.

@RayZ0rr
Copy link
Author

RayZ0rr commented Apr 20, 2022

Can the wait time be specified such that, cmst doesn't throw pop-up and waits for systray till it's available all the time? As you can see above, my systray script toggles stalonetray by killing and creating it again.

@andrew-bibb
Copy link
Owner

I just checked the documentation for QSystemTrayIcon and it says that if no tray is available that it will automatically start if the systemtray becomes available later. I don't know if this is a recent feature of if I totally screwed it up years ago when I first wrote the wait-time code. I'm pretty sure it is new because I wrote the wait-time code when people were reporting problems starting the program before the systemtray was available and it was added to give time for the systemtray to come up.

I think this will be a simple fix of moving or completely removing the dialog. In addition to the wait-time I also have timers (I think there are 3 of them) built in to try and install the icon before the dialog is thrown up. I can probably eliminate all those as well. Anyway I'm trying for a release in the next week or maybe two at the outside and if this is as easy as I think it will be I'll have it incorporated in that release.

@RayZ0rr
Copy link
Author

RayZ0rr commented Apr 27, 2022

This is awesome work. Thank you. One more question, are you using iwd or wpa_supplicant?

@andrew-bibb
Copy link
Owner

I tried iwd a while back and it seemed a bit buggy to me. One of the biggest issues I personally had with it was that the service could not be started by Connman when needed. One needed to start it manually with a script or by a systemd unit. In the grand scheme of things not really all that big of a deal, but it just irritated me. There were a couple of other issues I observed using it but can't remember exactly what they were now that we're a couple of years down the road. I went back to using wpa-supplicant. It has been a few years now so probably should try iwd again to see how it has progressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants