Repository navigation
config: follow the XDG base directory spec - #42
Merged
Merged
Conversation
Config, plugins and custom themes now live in $XDG_CONFIG_HOME/k10s (~/.config/k10s when unset or not absolute) instead of ~/.k10s. An existing ~/.k10s keeps being used while the XDG directory does not exist, so upgrading loses no settings. K10S_CONFIG, K10S_PLUGINS, K10S_PLUGIN_DIR and K10S_THEME_DIR still override as before. uninstall.sh resolves the same directory; docs, examples and the test-install recipe are updated. Signed-off-by: pengshuai <pengshuai4@lenovo.com>
Member
|
@junior what do you think about moving the configuration directory from |
Collaborator
|
Sounds good to me! |
Member
|
@junior so, we are good to approve and merge! |
junior
approved these changes
Nov 12, 2026
junior
left a comment
Collaborator
There was a problem hiding this comment.
Approved! Let's merge it right after v0.1.10 goes out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Config, plugins and custom themes now live in
$XDG_CONFIG_HOME/k10s(~/.config/k10swhenXDG_CONFIG_HOMEis unset or not an absolute path, per the XDG spec) instead of~/.k10s.Path resolution (
internal/config.Path)$K10S_CONFIG(unchanged)~/.k10s/config.yaml, only while~/.k10sexists and the XDG directory does not. Existing installs keep their settings with no action.$XDG_CONFIG_HOME/k10s/config.yaml, else~/.config/k10s/config.yamlPlugins and themes already resolve relative to
config.Path(), so they follow automatically.K10S_PLUGINS,K10S_PLUGIN_DIRandK10S_THEME_DIRstill override.Migration is
mv ~/.k10s ~/.config/k10s, documented indocs/config.md. Creating~/.config/k10sfirst switches k10s over to it, which is also noted there.Also changed
uninstall.shresolves the same directory for--purge/ the "config still there" hint.Justfiletest-installrecipe uses the XDG layout.TestPathFollowsXDGininternal/config.Verification
go test ./...passes (Go 1.26.11).uninstall.sh --dry-run --purgechecked against: XDG + legacy both present, customXDG_CONFIG_HOME, legacy only.Commits are signed off (DCO).