Skip to content
This repository was archived by the owner on Jul 1, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions dotfiles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# dotfiles — captured local configs

Version-controlled copies of hand-tuned local config files, so they survive a
machine rebuild and so a local tweak becomes a reviewable diff instead of a
one-off edit that's lost on the next reinstall.

This complements — it doesn't replace — the configs the `setup-*.sh` scripts
generate inline (e.g. `~/.config/starship.toml`). Those are *generated* and
belong in the scripts. This directory is for configs that are too large or too
hand-iterated to live as a heredoc (the alacritty config is the seed: ~7.5KB
across three theme variants).

## Layout

Everything under `home/` mirrors its path relative to `$HOME`:

```
dotfiles/home/.config/alacritty/alacritty.toml -> ~/.config/alacritty/alacritty.toml
```

The set of files under `home/` *is* the set of tracked configs. There's no
manifest to keep in sync — the directory tree is the manifest.

## Workflow

Two idempotent helpers, inverses of each other:

| Script | Direction | When |
|---|---|---|
| `install.sh` | repo → `$HOME` | After a fresh provision, or to make the repo's configs live |
| `capture.sh` | `$HOME` → repo | After tweaking a config locally, to snapshot it back into git |

```bash
# Deploy tracked configs onto a freshly set-up machine.
# Backs up any differing existing file to ~/.dotfiles-backup/ first.
dotfiles/install.sh

# Pull your latest local edits back into the repo, then PR them.
dotfiles/capture.sh
git -C ~/repos/workstation-bootstrap diff
```

Both skip files that are already identical, so re-running is safe and quiet.

## Adding a new config to track

Copy it under `home/`, mirroring its `$HOME`-relative path, then commit:

```bash
mkdir -p dotfiles/home/.config/foo
cp ~/.config/foo/bar.conf dotfiles/home/.config/foo/bar.conf
```

From then on `capture.sh` keeps it fresh and `install.sh` deploys it.

## Why copy, not symlink

`install.sh` copies rather than symlinking so live files stay real files.
That preserves in-place swapping — e.g. alacritty's
`cp alacritty-aurora.toml alacritty.toml` to change the active theme would
clobber a symlink. The cost is that local edits don't flow back automatically;
that's what `capture.sh` is for.

## Not yet wired into `setup-*.sh`

The provisioning scripts don't call `install.sh` yet — for now it's a manual
post-provision step. Wiring it in (across all four scripts, per the repo's
keep-in-sync rule) is a sensible follow-up.

## What's tracked today

- **`.config/alacritty/`** — `alacritty.toml` (active) plus the `ember` and
`aurora` theme variants. All three pin `working_directory` so new windows
open in `$HOME` instead of inheriting the spawning window's cwd.
56 changes: 56 additions & 0 deletions dotfiles/capture.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
#
# capture.sh — refresh tracked dotfiles in this repo from the live $HOME.
#
# The inverse of install.sh. For every file already tracked under
# dotfiles/home/, copy the live version from $HOME back into the repo, so a
# local tweak (e.g. an alacritty edit) becomes a reviewable git diff.
#
# It only refreshes files the repo ALREADY tracks — it does not slurp your
# whole home directory. To start tracking a NEW config, copy it under
# dotfiles/home/ once (mirroring its $HOME-relative path), then capture.sh
# keeps it in sync from then on:
# mkdir -p dotfiles/home/.config/foo && cp ~/.config/foo/bar.conf "$_"/
#
# Usage:
# dotfiles/capture.sh # then: git diff, commit, open a PR
#
set -euo pipefail

DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SRC_ROOT="${DOTFILES_DIR}/home"
LIVE_ROOT="${HOME}"

if [ ! -d "${SRC_ROOT}" ]; then
echo "No tracked files under ${SRC_ROOT} — nothing to capture."
exit 0
fi

updated=0
unchanged=0
missing=0

while IFS= read -r -d '' tracked; do
rel="${tracked#"${SRC_ROOT}"/}"
live="${LIVE_ROOT}/${rel}"

if [ ! -f "${live}" ]; then
echo "missing ${rel} (not present on this machine)"
missing=$((missing + 1))
continue
fi

if cmp -s "${live}" "${tracked}"; then
unchanged=$((unchanged + 1))
continue
fi

cp "${live}" "${tracked}"
updated=$((updated + 1))
echo "capture ${rel}"
done < <(find "${SRC_ROOT}" -type f -print0)

echo "done: ${updated} updated, ${unchanged} unchanged, ${missing} missing"
if [ "${updated}" -gt 0 ]; then
echo "review with 'git diff', then commit and open a PR."
fi
238 changes: 238 additions & 0 deletions dotfiles/home/.config/alacritty/alacritty-aurora.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
# ❄ ✦ alacritty: aurora borealis ✦ ❄
# Deep arctic night with shimmering aurora highlights.
# Sister config to alacritty.toml (synthwave). Swap with:
# alacritty --config-file ~/.config/alacritty/alacritty-aurora.toml
# or `mv` it over the default to make it permanent.

[general]
live_config_reload = true
# Always open new windows in $HOME, not the spawning window's cwd.
working_directory = "/home/cpitzi"

[env]
TERM = "alacritty"
COLORTERM = "truecolor"

# ─── window ──────────────────────────────────────────────────────────────
[window]
opacity = 0.93
blur = true
decorations = "full"
dynamic_title = true
dynamic_padding = false
startup_mode = "Maximized"
title = "✦ aurora ✦"

[window.padding]
x = 20
y = 16

[window.class]
instance = "Alacritty"
general = "AlacrittyAurora"

# ─── scrolling ───────────────────────────────────────────────────────────
[scrolling]
history = 100000
multiplier = 4

# ─── font ────────────────────────────────────────────────────────────────
[font]
size = 13.0
builtin_box_drawing = true

[font.normal]
family = "JetBrainsMono Nerd Font"
style = "Light"

[font.bold]
family = "JetBrainsMono Nerd Font"
style = "SemiBold"

[font.italic]
family = "JetBrainsMono Nerd Font"
style = "Light Italic"

[font.bold_italic]
family = "JetBrainsMono Nerd Font"
style = "SemiBold Italic"

[font.offset]
x = 0
y = 2

# ─── cursor ──────────────────────────────────────────────────────────────
[cursor]
unfocused_hollow = true
thickness = 0.25

[cursor.style]
shape = "Underline"
blinking = "On"

[cursor.vi_mode_style]
shape = "Block"
blinking = "Off"

# ─── bell: soft twilight pulse ───────────────────────────────────────────
[bell]
animation = "EaseOutSine"
duration = 90
color = "#1a2050" # just a breath above the bg — visible but gentle

# ─── mouse / selection ───────────────────────────────────────────────────
[mouse]
hide_when_typing = true

[[mouse.bindings]]
mouse = "Middle"
action = "PasteSelection"

[selection]
save_to_clipboard = true
semantic_escape_chars = ",│`|:\"' ()[]{}<>\t"

# ─── colors: aurora borealis ─────────────────────────────────────────────
[colors]
draw_bold_text_with_bright_colors = true
transparent_background_colors = true

[colors.primary]
background = "#050817" # void / night sky
foreground = "#dbe9ff" # moonlight on snow
dim_foreground = "#7a8aab"
bright_foreground = "#ffffff"

[colors.cursor]
text = "#050817"
cursor = "#7df9ff" # glacier cyan

[colors.vi_mode_cursor]
text = "#050817"
cursor = "#00ff9c" # aurora green

[colors.search.matches]
foreground = "#050817"
background = "#fff394" # starlight

[colors.search.focused_match]
foreground = "#050817"
background = "#00ff9c"

[colors.footer_bar]
foreground = "#dbe9ff"
background = "#11183a"

[colors.hints.start]
foreground = "#050817"
background = "#fff394"

[colors.hints.end]
foreground = "#050817"
background = "#7df9ff"

[colors.line_indicator]
foreground = "None"
background = "None"

[colors.selection]
text = "#050817"
background = "#9b6dff" # twilight purple

# normal: aurora palette
[colors.normal]
black = "#0a0e27"
red = "#ff5c8a" # rose dawn
green = "#00ff9c" # aurora green
yellow = "#fff394" # starlight
blue = "#5e9eff" # ice blue
magenta = "#c779ff" # twilight purple
cyan = "#7df9ff" # glacier
white = "#dbe9ff" # moonlight

# bright: cranked-up aurora intensity
[colors.bright]
black = "#1a2050"
red = "#ff85a8"
green = "#7affc8"
yellow = "#fff9c2"
blue = "#8fc2ff"
magenta = "#dba6ff"
cyan = "#b2fbff"
white = "#ffffff"

[colors.dim]
black = "#02040d"
red = "#a83a5c"
green = "#00a868"
yellow = "#a8975f"
blue = "#3e6aa8"
magenta = "#824da8"
cyan = "#52a3a8"
white = "#8a96b3"

# indexed accents for prompt themes / starship modules
[[colors.indexed_colors]]
index = 16
color = "#ff9e64" # ember (warning)

[[colors.indexed_colors]]
index = 17
color = "#00d4aa" # mint (success)

# ─── hints: click URLs ───────────────────────────────────────────────────
[[hints.enabled]]
command = "xdg-open"
hyperlinks = true
post_processing = true
persist = false
mouse = { enabled = true, mods = "None" }
binding = { key = "U", mods = "Control|Shift" }
regex = '(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^<>"\s{-}\^⟨⟩`]+'

# Hint: copy a hex color you see in the buffer
[[hints.enabled]]
command = { program = "sh", args = ["-c", "printf '%s' \"$1\" | xclip -selection clipboard", "_"] }
hyperlinks = false
persist = false
mouse = { enabled = false }
binding = { key = "H", mods = "Control|Shift" }
regex = '#(?:[0-9a-fA-F]{3}){1,2}\b'

# ─── keybindings ─────────────────────────────────────────────────────────
[keyboard]
bindings = [
# font size
{ key = "Equals", mods = "Control", action = "IncreaseFontSize" },
{ key = "Plus", mods = "Control", action = "IncreaseFontSize" },
{ key = "Minus", mods = "Control", action = "DecreaseFontSize" },
{ key = "Key0", mods = "Control", action = "ResetFontSize" },

# clipboard
{ key = "C", mods = "Control|Shift", action = "Copy" },
{ key = "V", mods = "Control|Shift", action = "Paste" },
{ key = "Insert", mods = "Shift", action = "PasteSelection" },

# search
{ key = "F", mods = "Control|Shift", action = "SearchForward" },
{ key = "B", mods = "Control|Shift", action = "SearchBackward" },

# vi mode + scrollback
{ key = "Space", mods = "Control|Shift", action = "ToggleViMode" },
{ key = "PageUp", action = "ScrollPageUp", mode = "~Alt" },
{ key = "PageDown", action = "ScrollPageDown", mode = "~Alt" },
{ key = "Home", mods = "Shift", action = "ScrollToTop" },
{ key = "End", mods = "Shift", action = "ScrollToBottom" },
{ key = "K", mods = "Control|Shift", action = "ClearHistory" },
{ key = "L", mods = "Control", chars = "\f" },

# window
{ key = "F11", action = "ToggleFullscreen" },
{ key = "Return", mods = "Alt", action = "ToggleFullscreen" },
{ key = "N", mods = "Control|Shift", action = "CreateNewWindow" },

# opacity (dim toward void) — nice for ambient mode
# opacity (dim toward void) — nice for ambient mode
{ key = "BracketLeft", mods = "Control|Shift", action = "DecreaseOpacity" },
{ key = "BracketRight", mods = "Control|Shift", action = "IncreaseOpacity" },
]
Loading