Skip to content
Dominik Riedig edited this page Apr 6, 2021 · 14 revisions

Dotfiles for linux (and possibly Windows)

All of my dotfiles are found in this repository. They are set up in a way that the repository can be managed via a custom alias command config. See Installation on how to setup this behaviour.

This repo also contains very useful little scripts (bash, python, binaries), mostly located in ~/.local/bin/ (that is added to PATH)

Table of contents

  1. Supported applications
  2. XDG-Directories vs legacy dotfiles
  3. DABS support
  4. Installation
    1. Dependencies
    2. Use whole repository
    3. Cherry-Pick single dotfiles
    4. Customize repository location
    5. Test
  5. Updating and further usage after installation
  6. Contributing to this repository

Supported applications

Application Dotfile type Maintained Works out of box* Dependencies Required extra steps
zsh XDG + Legacy ✔️ oh-my-zsh Install oh-my-zsh to ~/git/oh-my-zsh
nvim XDG ✔️ Run command :PlugInstall
newsboat XDG ✔️ ✔️
sway XDG ✔️

"Maintained" means that I actively use this application with this configurations. If it is not maintained, I normally do not use this application anymore, but the (possibly outdated) dotfiles remain in this repository for everyone who uses the application anyway or for the case that I may return to the application.

* "Works out of box" means that after the dotfiles are "installed" (basically only copied over), no more steps are needed to enable or use the configuration. Note that installing the dotfiles with DABS or dotfiles-installer-meta may automatically execute required extra steps to make these dotfiles work out of box. See 3. DABS support for more info.

XDG-Directories vs legacy dotfiles

Welcome to one of the many keystones for a good linux rice: The dotfiles.

Some applications already use the official standard for XDG-Directories (e.g. ~/.config, ~/.local) while others sit as plain dotfiles in the users home directory, cluttering it with dozens of files. I mark the different configuration styles in the table above as follows:

  1. XDG: Fully uses XDG Directories. The corresponding configuration file is typically placed in ~/.config/application/config.
  2. Legacy: Does not use XDG as intended configuration customization. The file is typically placed in ~/.application.
  3. Custom: Uses an arbitrary configuration path that is somewhere inside the user's home directory. (e.g. ~/.mozilla for most Mozilla applications: Firefox, Thunderbird...)
  4. Global: Uses a global system directory (Mostly /etc/application/...). Inside this repository, these files are placed inside a special directory (.config/dd-global/...) and need to be copied over manually. (But there will be a script for that in the future!)

DABS support

When deploying these dotfiles with DABS, every application customization should work flawlessly and out-of-box, regardless of the note in the application table above. DABS executes all "Required extra steps" for any application, including the installation of dependencies.

When installing this through dotfiles-installer-meta, "most" applications should work out-of-box. It will not install dependencies, but execute some "Required extra steps".

Installation

There are two main ways to use my dotfiles: Either clone this entire repository and automatically sync your home directory with it, or manually copy over files you want to use. Both have pros and cons, but I recommend the latter for linux beginners.

Dependencies

When attempting to use my dotfiles, further configuration is needed with the dependencies for some applications. For example: When using zsh, a working installation of oh-my-zsh is needed to use my configuration. Manual editing of the corresponding dotfile is needed then, as zsh's dotfile needs to point to the directory where oh-my-zsh is installed.

Use whole repository

When you want to copy over my entire repository, thus overriding ALL your own dotfiles with mine, here are the steps you need to go through:

  1. Copy this repository as a bare repository in the following directory: ~/git/dotfiles-linux
  2. Set up an alias config to interact with this bare repository in a git-like way from any directory
  3. Check out the repository to the current commit, together with setting up $HOME as the working directory for the repository

Note that this is not recommended for linux beginners, as it overrides a lot of files from your own home directory. Do not execute the following commands if you don't understand what everyone of them does and what that means to your files. With my configuration, some applications may be not accessible for you and you might need to delete all overwritten files. Do always have a backup of your current dotfiles before installing mine!

alias config="/usr/bin/git --git-dir=$HOME/git/dotfiles-linux/ --work-tree=$HOME"
config clone --bare git@github.com:DerDomee/dotfiles-linux.git ~/git/dotfiles-linux
config reset --hard

Cherry-Pick single dotfiles

When you only want to use my dotfiles for a single application, there are multiple ways to accomplish your goal:

  1. Clone this repository in a standard repository directory, then manually copy your desired file to the right location
  2. Download only one file from this repository and place it directly in your users home directory

Customize repository location

When using the whole repository to install my dotfiles, you may run into the issue that I personally story my repository in ~/git/dotfiles-linux. If you do not want to store this repository in this specific location, you need to change the config alias both in the installation script and in the config file for zsh to your desire.

Updating and further usage after installation

After a successfully installing the whole repository using the config alias, you can use config as a replacement for git in all regards of managing your dotfiles. For example, updating your dotfiles to the latest version from this repository, simply use

config pull

Contributing to this repository

This repository shows my personal rice. I will not accept any arbitrary pull request.
If you have any suggestions on what I should change in my configurations, you can use GitHub's new "Discussion" feature, placed directly next to the pull requests.
If you find a typo in any of my dotfiles, you can either shut your mouth - or open a new issue for that, showing the world what a perfect human being you are.

Clone this wiki locally