basedir-spec: machine specific config files
dieter at plaetinck.be
Thu Sep 22 05:29:20 PDT 2011
On Thu, 22 Sep 2011 13:18:16 +0200
Niels Ole Salscheider <niels_ole at salscheider-online.de> wrote:
> I would like to propose to distinguish between machine specific and
> machine independent config files for the next basedir-spec. So
> machine dependent config files could be stored in e. g.
> This is beneficial for a home directory that is shared across several
> devices with different form factors. So the screen resolution,
> positions of desktop widgets, power settings, ... can be stored in
> the machine dependent directory while sharing all other settings.
> If you want to log from another client with the same hardware, you
> can still crate a symlink to some default directory.
personally I prefer something "higher-level" or more app-specific/fine-grained.
1) app-specific & fine-grained: I have a program "mde", which config file is bash-bashed, so I have a file
$XDG_CONFIG_HOME/mde/config, which internally contains stuff like:
if [ $(hostname) == "$somehost" ]; then <foo>; else; <bar>; fi. This allows finegrained control and much more flexibility
to configure things how I want it.
2) higher level: based on branches in a version control system, I can have different stuff $XDG_CONFIG_HOME
the additional benefit heres is that you can merge from one branch to another, also with a VCS you can have a good "mix and match" between branches
with things like git submodules and svn:externals, while maintaining full diff-ablities *and* not having stuff that are not needed checked out in your home directory. With a system like you describe I can't see a workflow that allows those 3 at the same time.
In short: per-machine configuration should IMHO not go into the basedir spec, as it's a poor solution.
More information about the xdg