Minimize to tray feature for arbitrary app

I started working on a third party KWin script GitHub - luisbocanegra/kwin-minimize2tray: Hide windows to the system tray, similar to KDocker but in the form of a KWin Script that works on Wayland

Minimized app has no Task Manager icon

Currently works like that

No ‘support’ from app itself. It should be possible to apply this for any app like KCalc or firefox. All apps including non-Qt. I think it’s fine to have it for Wayland apps only but I don’t see why X11 apps can’t work same way. But no need to support X11 session (Kdocker still works)

Works for any window, not grouping per app, each window gets its own tray icon

Popup menu may just show usual window decoration items.

Just the basics for now

Ability to assign global hotkey to restore app (if it’s standard StatusNotifierItem then it already can be scripted).

Not yet, no idea how or if possible

Huge plus: ability to change item visibility in usual tray settings including ‘requires attention’ feature.

Seems doable

Huge plus: catch “close window” button/shortcut and minimize to tray instead.

Not sure if the KWin scripting API allows this, will have to try

2 Likes