tile-gaps
tile-gaps copied to clipboard
KWin script to add space around windows touching a screen edge or other window
Window Gaps
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 stock KWin window management system.

Installation
Dependencies
kwin
.
Installation via graphical interface
Please make sure to select the most recent version in the installation process.
Please do not use Discover for installation since a bug causes a wrong version to be installed.
- Install the script via System Settings > Window Management > KWin Scripts > Get New Scripts … > search for Window Gaps > Install.
- Enable the script by activating its checkbox, and apply the settings.
Installation via command line
git clone https://github.com/nclarius/tile-gaps.git
cd tile-gaps
./install.sh
Configuration
System Settings > Window Management > KWin Scripts > Window Gaps > configuration button.
You may need to uncheck the checkbox for the script, apply the settings, recheck, and reapply in order for the changes to take effect.
In Plasma versions < 5.24, a bug in the KWin scripting system [1] [2] may cause 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
Panels
Gaps on panels are not provided by this extension, but by the panel itself:
- For Plasma: Right-click on panel > Enter Edit Mode > More Settings... > Floating Panel.
- For Latte: Right-click on panel > Edit Panel... > Appearance > Margins > Screen Edge.
If you have any floating panels, specify this in the configuration so that gaps can be adjusted accordingly.
Sticky Window Snapping
For Sticky Window Snapping to work with gaps, make sure you have the threshold in the SWS configuration set to at least the largest gap size.
Applications
To find the window class name of an application: Right-click on the titlebar of a window of the application > More Actions > Configure Special Application Settings... > the pre-filled entry in Window class (application) (if it consists of two words, only the second part) is the window class to put in the script configuration.
Small Print
© 2021-2022 Natalie Clarius <[email protected]>
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: