You are not logged in.
I've just realized that my $HOME/.config/ranger/rifle.conf (most likely together with other files in the same dir) is outdate with respect to what I see on https://github.com/ranger/ranger or even in my $HOME/AURbuilds/ranger-git/src/ranger-git/ (I use ranger from the AUR).
Clearly I could manually copy-paste the updated config files from that latter directory to the former, but then I'd have to remember to do it periodically (beside having to remember to update AUR-installed packages, ahah).
I also see that I could make $HOME/.config/ranger/rifle.conf actually a symbolic link to the corresponding file under $HOME/AURbuilds/ranger-git/src/ranger-git/.
What is the recommended way to keep my local config files for ranger in sync with the package updates?
I have used in the past ranger from the official repo instead of the AUR, but I honestly don't remember if the files under $HOME/.config/ranger/ where overwritten or what, when I'd update ranger via pacman.
(Clearly, the question could apply to packages other than ranger, ...)
Last edited by Enrico1989 (Today 08:08:02)
Online
I have used in the past ranger from the official repo instead of the AUR, but I honestly don't remember if the files under $HOME/.config/ranger/ where overwritten or what, when I'd update ranger via pacman.
No package should ever install files to $HOME. See Arch package guidelines Directories.
Offline
Enrico1989 wrote:I have used in the past ranger from the official repo instead of the AUR, but I honestly don't remember if the files under $HOME/.config/ranger/ where overwritten or what, when I'd update ranger via pacman.
No package should ever install files to $HOME. See Arch package guidelines Directories.
Thanks for the info!
There seem to be no config around in my system:
$ sudo find / -name 'ranger' ! -regex '^/home/.*' -type d
find: ‘/run/user/1000/doc’: Permission denied
find: ‘/run/user/1000/gvfs’: Permission denied
/usr/share/licenses/ranger
/usr/share/doc/ranger
/usr/lib/python3.14/site-packages/ranger
/root/.config/ranger
/root/.local/share/rangerAfter all, the very ranger project suggests copying the config from their dir to ~/.config/ranger; I suppose that's what I did, and therefore the burden is on my to keep those update.
I guess the symbolic link is the best approach to stop worrying about updating those config files, as long as I don't customize them.
Online
/root/.config/ranger /root/.local/share/ranger
Well, actually those 2 are ranger-related. But they're mostly empty. I wonder if they got created some time I might have run ranger as root…
I guess I can delete them, no?
Online
Yes, they'll be recreated when necessary.
I also see that I could make $HOME/.config/ranger/rifle.conf actually a symbolic link to the corresponding file under $HOME/AURbuilds/ranger-git/src/ranger-git/.
Don't do that as those files can change without warning when you build (not install) a new version .
link to wherever the ranger package puts those files at installation time.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Don't do that as those files can change without warning when you build (not install) a new version.
Ok…
link to wherever the ranger package puts those files at installation time.
If "ranger package puts those files" at location, it still means it will overwrite my copies, if put them there, no?
As in, where's the difference between the two approaches?
Last edited by Enrico1989 (Yesterday 10:28:42)
Online
For context, https://github.com/ranger/ranger/issues/2653
Since you're building from the AUR what you otherwise likely want to do is to maintain your customization as a patch to the local ranger git checkout, (like really just edit the file in the source tree and
git commit -am “This is my rifle. There are many like it, but this one is mine.Then remove the config in your $HOME to rely on the system wide one (that you're patching at build time)
The "downside" is that you'll have to resolve merge conflicts when the upstream version changes in a non-straight-forward way when building an update - but you'll have to merge changes at some point anyway.
Offline
Since you're building from the AUR what you otherwise likely want to do is to maintain your customization as a patch to the local ranger git checkout, (like really just edit the file in the source tree and
git commit -am “This is my rifle. There are many like it, but this one is mine.Then remove the config in your $HOME to rely on the system wide one (that you're patching at build time)
The "downside" is that you'll have to resolve merge conflicts when the upstream version changes in a non-straight-forward way when building an update - but you'll have to merge changes at some point anyway.
The point is that there's so many config files under home, right? Just to name a few: .vimrc, .bashrc, .inputrc, .xinitrc, .bash_profile, .gitconfig, .latexmkrc, .Xresources, plus many more under some directories, like ~/.ghcup/, ~/.ssh/, and many under ~/.config, like ranger's, rofi's, an several more.
Dealing with them the way you suggest does not make it easy to version all these files and to use them on multiple systems.
The approach I've adoped so far is to have a ~/myconfig directory, under version control, in which I have regular files .vimrc, .bashrc, .config/, and so on, and then I make ~/.vimrc, ~/.bashrc, and so on symlinks to those.
Is this a crazy approach? What do you think?
Online
git-controlling configs isn't uncommon, https://wiki.archlinux.org/title/Dotfiles
But most of the files you mentioned support some form of inheritance.
Also see https://wiki.archlinux.org/title/XDG_Ba … ry#Support
Offline