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

Can I bind a sequence of actions to a single key stroke?

Tags: None
(comma "," separated)
i92guboj
Registered Member
Posts
4
Karma
0
OS
Hello.

I have been searching for some hours but can't find anything about this.

I am used to some other wm where you can easily build functions that will do several things to a given window. For example, I often need to send a window to the right uppper corner, resize it to fit a max width and height, lock it to the upper layer and un-decorate it. Doing all that by hand twenty times a day can get tedious enough.

So, is there any way to "script" this in a way that's generic enough (i.e. so that it works on the focused window)?
luebking
Karma
0
Of course ;-)

https://techbase.kde.org/Development/Tu ... ng/API_4.9

From what you describe, you may be better of with applying rules to windows, though ("kcmshell4 kwinrules", resp. "kcmshell5 kwinrules" on KDE5) - ie. if the task is to position xeyes ;-)
i92guboj
Registered Member
Posts
4
Karma
0
OS
Thanks, but that won't do.

The task at hand is to be able to rapidly send the focused window to a corner. Sometimes, and depending on what I am doing, that corner might be the top right or the bottom right corner. That way I can continue working in the background window without losing the one in the corner from my view. This "cornerized" window, sometimes is a video that might be relevant to what I am doing, or a terminal with nano or vim, or gcolor2, or whatever else.

I have rules for many windows but this is not a case I can solve with rules. In openbox or fvwm I can easily bind a sequence like this to win+kp_up or win+kp_down, for example, so I would like to be able to do the same with kwin.
luebking
Karma
0
you are - check the link to the script api.
you can bind shortcuts to a script function that does pretty much everything to about any window.
i92guboj
Registered Member
Posts
4
Karma
0
OS
luebking wrote:you are - check the link to the script api.
you can bind shortcuts to a script function that does pretty much everything to about any window.


Sorry. I completely missed the link. That's exactly what I was looking for, but didn't know how to search for it.

I will review it and report back ;)


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft