kwriteconfig5
Write configuration values to KDE configuration files
TLDR
Set a global configuration key
Set a key in a specific configuration file
Delete a key
Use systemd to start the Plasma session when available
Hide the title bar when a window is maximized (like Ubuntu)
Configure KRunner to open with the Meta (Command/Windows) global hotkey
Display help
SYNOPSIS
kwriteconfig5 [--file <filename>] [--group <group> [--group <subgroup>...]] --key <key> [--type <type>] [<value>]
PARAMETERS
--file <filename>
Configuration file to modify (default: kdeglobals in ~/.config/)
--group <group>
Top-level group; repeatable for subgroups (e.g., group1 group2)
--key <keyname>
Name of the key to set or remove
--type <type>
Value type: string (default), bool, int, double, Point, Rect, Size, Color, Font, PathList
--locale <locale>
Locale for translation keys (e.g., en_US)
DESCRIPTION
kwriteconfig5 is a command-line utility from KDE Frameworks 5, used to modify configuration files for KDE Plasma 5 applications and the desktop environment. KDE stores settings in .ini-style files under ~/.config/, and this tool allows precise, scripted updates to specific keys within groups.
It ensures proper formatting, data type handling, and immediate effect after execution (triggering config reloads where applicable). Ideal for automation, post-install scripts, or batch configuration. If no value is provided, the entry is deleted. Supports nested groups via multiple --group options and various data types like integers, booleans, colors, and fonts.
Default file is kdeglobals; most changes require logout/login or service restart for full effect in Plasma.
CAVEATS
Requires --group and --key; no value deletes entry. Changes may need Plasma restart. System-wide configs need root/sudo. Invalid types cause errors.
EXAMPLES
kwriteconfig5 --file kwinrc --group Windows --key BorderSnapZone 10
Sets window border snap to 10 pixels.
kwriteconfig5 --file plasma-org.kde.plasma.desktop-appletsrc --group Containments 12 --key formfactor 2
kwriteconfig5 --file kdeglobals --group KDE --key SingleClick false
Disables single-click (removes if no value).
EXIT CODES
0: success; 1: error (invalid args/type); prints to stderr on failure.
HISTORY
Part of KDE Frameworks 5 (2014+), replacing kwriteconfig4 for Qt5/Plasma 5. Evolved from KDE 3/4 tools for modern config system.
SEE ALSO
kreadconfig5(1), kconfig(7)


