dotfiles
My dotfiles describe my entire computer. They contain most of the configuration of my applications (both on the command line and on the GUI), but also the setup and update process as scripts. I'm using Ubuntu as my Linux distribution of choice. The content of tilde
are the invisible configuration files in ~
and the content of exe
are scripts linked in /usr/local/bin
. I'm using Solarized Light as my color scheme and Input as my font. This is how my work environment looks like:
My main computer is a desktop machine. For on the Go usage, see below.
exogenesis
exogenesis
is a shell script that sets up a fresh (minimal) install of Ubuntu for me. I also use it to set up the same environment inside a VM. When I run it again on an existing machine, it will add what I added since the last time I ran it and update things like packages or editor plugins. It takes care of:
- Adding APT repositories
- Installing and updating APT, Snap, pip, Gem, Go and Rust packages
- Installing and updating Vim plugins
- Setting the shell to Fish
- Linking my configuration files and scripts
exogenesis-gui
is a second script that adds things I only need on GUI machines (not the VM). Those are mainly GUI apps (installed via apt, snap and flatpak) and a few tweaks to Gnome.
fish
I'm using fish as my shell. After using ZSH for many years, I noticed that it does many things I needed to configure in ZSH by default, and switched to it. The only thing I configured is that I use fzf because I really missed Ctrl+r
for reverse searching and I like the incremental search.
The prompt is a tiny arrow (or a ✦ when there are jobs in the background) that is green when the last status exit was 0, and red otherwise. In the right prompt, I display the pwd and the current git status. I have a few aliases, scripts, and functions:
- With
j
(orjump
) I can jump to my Code projects - To start or continue working on a project, I use my tiny
s
(orstart
) function which starts (or attaches to) a tmux session for a project with the correct start directory. l
is justls -al
git sed
is a git alias to sed all files known to git (rhymes withgit grep
)mdoutline
shows the outline of a Markdown document (only works correctly, if you don't use the 'underline' variant for headlines)serve
serve the current directory via nginxgb
is a prettiergit branch
gl
is a prettiergit log
postgres
andredis
start a temporary PostgreSQL or Redis instance in a docker containercompressability
shows the size of a file, and its GZIPed and brotlied sizechurn
shows the frequency of change of the files in git repohistory-analysis
shows the commands that you ran most in your (fish) shelleach-project
calls a command for each project in~/Code
in parallelgitkeeper
checks if there is unpushed work on a repo (plus some more options)electric-monk
runs gitkeeper for each project (replacement for an old gem of mine)battery
shows the current battery statusecurl
downloads something but uses caching via ETaggcp
clones a repository, or, if it already exists, pullsilns
is an idempotentln -s
vim
I'm doing all my programming and most of my writing in vim. My vim is very close to the default configuration, but I'm using tpope/vim-sensible
to set a few reasonable defaults. Instead of configuring spaces, tabs and similar things, I use editorconfig
to follow the convention of the projects. Additional language support is loaded on demand via sheerun/vim-polyglot
.
To jump to files, I use a fuzzy file finder (junegunn/fzf
) that I've bound to Ctrl+P. I use fd
as the source for its suggestions which pays attention to .gitignore
. I can't remember the last time I opened a file without it.
I use Tim Pope plugins for commenting (tpope/vim-commentary
) as well as quoting/parenthesizing (tpope/vim-surround
) and make both repeatable (tpope/vim-repeat
).
I run my Ruby tests and specs via a key binding (skalnik/vim-vroom
).
Finally, I'm using w0rp/ale
for formatting, linting feedback and LSP support. Code is formatted automatically with prettier or a similar tool if it is available for the programming language. I show a
Other commandline tools
git
is the only version control system I use. It has two amazing companions:tig
anddelta
tmux
is the terminal multiplexer I use. I configured it with some more vim-like bindings and a nice status bar with the current time and battery charge.ripgrep
is a replacement forgrep
that is so fast, that I can't really believe itfd
is the same forfind
jq
is likesed
for JSON data, but I mostly use it for pretty printingtree
prints the folder structure as a treewget
andcurl
pry
is a replacement for Ruby's IRB withamazing_print
ragel
is a beautiful state machine compileryt-dlp
allows me to download videos for train tripsdocker
anddocker-compose
because I really wish it would do what I wantshellcheck
to get feedback about shell scriptsasciinema
to record terminal thingsdirenv
to load and unload environment variables depending on the current directoryffmpeg
for converting video and audiohtop
as a replacement fortop
to see how my cores and RAM are doingneofetch
for those screenshots, you knowpandoc
to convert between Markdown and... other formats like Microsoft Wordpgcli
to peek into PostgreSQL databasesspotify_player
to listen to musicpdftk
for tweaking PDF documents
GUI
Even though I enjoy to use the command line for most things, there are certain things where I use a GUI
- Firefox and Chromium
- Firefox is my main browser
- Chromium is only here for testing (and for the weird websites that only work on Chrome...)
- They are also installed in the Non-GUI box for automatic testing in headless mode
- Thunderbird as my email and calendar application
- Kitty as my terminal emulator
- Playing video and audio files with mpv, viewing PDFs with evince and images with eog
- Editing images with Drawing and sound with Audacity
- I'm using 1Password for password management on all my devices
- Flatseal for tweaking packages installed via Flatpak
- OBS as a virtual camera
- Pika for backups, using BorgBase for offsite backups
- Piper is a GUI for libratbag which I use to configure my mouse
- Tangram for different chat apps that are websites anyway (currently mostly Slack)
- Microsoft Teams and Zoom for video calls
Programming Languages
These are the programming languages I use:
- Ruby
- Ruby is installed via the Fullstaq Ruby repository
- This includes rbenv to switch between versions
- JavaScript/TypeScript (Node, Browser or Deno)
- Node is installed via the NodeSource repository
- CSS
- Go
- Go is installed via the regular Ubuntu repository
I like to play around with other languages like Rust as well. I even wrote my own little language
Usage on the Go
On the go, I use a MacBook Pro. I mainly use the built-in apps with few exceptions. I also use the Mac for trainings and talks, as I need PowerPoint for that.
For development, I have installed nothing but Vagrant, VirtualBox, iTerm2, and the Xcode Command Line Tools. My dotfiles contains a Vagrantfile to provision the Vagrant box running in VirtualBox with Ansible. This replicates my Desktop computer. So when I want to start developing on my machine, I do a vagrant up && vagrant ssh
and then I work inside the Vagrant box.
Making GPG available in the box
Thanks for @bascht for helping me setting this up.
On my Mac, I have GPGTools installed to write and receive GPG encryped emails. The GPG agent on my Mac is configured to create an extra GPG socket.
# ~/.gnupg/gpg-agent.conf
default-cache-ttl 300
max-cache-ttl 999999
enable-ssh-support
extra-socket /Users/moonglum/.gnupg/S.gpg-agent.extra
SSH is then configured to forward that extra socket to the virtual machine:
# ~/.ssh/config
Host 127.0.0.1
RemoteForward /var/run/user/1000/gnupg/S.gpg-agent /Users/moonglum/.gnupg/S.gpg-agent.extra
ExitOnForwardFailure yes
In addition to that, the host and machine share the pubring.gpg and trustdb.gpg. They are both in the folder of this repo (but gitignored), and then linked to the according locations.
Thanks
- To Drew Neil for his books about vim: Practical Vim and Modern Vim
- To Brian P. Hogan for his book about tmux
- To Gary Bernhardt for his screencasts
- To Dirk, Bascht & Bodo for letting me steal from their dotfiles and providing feedback