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

Custom windows movements

Tags: None
(comma "," separated)
nopaste
Registered Member
Posts
3
Karma
0

Custom windows movements

Sun Nov 25, 2018 8:24 pm
Hello guys,

I really like managing the windows positions with a shortcut: meta + numpad#.
I find them very intuitive: to put a window in the upper left corner, I press meta + the upper left number in the numpad.


I bought a new ultrawide 21:9 monitor, so I'd like to have some shortcuts to organize windows "in the center" (splitting the screen width in three).

I mean, I'd like to have these shortcuts:

  • meta + numpad7 = move window to up left
  • meta + numpad8 = move window to up center
  • meta + numpad9 = move window to up right

  • meta + numpad1 = move window to down left
  • meta + numpad2 = move window to down center
  • meta + numpad3 = move window to down right

  • meta + numpad4 = move window to the left, whole height
  • meta + numpad5 = move window to the center, whole height
  • meta + numpad6 = move window to the right, whole height

  • meta + numpad0 = maximize window

Or something like that...


But I have absolutely no idea on how I can do this. Do you?

Ok, I managed to implement this in a KWin script
kde-dargaud
Registered Member
Posts
3
Karma
0

Re: Custom windows movements

Mon Nov 26, 2018 12:51 pm
What does your script look like ? And anyway, how did you get the original keys to do that, it seems interesting (like some strange window managers I experimented with a while back) ?
nopaste
Registered Member
Posts
3
Karma
0

Re: Custom windows movements

Mon Nov 26, 2018 7:54 pm
kde-dargaud wrote:What does your script look like ? And anyway, how did you get the original keys to do that, it seems interesting (like some strange window managers I experimented with a while back) ?

Here it is: https://www.opendesktop.org/p/1276605/
I'm new to KWin scripting, the code is very simple... probably it could be improved.

Even though I'm facing some problems that I'm not able to resolve, it seems.

  • The default shortcuts are not working, they must be set manually from the global shortcuts menu
  • Upon removing the script, the registered shortcuts do not get removed! I changed some names, and now I have a lot of duplicates in the settings.

If you happen to know how to solve this I'd be very happy!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]