Hi KDE devs & community,
I’m like to work on a small CLI tool that can create, update, and delete KDE window rules (~/.config/kwinrulesrc). The idea is to allow power users and automation scripts to manage window behavior dynamically — similar to how tools like xdotool or wmctrl interact with windows in real time, but it works with kde internal settings like “layerrule” (listed as layer in the window rules gui).
Right now, my workflow is:
Edit the kwinrulesrc config programmatically.
Run:
qdbus org.kde.KWin /KWin reconfigure
to apply the changes.
However, this call reloads all KWin configuration (decorations, scripts, effects), which causes a visible UI flicker or reset.
What I’m looking for is:
Is there any DBus command or mechanism to only reload window rules,
or a way to re-parse kwinrulesrc without affecting other parts of KWin?
If this isn’t possible right now, I think there’s potential here to improve the KWin rule system to support dynamic window rules in the future. A dedicated CLI interface or DBus API to manage and reload window rules selectively would open the door for:
Per-window scripting automation
Tiling setups or kiosks that respond to app launches
Rule versioning or switching on the fly
GUI tools or DE-integrated utilities for rule editing
Would appreciate any insight on whether this is feasible today, or if not.
Thanks in advance!