Dotfiles

What are "dotfiles"?

So, if you're running a Linux or Unix system, youโ€™ve probably noticed some files hanging around in your profile that start with a . - like .gitconfig. These are configuration files for various programs. There are also folders like .config floating around. All of these files and folders? Yep, they're called "dotfiles."

Why should we care about them?

Well, dotfiles are the secret sauce for all your program configurations. If you're planning on jumping to a new system, or if you're like me and enjoy hopping between different Linux distros every other week, dotfiles make life way easier. With a set of pre-configured dotfiles, you can move your setup to a new machine without losing your mind (or your settings).

What I use

I keep my dotfiles in a GitHub repository - but wait, itโ€™s not just my dotfiles in there. This repo also handles bootstrapping my system. Thatโ€™s my fancy way of saying I have scripts that automatically install my go-to programs and configurations. In theory, all I have to do is run my bootstrap.sh script, and voila, my systemโ€™s all set up.

You can check out my dotfiles here. Just a heads-up: it's a repo generated by a GitHub pipeline, so some files might be blank or filled with placeholder stuff. But hey, it works!

My personal goal

One of my goals with my dotfiles is to make them work on any Linux system - or at least the ones Iโ€™ve tried. Doesnโ€™t matter if itโ€™s Arch, Fedora, or Debian, my files should be ready to roll. Recently, I even added a full Hyprland installation script.

So, if you take a peek at my dotfiles, youโ€™ll see something like this:

if $FEDORA; then
    if ! is_package_installed "lazygit"; then
        sudo dnf copr -y enable atim/lazygit
        install_package lazygit
    fi
fi

if $ARCH; then
    is_package_installed "lazygit" || install_package lazygit
fi

Whenever I add something new to the files, I try to make sure itโ€™ll work on any supported distro, so no one gets left out. And hey, if you try running this on your system and it worksโ€ฆ youโ€™re welcome. If it doesn't, wellโ€ฆ tell me about it or make a PR :)

If you want to know more about my dotfiles setup - just ask me and I will try to show/explain you what you have to do, to setup your own dotfiles.