Thanks everyone for the help. I am actually creating a custom zsh theme and uploading it in the AUR. You guys are right. One shouldn’t touch someone’s $HOME. So my last q is that should I drop the .zshrc in /etc/skel and let the user copy/paste it? or could there be any other approoach. Thanks.
not only in /etc/skel
And as I mentioned /etc/skel will only be used on new user creation after it is present there… to get configs for already installed user you will need somehow a tutorial or a script to run as user…
I will make one more attempt and then let you do what you want.
Many Arch-based distros ship an /etc/skel/.zshrc by default from a settings package. Your package won’t be installable on those distros. pacman will throw a file exists error and refuse to proceed. The backup array doesn’t handle conflicting packages with the same file. It lets the user retain changes made to that file.
This is how you should package a set of zsh settings. Write a file to /usr/share and ask the user to include that file at the end of their .zshrc