What is your preferred method of managing your dotfiles?

For a while, I was doing the bare-repo method. But I didn’t like it very much :frowning: I ended up neglecting my files and forgetting to add and commit after incremental changes and ended up breaking things :frowning: Even more confusing was when I cd into dotfiles and can’t see the files I had been adding? Once I ran git add . by accident and ruined everything :face_with_symbols_over_mouth:

I learned how to convert the bare-repo to a normal one and just pushed everything to github yesterday in preparation for today’s fun-time OS install LOL .

I heard of GNU Stow - but sounds confusing?

Since this is a fresh new OS installation, I thought of just git init the entire /home but I know that’s not wise.

So how are you managing yours? Maybe tech this old guy some new tricks?!

I am not new to Linux, been a faithful user for over 10 years. And I never really cared about starting over and rebuilding my systems from scratch. I distro-hopped for over 5 years, because I enjoyed learning.

I just joined the EndeavoursOS Club today :heart: … coming from Pop OS which I used for several years, and finally managed to learn, use, and enjoy neovim, tmux, alacritty followed by kitty, and starship. Everything has been heavily customized over the course of the pandemic summer and I can’t wait to start customizing things.

1 Like

Using git to manage dotfiles is a total overkill, and it just creates more pain than gain, in my opinion.

Move all important dotfiles to a custom directory. Make a simple script that symlinks those dotfiles to their proper place in your home directory. Make a backup of the dotfile directory.

Now, when you need to copy those dotfiles to another computer, or when you reinstall the OS, just copy the directory with the dotfiles (for example, using sshfs) and run the script from within it.

I find this to be fairly in line with the “Keep It Simple, Stupid” philosophy.


True, there’s nothing wrong with that. I like simplicity. Hence one of the reasons I switched.

Make a simple script that symlinks those dotfiles to their proper place in your home directory.

I would really rather NOT spend hours doing that :confounded: My bash scripting skills are sub-par.

You know how to create a symbolic link? It’s this simple command:

ln -s source_file destination_link

Now repeat that command for every dotfile, put it all in a text file.

There, your script is done. No “bash scripting skills” required.

If it took you more than 5 minutes, you were doing it wrong.

Here are first five lines from my deploy.sh script:

ln -sf  ~/bin/dotfiles/dir_colors.zsh        ~/.dir_colors
ln -sf  ~/bin/dotfiles/nanorc                ~/.nanorc
ln -sf  ~/bin/dotfiles/zsh_aliases.zsh       ~/.zsh_aliases
ln -sf  ~/bin/dotfiles/zshrc.zsh             ~/.zshrc
ln -sf  ~/bin/dotfiles/bashrc.bash           ~/.bashrc

It goes on for a while like this. It’s not even an executable script, when I need to run it, I just run sh deploy.sh.

Now, I could be slightly fancier and store the source directory in a variable, but I don’t need it, since I keep my directory structure the same on all computers. Also, notice that the dotfiles in the dotfiles directory do not begin with a dot, and some have filename extensions (like .zsh and .bash). This is is a personal convention, again, since the filenames for the source file and destination link do not have to be the same, and I do it because I like to be able to easily see them, and I want my text editor to identify them as scripts.

I’ve been using wpgtk which in addition to allowing you to alter color schemes of all your dots simultaneously, also maintains a structure similar to what @Kresimir presented which makes it quite simple to back up.

1 Like

I don’t manage my dotfiles because I have backups.

If I ever need a copy of my dotfiles, I can pull them out of a snapshot or a backup with ease.

I know there are solutions that automatically replicate dotfiles across all your installs but that isn’t really something I would want.

1 Like

What’s the name of this backup utility?

It may save my hide one of these days!

There are lots but I use borgbackup

1 Like

Over 98% of my work files are in a git repo (Front End Web Dev). So that’s why I want them under version control. It’s quite literally a piece of cake for me :cake:

I don’t care about sharing my dots with others :confused: They’re for my own use. And I ask primarily because I am new to this OS, I will be editing just about every single thing.

This is my old Pop OS terminal. nvim tmux kitty fish. I liked the Dracula theme I was using in VS Code and did my best to duplicate the colors into my terminal set-up.

I spend a good deal of my time on /r/unixporn oogling & drooling over the eye candy.

If I’m gonna spend 8+ hours a day staring at my terminal, I kinda sorta wanna make it look nice :wink:

:flushed: WHOA! That is just crazy cool! So I would have to come up with my color scheme first and then another in order to use that?!

1 Like

My attempt at symlinking my dotfiles.

mkdir ~/dotfiles

Then MOVE the actual file into /dotfiles.

First I made a backup of init.vim because I have a well-known history is breaking things :frowning:

mv ~/.config/nvim/init.backup.vim ~/dotfiles/

Now symlink it BACK to the location where it’s supposed to be.

ln -s ~/dotfiles/init.backup.vim ~/.config/nvim/init.backup.vim

:smiley: I got it to work.

Then repeat for bspwm neofetch polybar ranger, and all the rest?!

I know there are MANY ways of doing this, but I like this most. I have total control.

I am lost on this though: “notice that the dotfiles in the dotfiles directory do not begin with a dot, and some have filename extensions”. You state it is a preference and I like. However I renamed a dotfile and it broke the symlink :confused:

The simplest method would be to start with the templates. However, you could also use your current setup by making sure your dots source their color from a setup adhering to wpgtk rules i.e. my rofi setup sources their colors from rofi_colors.rasi which looks like this:

/* Color-Scheme */

* {

    color0:	{color0};
    color1:	{color1};
    color2:	{color2};
    color3:	{color3};
    color4:	{color4};
    color5:	{color5};
    color6:	{color6};
    color7:	{color7};
    color8:	{color8};
    color9:	{color9};
    color10:	{color10};
    color11:	{color11};
    color12:	{color12};
    color13:	{color13};
    color14:	{color14};
    color15:	{color15};
    active:	{active};
    inactive:	{inactive};


I then have this file added in wpgtk as a template, which means the {colorx} will be replaced with a hex code by wpgtk when I set a color scheme using it. It’ll set the same color scheme in all your added templates, so all your dots will switch to the specified colors with the click of a button.

There are two ways of using wpgtk, either let it automatically source a color scheme from a wallpaper, or by importing your own json color scheme (if you don’t want to create your own there are quite a fee online from sources like terminal.sexy which let you pick and export. You can then import these to wpgtk and set the theme, without changing your wallpaper.

Last but not least, wpgtk offers a GUI which is quite straightforward, and the developer also has quite a few videos linked on the Github page explaining how things work.

edit: a bit additional information relevant to the topic. Wpgtk will backup your previous setup files, and then create a .base file in $home/.config/wpgtk and create a symlink to their proper location from this file. Meaning the important dot files which you would want to back up are all stored in the same folder, making it quite simple to do so. On a new system you would simply need to re-add them as templates.



Thank you for that in-depth explanation!

I guess I’ve got some work to do! :laughing: