This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Communicate with kwin script

Tags: None
(comma "," separated)
academo
Registered Member
Posts
1
Karma
0

Communicate with kwin script

Wed Jul 21, 2021 6:44 am
Hello everyone.

In advance excuses if this is not the right forum to ask this, is the best I found for it:

Is it possible to send a message (or signal) from anywhere in the OS: let's say, a terminal command, a qdbus call or similar? Something I can pass a parameter to the script?

What I want to do is call a kwin script that based on a parameter will activate an specific window, a shortcut to raise.

I know I could set a shortcut to a specific window but I am trying to create a "raise or jump" utility and if I set the shortcut to a window, I still have to manually launch the app, and I also use several instances of the same app with different window class names.

Note I know that wmctrl can do this very easily, but I want this to work in wayland as well so depending on wmctrl is not an option for now.

I already managed to do this by creating "on the fly" kwin scripts that run only once and activate an specific client. But I have to load the script, run it, stop it and unload it every time. I wonder if I could do something reusable.

Thanks!
diem
Registered Member
Posts
8
Karma
0

Re: Communicate with kwin script

Mon Aug 23, 2021 3:49 pm
Hi,

To clarify, do you want your script to run immediately when a certain signal or message occurs, or is it acceptable that the script is run by cron (activating, say, once per minute) and it tests for presence of the signal or message then raises the window if the signal is present? Further, what signal/message are you looking for - what system state is it you wish to detect that triggers the raise?

Cheers,

Ian


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]