This is a suggestion for a more granular and easy to setup solution.
- Have configuration for each program on a partial at
/usr/share/xdg-force/.
- Have a script to link/unlink partials to
$XDG_DATA_HOME/xdg-force/.
- Have a simple hook on
.profile or similar traverse the directory and source all linked partials.
Usage:
force-xdg cargo
# Do you want to enable configuration 'cargo'? (y/n)
force-xdg cargo
# Configuration for 'cargo' is already in place, do you want to remove it? (y/n)
I have something similar in my dotfiles.
https://github.com/danisztls/dotfiles/blob/main/shell/profile#L73=
https://github.com/danisztls/dotfiles/tree/main/shell/config
This is a suggestion for a more granular and easy to setup solution.
/usr/share/xdg-force/.$XDG_DATA_HOME/xdg-force/..profileor similar traverse the directory and source all linked partials.Usage:
I have something similar in my dotfiles.
https://github.com/danisztls/dotfiles/blob/main/shell/profile#L73=
https://github.com/danisztls/dotfiles/tree/main/shell/config