Extract KDE settings and convert to plasma-manager Nix configuration
Extract current KDE/Plasma settings from config files and convert them to declarative plasma-manager Nix configuration.
If parameters are missing from $ARGUMENTS, use mcp_question to gather them:
mcp_question({
questions: [
{
question: "Which KDE config file do you want to extract?",
header: "Config File",
options: [
{ label: "kwinrc (Recommended)", description: "Window manager settings" },
{ label: "kdeglobals", description: "Global theme, fonts, colors" },
{ label: "kglobalshortcutsrc", description: "Keyboard shortcuts" },
{ label: "plasmarc", description: "Plasma shell settings" },
{ label: "all", description: "List all available config files" },
{ label: "Enter other...", description: "Specify custom config file" }
]
}
]
})
Expected $ARGUMENTS format: <config_file> [section_filter]
kwinrc (all sections)kwinrc TabBox (only TabBox section)all (list all config files)Parse arguments from $ARGUMENTS
If "all" or empty, list available KDE config files:
ls -1 ~/.config/k* ~/.config/plasma* 2>/dev/null | grep -v '.lock' | head -30
Then ask user which file(s) to extract.
Read the specified config file(s):
cat ~/.config/<filename>
Parse the INI format and convert to plasma-manager configFile format:
KDE INI format:
[Section]
Key=Value
[Section][Subsection]
Key=Value
Converts to Nix:
configFile = {
"<filename>"."Section"."Key" = <value>;
"<filename>"."Section][Subsection"."Key" = <value>;
};
Handle value types:
true/false -> Nix booleansOutput the Nix configuration in a format ready to paste into programs.plasma.configFile:
# Add to programs.plasma in your home-configuration.nix
configFile = {
# <filename> settings
"<filename>"."Section"."Key" = value;
};
If a specific section was requested, filter output to only that section.
| File | Contains |
|------|----------|
| kwinrc | Window manager (tiling, TabBox, effects, desktops) |
| kdeglobals | Global KDE settings (theme, fonts, colors) |
| kglobalshortcutsrc | Keyboard shortcuts |
| plasmarc | Plasma shell settings |
| plasma-org.kde.plasma.desktop-appletsrc | Panel and widget config |
| kscreenlockerrc | Lock screen settings |
| kcminputrc | Input device settings |
| ksmserverrc | Session manager settings |
/kde-extract kwinrc
Extracts all kwinrc settings as Nix config.
/kde-extract kwinrc TabBox
Extracts only the TabBox section from kwinrc.
/kde-extract all
Lists all KDE config files and prompts for selection.
Input (~/.config/kwinrc):
[TabBox]
ApplicationsMode=1
HighlightWindows=false
[Windows]
FocusPolicy=FocusFollowsMouse
Output:
# Add to programs.plasma in your home-configuration.nix
configFile = {
# kwinrc - Window Manager settings
"kwinrc"."TabBox"."ApplicationsMode" = 1;
"kwinrc"."TabBox"."HighlightWindows" = false;
"kwinrc"."Windows"."FocusPolicy" = "FocusFollowsMouse";
};
kwin.virtualDesktops) may conflict with configFile entrieskwin_wayland --replace to take effectqdbus to query current runtime values if config file doesn't reflect actual stateSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer