Skip to content

My personal dotfiles for most of the programs I use on a daily basis.

License

Notifications You must be signed in to change notification settings

potamides/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍙 Dotfiles

This repository contains my personal dotfiles for most of the programs I use on a daily basis. Primarily, this allows me to organize my rice and to easily set up the computing experience I enjoy on any machine I come across. However, it also allows me to share my preferences with others. I think there are some interesting things here worth discovering, and that's why I take the time to write (or at least try to write) sufficient comments and documentation.

My principles are to find a satisfactory balance between functionality and design while keeping an eye on resource consumption. I prefer keyboard-focused control over everything else and place a high value on visual consistency (preferably by using the gruvbox color scheme). I use Arch Linux as my daily driver, but there shouldn't be much here requiring this specific distribution, so using my configurations on other distros or, in the worst case, porting them shouldn't be too hard. I prefer a slightly retro design, but I don't shy away from occasionally using Unicode symbols and Nerd Font glyphs in my terminal applications. However, since I sometimes only work with the Linux console, I always make sure to fall back to settings that look good in VGA text mode with code page 437, if that should be the case.

Past Discussions
CRT Monitor with rice

Installation

Caution

My dotfiles are heavily customized to my own needs. I, therefore, advise everyone not to use this repository blindly. Instead, I recommend that you treat this project solely as a source of inspiration, or at least thoroughly check each relevant component before using it to avoid unexpected complications.

If you just want to hack at your own leisure, this repository and its submodules can be cloned with the following command:

git clone --recurse-submodules https://github.com/potamides/dotfiles

For actual use, I recommend the installation as a bare Git repository. This makes it possible to manage dotfiles with git only in an uncomplicated and effective way without having to rely on additional external tools1. For this use case, I provide a script that installs a bare git repository to $HOME/.dotfiles and updates configuration files in $HOME with the contents of this project (conflicting files are moved to $HOME/dotfiles.backup). For convenience the script can be executed as follows:

bash <(curl -LfsS https://github.com/potamides/dotfiles/raw/master/.local/bin/install-dotfiles)

With a simple alias (already included in bashrc) this dotfiles project can then be managed like any other git repository:

alias dotfiles='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'

This repository also contains a script which can be used to install all required packages. However, please note that it is specific to Arch Linux. When this script is sourced it defines the array variables PKG, PIP and AUR. You can then use pacman, pip and an AUR helper of your choice to install everything:

source <(curl -LfsS https://github.com/potamides/dotfiles/raw/master/.local/bin/install-packages)
sudo pacman -S "${PKG[@]}" && yay -Sa "${AUR[@]}" && pip install "${PIP[@]}" --user

Content

Configuration files and other information for the core components of this rice are listed in the following table. Many programs do not differ significantly from the default settings in terms of usage, which is why I simply refer to the respective homepages for further information. For applications where I developed a more individual workflow, I give additional instructions below.

Name Files & Directories Links
Shell bash .inputrc, .bashrc, .bash_profile Repository, Homepage
Window Manager awesome .config/awesome, .xinitrc Repository, Homepage
Editor neovim .config/nvim Repository, Homepage
Terminal alacritty .config/alacritty Repository, Homepage
Terminal Multiplexer tmux .config/tmux Repository, Homepage
Music Player ncmpcpp .config/ncmpcpp Repository, Homepage
System Monitor conky .config/conky Repository, Homepage
Mail Client mutt .config/mutt Repository, Homepage
IRC Client weechat .config/weechat Repository, Homepage
File Manager ranger .config/ranger Repository, Homepage
Calculator ;-) ptpython .config/ptpython Repository
Calendar when .config/when Repository, Homepage
Document Viewer qpdfview .config/qpdfview Repository
Web Browser qutebrowser .config/qutebrowser Repository, Homepage

Apart from the applications mentioned in the table, this repository also contains some additional scripts to automate or facilitate various tasks. All scripts contain a header explaining how to use them.

Awesome

Instead of the standard awful.key keybindings, my awesome configuration uses modalawesome to create vi-like keybindings with motions, counts and multiple modes. To understand how to control my awesome configuration, I recommend to check it out beforehand.

Additionally, if an mpd server is running on $MPD_HOST:$MPD_PORT, song information is displayed in the status bar. Songs are also played back via mpv by listening on $MPD_HOST:$MPD_STREAM_PORT. In my case, all my audio files are located on a server and to connect to its mpd instance I use an ssh tunnel via a systemd user service:

systemctl --user enable --now mpd-tunnel

Conky

My conky configuration merges with my background image, so the position and size must be set precisely. Since I often use multiple screens with different resolutions throughout the day, I need to be able to scale conky's dimensions accordingly. Unfortunately, I am not aware of any built-in feature that could solve this problem. For this reason I wrote the conky plugin scaling.lua. It introduces new configuration options through a new table conky.sizes, which can be used to specify different sizes for arbitrary screen resolutions. For unspecified screen resolutions, the plugin tries to calculate the best scaling automatically.

Neovim

For my Neovim configuration, I made heavy use of the new features introduced with Neovim 0.5 and wrote it entirely in Lua. I wrote a small wrapper around the paq-nvim plugin manager called autopaq.lua, which makes sure to install itself and all specified plugins on its own on the first launch of Neovim, eliminating the need for any further setup steps. I tried to keep the main configuration file, init.lua, mostly language agnostic. Therefore, I refactored language-specific and buffer-local code into stand-alone ftplugins. Similarly, I moved a lot of complex functionality into libraries and plugins to keep the main configuration uncluttered and readable. Notable examples include components.lua, a collection of (mostly LSP-related) components for the lightline.vim status line, and snipcomp.lua, a companion plugin for the LuaSnip snippet engine, which provides a snippet completion function for the built-in insert mode completion commands. Consult :h ins-completion for details.

Mutt

Mutt is configured for multiple email accounts. It makes use of the command line tool distributed with KeePassXC to access passwords. The location of the password database and the keyfile can be controlled with the KEEPASSXC_DATABASE and KEEPASSXC_KEYFILE environment variables.

Mutt also contains a script which automatically creates aliases for addresses in the FROM field, when reading an email. It also utilizes the markdown2html script to conveniently create multipart/alternative emails when the need arises.

Weechat

Weechat keeps a lot of separate configuration files, which contain both default options and options altered by the user. Also some of the files contain highly sensitive information. Combined with the fact, that weechat doesn't support standalone password managers to obtain secrets, this makes it hard to manage a weechat config with a dotfiles repository.

That's why I wrote the script confload.py. It reads a configuration file called weechatrc located in the weechat home directory. The file itself should be written in m4 macro language and after processing should contain valid weechat commands. The script also provides the special macro KEEPASS(<title>, <attr>), which can be used to obtain sensitive information managed with KeePassXC. When this script is loaded for the first time it prompts the user for the KeePassXC password and then loads the config file. On subsequent launches of weechat this process can be manually invoked with the command /confload <passphrase>. Again you can use the KEEPASSXC_DATABASE and KEEPASSXC_KEYFILE environment variables for the locations of KeePassXC files.

Ptpython

I configured ptpython to embed itself into the default Python REPL. That way, it can be started by simply executing the standard Python binary. This is realized through the environment variable PYTHONSTARTUP, which points to a setup script that is executed when Python is launched in interactive mode.

Miscellaneous

Besides the things mentioned above, this repository also contains configuration files for a number of other programs. However, these are only optionally required and perform specific tasks that are often not needed. Therefore, these programs are not included in the package installation script and must be installed manually. The corresponding packages and their functions are listed below:

Footnotes

  1. Ask HN: What do you use to manage dotfiles?
    The best way to store your dotfiles: A bare Git repository
    Manage Dotfiles With a Bare Git Repository