Skip to content

Commit 0411d9e

Browse files
Enhance README.md with comprehensive structure and usage instructions for cross-platform dotfiles. Introduce a Table of Contents, detailed overview of shared and host-specific configurations, and improved formatting for clarity. Update package and host sections to reflect current tools and configurations.
1 parent 591da5e commit 0411d9e

1 file changed

Lines changed: 114 additions & 34 deletions

File tree

README.md

Lines changed: 114 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,137 @@
1-
# dotfiles
1+
# .dotfiles
22

3-
Personal dotfiles managed with GNU Stow. `common/` holds shared defaults and
4-
host folders layer overrides.
3+
**Cross-platform dotfiles managed with [GNU Stow](https://www.gnu.org/software/stow/).** One repo. Many machines. Zero friction.
54

6-
## Structure
5+
[![CI](https://img.shields.io/github/actions/workflow/status/FridrichMethod/dotfiles/ci.yml?label=CI&style=flat-square)](https://github.com/FridrichMethod/dotfiles/actions)
6+
[![License](https://img.shields.io/github/license/FridrichMethod/dotfiles?style=flat-square)](LICENSE)
7+
[![Last commit](https://img.shields.io/github/last-commit/FridrichMethod/dotfiles?style=flat-square)](https://github.com/FridrichMethod/dotfiles/commits/main)
8+
9+
## Table of Contents
10+
11+
- [Overview](#overview)
12+
- [Quick Start](#quick-start)
13+
- [Structure](#structure)
14+
- [Packages](#packages)
15+
- [Hosts](#hosts)
16+
- [How It Works](#how-it-works)
17+
- [Pre-commit Hooks](#pre-commit-hooks)
18+
- [Adding a New Package](#adding-a-new-package)
19+
- [License](#license)
20+
21+
## Overview
22+
23+
Shared defaults live in `common/`. Host-specific overlays layer on top, so
24+
each machine gets exactly the config it needs — no conditionals, no templating.
25+
26+
## Quick Start
727

828
```bash
29+
git clone https://github.com/FridrichMethod/dotfiles.git ~/dotfiles
30+
cd ~/dotfiles
31+
git submodule update --init --recursive
32+
./stow-all.sh <host-dir> # e.g. mac, wsl-ubuntu, sherlock
33+
```
34+
35+
> `.stowrc` sets `--target=~`, so Stow links everything into your home directory.
36+
37+
## Structure
38+
39+
```
940
dotfiles/
10-
├─ common/ # shared packages
11-
├─ mac/ # macOS overrides
12-
├─ wsl-ubuntu/ # WSL Ubuntu overrides
13-
├─ lab-ubuntu/ # lab Ubuntu overrides
14-
├─ marlowe/ # host overrides
15-
├─ sherlock/ # host overrides
16-
├─ win/ # Windows-side config (e.g. WSL)
17-
└─ stow-all.sh # optional helper
41+
├── common/ shared defaults (stowed first)
42+
│ ├── aria2/
43+
│ ├── bash/
44+
│ ├── conda/
45+
│ ├── git/
46+
│ ├── kitty/
47+
│ ├── pymol/ submodule — auto-updated daily via GitHub Actions
48+
│ ├── sh/
49+
│ ├── ssh/
50+
│ ├── tcsh/
51+
│ ├── vim/
52+
│ ├── wezterm/
53+
│ ├── xonsh/
54+
│ └── zsh/
55+
56+
├── mac/ macOS overrides
57+
├── wsl-ubuntu/ WSL Ubuntu overrides
58+
├── lab-ubuntu/ lab Ubuntu overrides
59+
├── fedora/ Fedora overrides
60+
├── ubuntu/ Ubuntu overrides
61+
├── sherlock/ Stanford Sherlock HPC
62+
├── marlowe/ host overrides
63+
├── win/ Windows-side config (WezTerm, .wslconfig)
64+
65+
├── stow-all.sh one-command installer
66+
├── dotfiles-update.sh
67+
└── .stowrc Stow defaults (target = ~)
1868
```
1969

2070
## Packages
2171

22-
- Zsh, Bash, POSIX sh, tcsh, xonsh
23-
- Git + SSH
24-
- Kitty + WezTerm
25-
- Vim, Conda
26-
- Aria2
27-
- PyMOL scripts (submodule; auto-updated daily by [Actions](.github/workflows/update-pymolscripts-submodule.yml))
28-
- Windows WSL config (`win/wsl/.wslconfig`)
72+
| Category | Tools |
73+
|----------|-------|
74+
| **Shell** | Zsh, Bash, POSIX sh, tcsh, xonsh |
75+
| **Terminal** | Kitty, WezTerm |
76+
| **Editor** | Vim |
77+
| **Version Control** | Git, SSH |
78+
| **Science** | Conda, PyMOL scripts |
79+
| **Utilities** | Aria2 |
2980

30-
## Usage
81+
## Hosts
3182

32-
```bash
33-
git clone <repo> ~/dotfiles
34-
cd ~/dotfiles
35-
./stow-all.sh <host-dir>
83+
| Host | Platform | Layers |
84+
|------|----------|--------|
85+
| `mac` | macOS | bash, git, sh, ssh, zsh |
86+
| `wsl-ubuntu` | WSL 2 | bash, git, sh, ssh, zsh |
87+
| `lab-ubuntu` | Ubuntu (lab) | bash, git, sh, ssh, zsh |
88+
| `fedora` | Fedora | bash, zsh |
89+
| `ubuntu` | Ubuntu | bash, zsh |
90+
| `sherlock` | Stanford HPC | bash, sh, zsh |
91+
| `marlowe` | Custom host | bash, sh, zsh |
92+
| `win` | Windows | wezterm, wsl |
93+
94+
## How It Works
95+
96+
```
97+
common/zsh/.zshrc ──stow──▶ ~/.zshrc
98+
mac/git/.gitconfig ──stow──▶ ~/.gitconfig (overrides common)
3699
```
37100

38-
`.stowrc` sets `--target=~`, so stow links into your home directory.
101+
1. **`common/`** is stowed first — shared baseline for every machine.
102+
2. **`<host>/`** is stowed second — host-specific files override or extend common.
103+
3. Stow runs with `--no-folding`, so individual files are linked (not entire directories).
39104

40-
## Pre-commit
105+
## Pre-commit Hooks
41106

42-
Optional hooks for formatting/linting before commit:
107+
Optional but recommended — keeps configs clean before every commit:
43108

44109
```bash
45-
pip install pre-commit # or: brew install pre-commit
110+
pip install pre-commit # or: brew install pre-commit
46111
pre-commit install
47112
pre-commit run --all-files
48113
```
49114

50-
Hooks include `shellcheck` for `.sh`/`.bash*`, `shfmt` for `.sh`/`.bash*`/`.zsh*`,
51-
`stylua` for `*.lua`, plus basic whitespace, EOF, merge-conflict, YAML, JSON,
52-
and TOML checks.
115+
| Hook | Scope |
116+
|------|-------|
117+
| **shellcheck** | `.sh`, `.bash*` |
118+
| **shfmt** | `.sh`, `.bash*`, `.zsh*` |
119+
| **stylua** | `*.lua` |
120+
| **built-in** | whitespace, EOF, merge conflicts, YAML, JSON, TOML |
121+
122+
## Adding a New Package
123+
124+
```bash
125+
# 1. Create the package directory mirroring $HOME paths
126+
mkdir -p common/newtool/.config/newtool
127+
128+
# 2. Add your config files
129+
cp ~/.config/newtool/config.toml common/newtool/.config/newtool/
130+
131+
# 3. Stow it
132+
stow --dir=common newtool
133+
```
53134

54-
## Extras
135+
## License
55136

56-
- Init PyMOL submodule: `git submodule update --init --recursive`
57-
- Add a new package: create the folder, mirror `$HOME` paths, run `stow <package>`
137+
[MIT](LICENSE)

0 commit comments

Comments
 (0)