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

[Feature Request] System tray provider #57

Open
GhoulBoii opened this issue Apr 20, 2024 · 4 comments
Open

[Feature Request] System tray provider #57

GhoulBoii opened this issue Apr 20, 2024 · 4 comments
Labels
help wanted Extra attention is needed type: feature New feature or request

Comments

@GhoulBoii
Copy link

Hello! I have looked through the configs and docs but cannot find an option to have a system tray provider. Is there a way to show the system tray in the bar?

@lars-berger lars-berger changed the title System Tray System Tray provider Jul 23, 2024
@lars-berger lars-berger added type: feature New feature or request help wanted Extra attention is needed labels Aug 10, 2024
@lars-berger lars-berger changed the title System Tray provider [Feature Request] System tray provider Aug 11, 2024
@github-project-automation github-project-automation bot moved this to 📬 Triage in zebar Aug 11, 2024
@xxami
Copy link

xxami commented Sep 16, 2024

worth looking at https://github.com/cairoshell/ManagedShell for reference on this, looks like quite a bit of windows api fiddling 🙈

@GhoulBoii
Copy link
Author

Hi! I have tinkered around with the tray functionality in python already. I have made it work with the windows API on windows 10, copying most of the functionality from managedshell. However, I have not been able to make it work with the same method on windows 11. I used Seelen UI's functionality of UI automation to get a basic implementation on win 11.

Unfortunately, I haven't been able to get the time and motivation to further work on this. If someone more familiar with how managedshell/cairoshell works on windows 11 or a more polished version of the seelen ui implementation, then please contribute. Porting the existing version to rust would also be a great help since I am not familiar with rust syntax.

Win10 Python Systray: https://github.com/GhoulBoii/python-systray
Win11 Barebones implementation: https://github.com/GhoulBoii/python-systray/tree/win11
GlazeWM Discord Thread regarding the same: https://discord.com/channels/1041662798196908052/1267433216084541473

@xxami
Copy link

xxami commented Sep 18, 2024

managedshell appears to have two different ways of doing it, the one in your python example, and another way which might be more portable, if i'm understanding it correctly:

  • create a window with the same class name as the explorer tray ("Shell_TrayWnd")
  • put your window above the explorer one in z-index
  • it should receive messages intended to be sent to the explorer tray window which you can forward back down with SendMessage
  • read the WM_COPYDATA message to get icon data

if this works it could be kind of cool because it can also work without the presence of explorer.exe, but it would mean the bar has to launch before all the applications call Shell_NotifyIcon to set up their tray icon.

haven't tested it yet though so might be chatting garbage 😅

@PumaFPV
Copy link

PumaFPV commented Nov 19, 2024

Hey, have you been able to work onto this feature? It is the only thing holding me back from zebar (I depend on a few apps running inside the systray)... I don't think I can be of any help, unless I can test stuff I you need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type: feature New feature or request
Projects
Status: 📋 Available
Development

No branches or pull requests

4 participants