My Dotfiles

2025-03-01
author
Rico Berger
Site Reliability Engineer

In this blog post, I'll take you through my complete dotfiles, detailing the tools and configurations that empower my development process. From my terminal choice to the editor I rely on, and even the GitHub CLI commands that simplify my workflow, I'll share insights and tips that might just inspire you to optimize your own environment. Whether you're a seasoned developer or just starting, there's something here for everyone looking to enhance their macOS experience. Let's dive in!

Terminal

OS Setup

I'm using macOS as my daily development environment, and together with Raycast, I couldn't be happier with it. Raycast allows me to quickly create notes and reminders, view my calendar entries, GitHub pull requests and issues, and Jira tickets. I'm also using it as a replacement for the built-in Spotlight search and for managing spaces1 and windows.

Terminal

By the end of last year, I switched from Alacritty to Ghostty as my go-to terminal emulator (yes, the hype caught me 😅). Ghostty provides most of the features out of the box that I used tmux for in the past, such as multiple windows, tabs, and panes. It is super fast, and the available configuration options are on point (not too much, not too little). The only thing I would wish for is an API so that windows, tabs, and panes can be created programmatically, which is currently only possible via AppleScript. In my Ghostty configuration2 I set my prefered color scheme, font and some key bindings.

As my shell3, I'm using Zsh with Zinit to manage the following plugins:

For the customization of my prompt4, I'm using Starship to show the current OS and user, the directory I'm working in, the Git branch and status, the exit status of the last command, the Kubernetes context and namespace, and the current time.

Other important tools I'm using are:

Editor

Neovim has become my daily editor of choice due to its powerful features and flexibility. As an extensible text editor based on Vim, it allows me to tailor it to my specific workflow, whether I'm coding, writing, or debugging issues. Spending most of my time within the terminal, it is also faster and feels more natural to stay within the terminal when editing files instead of opening Visual Studio Code.

Neovim Dashboard

Currently, I'm using the following plugins for tasks such as fuzzy searching files, Git integrations, code completion, formatting, linting, and some AI features:

While all the plugins mentioned above are awesome and fulfill a specific need, I want to give a special shoutout to multicursor.nvim, which was the last missing plugin for me to fully abandon Visual Studio Code.

GitHub CLI

Last but not least, I also want to take a look at my workflow with GitHub because it is an important part of my daily work, and I'm a bit proud of it. I'm a heavy user of the GitHub CLI (gh) and the gh-dash extension, because it allows me to stay for most of my work within the terminal.

I use the GitHub CLI to create pull requests via the gh pr create command, to add / remove labels, to view the workflow runs for a pull request and to merge them. All with the help of some nice helper functions which can be found in the .bin directory in my dotfiles.

# Add a label to the pull request, by selecting the label via fzf from a list of
# all available labels in the repository
gh pr edit $1 --add-label "$(gh label list --json name --jq ".[].name" | fzf)"

# Delete a label from the pull request, by selecting the label via fzf from a
# a list of all labels from the pull request
gh pr edit $1 --remove-label "$(gh pr view $1 --json labels --jq ".labels.[].name" | fzf)"

# View the logs of a workflow run, by selecting the workflow run via fzf
branch=$(git rev-parse --abbrev-ref HEAD)
workflow=$(gh run list --branch $branch --json databaseId,workflowName,createdAt,status --template '{{range .}}{{printf "%.0f" .databaseId}}{{"\t"}}{{.status}}{{"\t"}}{{.createdAt}}{{"\t"}}{{.workflowName}}{{"\n"}}{{end}}' | fzf)
gh run view "$(echo $workflow | awk '{print $1}')" --log

# Squash the commits into one commit and merge it into the base branch, also
# delete the local and remote branch after merge
gh pr merge $1 --squash --delete-branch --admin

These commands are also integrated into my gh-dash configuration7. gh-dash is an extension for the GitHub CLI to display a dashboard with pull requests and issues. It integrates beautifully with tmux and Neovim:

gh-dash and Neovim Diffview

# dotfiles
# fzf
# gh
# gh-dash
# ghostty
# neovim
# ripgrep
# starship
# tmux
# zsh
# yazi