2026-03-23 09:21:38 +13:00
2025-09-24 20:07:54 +12:00
2025-09-24 19:38:27 +12:00
2025-10-12 01:52:07 +00:00

Dotfiles

My personal dotfiles for quick setup on new machines. Change once, update everywhere.

What's Included

File Description
.bashrc Bash configuration with custom prompt, aliases, lazy-loaded conda/nvm, auto-start tmux
.tmux.conf tmux config with vi keybindings and TPM plugins
.vimrc Vim configuration with clipboard support, syntax highlighting, and sensible defaults
setup.sh Bootstrap script for new Debian-like machines

Quick Install on a New Machine

curl -fsSL https://gitea.sjhl.nz/james/dotfiles/raw/branch/main/setup.sh | bash

Or manually:

git clone --bare https://gitea.sjhl.nz/james/dotfiles ~/.dotfiles

# Define the dotfiles alias
dotfiles() {
    /usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME" "$@"
}

# Checkout files (will prompt if conflicts exist)
dotfiles checkout

# Hide untracked files from status
dotfiles config --local status.showUntrackedFiles no

Managing Your Dotfiles

After installation, the dotfiles command is available in your shell:

# View status
dotfiles status

# Add changes
dotfiles add .bashrc
dotfiles commit -m "Update prompt"
dotfiles push

The alias is already defined in .bashrc, so it's available in new terminals.

tmux Usage

tmux starts automatically when you open a new terminal (configured in .bashrc).

Basic Commands:

Command Action
tmux Start new session
tmux ls List sessions
tmux attach -t 0 Attach to session 0
Ctrl+b d Detach from session
Ctrl+b c Create new window
Ctrl+b % Split vertically
Ctrl+b " Split horizontally
Ctrl+b [ Copy/vi mode
q Exit copy mode

Install TPM plugins: After first tmux start, press Ctrl+b I to install plugins (tpm, tmux-sensible, tmux-yank).

Vim Usage

Command Action
vi or vim Open editor
:w Save
:q Quit
:q! Force quit
/pattern Search
n Next search match
yy Yank (copy) line
p Paste
u Undo
Ctrl+r Redo

Clipboard is integrated - yanking/pasting works with system clipboard.

Uninstall

To remove dotfiles from a machine:

dotfiles checkout HEAD
dotfiles clean -fd
rm -rf ~/.dotfiles ~/.dotfiles-backup

Your original files will be restored from the backup created during checkout.

Description
Easy basic workflow setup with all the configs that I like. Change once update everywhere.
Readme 55 KiB
Languages
Shell 100%