Where Does KWin Store Its Config on Linux?
KWin main settings and window rules files for KDE Plasma on Linux.
Last updated
KWin keeps two plain text files in the XDG config dir. kwinrc holds effects, scripts, screen edges and Night Color. kwinrulesrc holds every custom window rule.
Paths shift with XDG_CONFIG_HOME and the home directory name. Default installs use ~/.config. Read values with kreadconfig6 and write them with kwriteconfig6 instead of guessing syntax.
Where KWin stores this, by platform
~/.config/kwinrc
Main KWin settings file for effects, scripts and Night Color. Varies with XDG_CONFIG_HOME and home path. Window rules sit beside it in kwinrulesrc. Apply edits with qdbus6 org.kde.KWin /KWin reconfigure.
Frequently asked questions
How do I back up KWin settings?
Copy kwinrc and kwinrulesrc out of ~/.config with Plasma stopped or from a separate session. Restoring means putting both back and running qdbus6 org.kde.KWin /KWin reconfigure, then logging back in to confirm.
Where are KWin window rules kept?
Rules live in kwinrulesrc, keyed by generated IDs with a count in the General section. Hand edits are easy to break. The System Settings window manager page is safer than editing the file directly.
Notice an outdated path? Let us know.