Skip to content
KWin script to center a window in KDE Plasma
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
contents/code added link to kwin documentation Jul 29, 2018 Created a readme file Jul 29, 2018
metadata.desktop first commit Jul 29, 2018

Center window in KDE Plasma using KWin scripting

This is a very simple KWin script that does three things via shortcuts that the user can control:

  • resizes the current window to 100 % height and 50 % width of the screen
  • grows it horizontally if needed in 40 px steps
  • shrinks it horizontally if needed in 40 px steps

I use this functionality every day with my 27" 2K screen. It's super useful to not have your web browser or what not take the whole horizontal space. The growing and shrinking are extremely useful, too.


Clone this repo somewhere. Then just run plasmapkg2 --install . inside the directory.

The script itself is SUPER easy to follow so checkout contents/code/main.js and customize it to fullfil your needs.

You can’t perform that action at this time.