dotcli: Add dot kde save with schema-backed defaults and completion.
Introduces the dot kde subcommand family (fish dispatcher plus a Python helper under commands/kde/), a flat identifier=value manifest, and dot kde save in both its explicit-identifier and no-argument refresh modes. Settings resolve to KDE's KConfigXT schema-backed mechanism via a (rcfile -> [kcfg files]) mapping table auto-derived by scanning the system schema directory (overridable via DOT_KDE_KCFG_DIR), plus a hand-maintained exceptions list for schemas that only declare their target rc file at runtime. Also wires tab-completion for dot kde save identifiers, sourced live from that same mapping table.
This commit is contained in:
27
.config/dot/commands/kde/kde.fish
Normal file
27
.config/dot/commands/kde/kde.fish
Normal file
@@ -0,0 +1,27 @@
|
||||
function _dot_kde_usage
|
||||
echo "usage: dot kde <command>
|
||||
|
||||
Commands:
|
||||
save write live KDE settings into the manifest
|
||||
help show this message
|
||||
|
||||
Run 'dot kde <command> help' for flags on a specific command."
|
||||
end
|
||||
|
||||
function _dot_kde
|
||||
if test "$argv[1]" = help
|
||||
_dot_kde_usage
|
||||
return 0
|
||||
end
|
||||
|
||||
set -l helper_dir (status dirname)
|
||||
|
||||
switch "$argv[1]"
|
||||
case save
|
||||
python3 $helper_dir/kde.py save $argv[2..-1]
|
||||
return $status
|
||||
case '*'
|
||||
_dot_kde_usage
|
||||
return 1
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user