Skip to content

Repository files navigation

Dotfiles Repository

This repository contains configuration files and scripts for configuring my desktop environment on macOS and Linux. The configurations are easily managed using GNU Stow, a symlink farm manager that simplifies the process of keeping dotfiles in order.

Package Structure

The repository is organized into the following packages:

  • base/ - Core shell configurations (.aliases, .zshrc, .zshenv, .gitconfig, etc.)
  • config-common/ - Cross-platform XDG configurations (.config/nvim/, .config/tmux/, .config/pyenv/, .config/Code/, etc.)
  • config-linux/ - Linux-specific configurations (Hyprland, Quickshell, Rofi, Tilix, .gitconfig.local)
  • config-macos/ - macOS-specific configurations (iTerm2, .gitconfig.local)
  • vscode-macos/ - macOS VS Code path (Library/Application Support/Code/)
  • macos-services/ - macOS system services (Library/LaunchAgents/)
  • ssh-linux/ - Linux-specific SSH configuration (.ssh/)
  • ssh-macos/ - macOS-specific SSH configuration (.ssh/)
  • local/ - Local user data (.local/)

Requirements

The repository uses GNU Stow to manage configuration files. Before installing the dotfiles, the following tools must be present:

  • git
  • stow
  • zsh

The Linux desktop configuration also requires quickshell for the Signal Rail panel. It is launched as the named configuration qs -c signal-rail by Hyprland.

To preview the Signal Rail's urgent-workspace state without waiting for an application to request attention, use the ID of any currently visible workspace:

qs -c signal-rail ipc call workspaces previewUrgent 2
qs -c signal-rail ipc call workspaces clearUrgentPreview

The preview uses the same rendering path as Hyprland's real workspace.urgent property. It changes only the visual state and does not mark an application window urgent.

Install them with:

Ubuntu/Debian:

apt install --yes git stow zsh

Arch Linux:

pacman -S git stow zsh

macOS (Homebrew):

brew install git stow zsh

Clone Repository

Clone the repository:

mkdir -p $HOME/Source
cd $HOME/Source
git clone --recurse-submodules --jobs $(nproc) https://github.com/RLovelett/dotfiles.git
cd dotfiles

Prepare XDG Base Directory

XDG Base Directory specification folders are used by applications to organize configuration, cache, data, and state files. The following command creates the standard directories with default values if the environment variables are not already set:

XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
XDG_STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
mkdir -p $XDG_CONFIG_HOME $XDG_CACHE_HOME $XDG_DATA_HOME $XDG_STATE_HOME $HOME/.local/{,s}bin

Install Configuration using Stow

This repository uses GNU Stow with platform-specific packages for cross-platform compatibility.

For macOS:

stow --target $HOME --verbose base config-common config-macos local ssh-macos macos-services vscode-macos

For Linux:

stow --target $HOME --verbose base config-common config-linux ssh-linux local

Uninstall Configuration

For macOS:

stow --delete --target $HOME --verbose base config-common config-macos local ssh-macos macos-services vscode-macos

For Linux:

stow --delete --target $HOME --verbose base config-common config-linux ssh-linux local

Configuration Details

The main .gitconfig includes platform-specific overrides via:

[include]
    path = ~/.gitconfig.local

YubiKey, SSH, GnuPG Configuration on macOS

This section is primarily derived from Kirill Kuznetsov's article on securing macOS with YubiKey, SSH, and GnuPG. The setup involves using launchctl to manage background services critical for secure operations. Below are the commands used to setup and verify the configuration:

Setup Commands

launchctl load -F $HOME/Library/LaunchAgents/sh.brew.gnupg.gpg-agent.plist
launchctl load -F $HOME/Library/LaunchAgents/sh.brew.gnupg.link-ssh-auth-socket.plist

Verification Commands

$ launchctl list | grep sh.brew.gnupg
-	0	sh.brew.gnupg.gpg-agent
-	0	sh.brew.gnupg.link-ssh-auth-sock

$ pgrep -fl gpg-agent
50890 gpg-agent --homedir /Users/lovelettr/.gnupg --use-standard-socket --daemon

$ ssh-add -L
ssh-rsa AAAAB3NzaC...5UNE54ZNTQ== cardno:5413447

For additional script management tips using launchd on macOS, visit Apple's guide on script management with launchd.

Quick Links

About

My configuration files (.vimrc, .bashrc, .gitconfig, etc)

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages