Extension for KDE's window manager to add space around windows touching a screen edge or other window.
The size of the gap and the layouts and applications to be gapped are configurable.
Please note that this script does not do any automatic tiling. Its purpose is to reshape windows that have been manually positioned with the default KWin window management system.
kwin
version ≥ 5.21.
System Settings > Window Management > KWin Scripts > Get New Scripts … > search for Window Gaps > Install.
git clone https://github.com/nclarius/tile-gaps.git
cd tile-gaps
./install.sh
System Settings > Window Management > KWin Scripts > configuration button in the Window Gaps entry.
You may need to disable the script, apply, reenable, and reapply in order for the changes to take effect.
In Plasma versions < 5.24, a bug in the KWin scripting system [1] [2] causes the configuration not to be found. To fix this, please execute the following commands in a terminal:
sed -i 's/ConfigModule/Library/g' ~/.local/share/kwin/scripts/tilegaps/metadata.desktop
mkdir -p ~/.local/share/kservices5/
ln -sf ~/.local/share/kwin/scripts/tilegaps/metadata.desktop ~/.local/share/kservices5/tilegaps.desktop
qdbus org.kde.KWin /KWin reconfigure
For compatibility with sticky window snapping you can use my fork, which adds an option in the configuration to set the tile gap size between windows, and will properly retain the gap when resizing adjacent windows.
© 2021 Natalie Clarius <natalie_clarius@yahoo.de>
This work is licensed under the GNU General Public License v3.0.
This program comes with absolutely no warranty.
This is free software, and you are welcome to redistribute and/or modify it under certain conditions.
If you would like to thank me, you can always make me happy with a review or a cup of coffee: