WIP: dim: introduce XDG_CONFIG_HOME support
PATCH 1/1 WIP: dim: introduce XDG_CONFIG_HOME support
From: Emil Velikov <[email protected]>
Currently we check for $DIM_CONFIG, falling back to $HOME/.dimrc.
Instead of always setting DIM_CONFIG, add support for XDG_CONFIG_HOME aka ~/.config.
Now we get $DIM_CONFIG > $XDG_CONFIG_HOME/dim/config > $HOME/.dimrc
Ideally in the future we'll:
a) warn and kill off the last one
b) print an warning message each time DIM_CONFIG is set
c) error out if XDG_CONFIG_HOME is not set ...
or fallback to ~/.config ourselves
Reason being, managing dotfiles with XDG is an order of magnitude easier and DIM_CONFIG should only be set as a temporary workaround.
TODO: better sales pitch, update docs
---
As the WIP/TODO suggests, this is not the final version of the patch. Sending it out to get some feedback on the idea and a/b/c thinking.
Thanks
Emil
--- dim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
dim +2 -1
@@ -36,7 +36,8 @@ set -e # # dim configuration file -DIM_CONFIG=${DIM_CONFIG:-$HOME/.dimrc} +XDG_DIM_CONFIG=${XDG_CONFIG_HOME:+$XDG_CONFIG_HOME/dim/config} +DIM_CONFIG=${DIM_CONFIG:-${XDG_DIM_CONFIG:-$HOME/.dimrc}} if [ -r $DIM_CONFIG ]; then # shellcheck source=/dev/null . $DIM_CONFIG
Signature · 6 lines
2.19.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel