wmctrl -l doesn't inlude the programs from the system tray.

I want to add a keyboard shortcut to open a program being placed to system tray (ktimetracker).

Is it possible?


I solved my case, not a general approach.

It seems a QT-based application can be raised from tray. But in my case though there was a setFocus method, it didn't work.

So I ended up with a solution working for me.

ktimetracker; qdbus-qt5 org.kde.ktimetracker /ktimetracker/MainWindow_1 show; wmctrl -a "KTimeTracker"

ktimetracker - will start if not started.

qdbus-qt5 org.kde.ktimetracker /ktimetracker/MainWindow_1 show - use dbus to show the window, but still unfocused.

And wmctrl -a "KTimeTracker" to focus on it (now wmctrl is able to see the window.

I use the script for a keyboard shortcut to raise my window from tray.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.