From 823e5407e0e0b9fc6cbb44631c350e5b38fff9e5 Mon Sep 17 00:00:00 2001 From: 1jamesthompson1 <1jamesthompson1@gmail.com> Date: Mon, 23 Mar 2026 09:21:27 +1300 Subject: [PATCH] Add README with setup and usage instructions --- README.md | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..1136d38 --- /dev/null +++ b/README.md @@ -0,0 +1,100 @@ +# 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 + +```bash +curl -fsSL https://gitea.sjhl.nz/james/dotfiles/raw/branch/main/setup.sh | bash +``` + +Or manually: + +```bash +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: + +```bash +# 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: + +```bash +dotfiles checkout HEAD +dotfiles clean -fd +rm -rf ~/.dotfiles ~/.dotfiles-backup +``` + +Your original files will be restored from the backup created during checkout.