Skip to content

Commit c60347f

Browse files
committed
docs: add profile workflow documentation to README and website (closes #42)
1 parent a4316f8 commit c60347f

File tree

5 files changed

+82
-7
lines changed

5 files changed

+82
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
- **Docs**: Add profile workflow documentation to README and website (closes #42)
11+
1012
---
1113

1214
## [0.3.0] - 2026-02-05

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,59 @@ Then add `fpath=(~/.zsh/completions $fpath)` to your .zshrc before your framewor
207207
4. **Common Files**: Files that are shared across all profiles are stored in the `common` section and linked regardless of the active profile
208208
5. **Sync**: Changes are committed and synced with GitHub automatically
209209
210+
## Working with Profiles
211+
212+
Profiles are how DotState organizes your dotfiles for different machines or contexts. Each profile has its own set of files, while **Common Files** are shared across all profiles automatically.
213+
214+
```
215+
┌────────────────────┐
216+
│ Common Files │
217+
├────────────────────┤
218+
│ .tmux.conf │
219+
│ .gitconfig │ ┌────────────────────┐
220+
│ .vimrc │ │ Server │
221+
│ │ ├────────────────────┤
222+
│ ├──────►│ .bashrc │
223+
│ │ │ .profile │
224+
└─┬─────────────────┬┘ │ .config.toml │
225+
│ │ └────────────────────┘
226+
│ │
227+
▼ ▼
228+
┌────────────────────┐ ┌────────────────────┐
229+
│ Personal │ │ Work │
230+
├────────────────────┤ ├────────────────────┤
231+
│ .zshrc │ │ .zshrc │
232+
│ .sshconfig │ Copy │ .sshconfig │
233+
│ ... ├──────────►│ ... │
234+
│ │ │ workfile.sh │
235+
└────────────────────┘ └────────────────────┘
236+
```
237+
238+
### Creating Profiles
239+
240+
In the TUI, go to **Manage Profiles** and press `C` to create a new profile. You can:
241+
242+
- **Start blank** for a completely new setup
243+
- **Copy from an existing profile** to carry over files and packages — great for setting up a similar machine quickly
244+
245+
### Switching Profiles
246+
247+
Select a profile and press `Enter` to switch. DotState will remove symlinks for the old profile and create symlinks for the new one automatically. Common files stay linked regardless of which profile is active.
248+
249+
### Common Files
250+
251+
You decide which files are shared. Move any file to **Common** and it will be symlinked in every profile. Common files stay linked when you switch profiles. To move a file between profile-specific and common:
252+
253+
1. Go to **Manage Files**
254+
2. Select a file
255+
3. Press `M` to move it to Common (or back to the active profile)
256+
257+
### Use Cases
258+
259+
- **Multi-machine**: Use a `Personal` profile on your laptop, `Work` on your work machine, and `Server` for headless setups. Keep shared configs (`.gitconfig`, `.tmux.conf`) in Common.
260+
- **Same computer, different contexts**: Create profiles like `day`, `night`, or `focus` with different terminal themes and defaults, and switch between them instantly.
261+
- **Quick duplication**: When setting up a second machine, create a new profile by copying from an existing one, then tweak what's different.
262+
210263
## Configuration
211264
212265
### Repository Setup Modes

website/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ npm-debug.log*
2020

2121
# OS files
2222
.DS_Store
23+
.vercel

website/public/screenshot.png

616 KB
Loading

website/src/pages/index.astro

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ const sections = [
7676
<div class="section-content">
7777
<p><strong>DotState</strong> is a terminal-based <strong>dotfile manager</strong> that helps you manage your dotfiles effortlessly. Whether you're syncing your configuration across multiple machines or setting up a new development environment, DotState makes it simple, safe, and fast.</p>
7878

79+
<img src="/screenshot.png" alt="DotState TUI screenshot showing the main menu with Tokyo Night dark theme" class="screenshot" width="1130" height="868" loading="eager" />
80+
7981
<InstallWidget />
8082

8183
<h3>Why Use a Dotfile Manager?</h3>
@@ -122,6 +124,10 @@ const sections = [
122124
<Tip>
123125
<strong>Tip:</strong> When you select a file, it's automatically copied to your repository and a symlink is created in its place. This means your files are safely backed up and version controlled.
124126
</Tip>
127+
128+
<h3>Profiles & Common Files</h3>
129+
<p>Organize your dotfiles with <strong>profiles</strong> for different machines or contexts. Files you choose to mark as <strong>common</strong> are shared across all profiles — the rest stay profile-specific. See <a href="#examples" class="section-link" data-section="examples">Examples</a> for workflows.</p>
130+
<CodeBlock code={"Common Files (shared) Profile-specific\n───────────────────── ─────────────────\n .gitconfig Personal/\n .tmux.conf ───► .zshrc\n .vimrc .ssh/config\n Work/\n .zshrc\n work-scripts/"} />
125131
</div>
126132

127133
<StatusGrid />
@@ -400,20 +406,28 @@ const sections = [
400406
</ExampleCard>
401407

402408
<ExampleCard title="Managing multiple profiles">
403-
<p>Create separate profiles for different contexts:</p>
409+
<p>Profiles let you organize dotfiles for different machines or contexts. Each profile has its own files, while <strong>Common Files</strong> are shared across all profiles.</p>
410+
<ul>
411+
<li><strong>Create a profile:</strong> Press <kbd>C</kbd> in Manage Profiles</li>
412+
<li><strong>Copy from existing:</strong> When creating, choose an existing profile to start with — copies all files and packages</li>
413+
<li><strong>Switch profiles:</strong> Select a profile and press <kbd>Enter</kbd> — symlinks are swapped automatically</li>
414+
</ul>
415+
<p><strong>Example setups:</strong></p>
404416
<ul>
405-
<li><strong>Personal:</strong> Your personal dotfiles</li>
406-
<li><strong>Work:</strong> Work-specific configurations</li>
407-
<li><strong>Mac/Linux:</strong> OS-specific settings</li>
417+
<li><strong>Multi-machine:</strong> <code>Personal</code> on your laptop, <code>Work</code> on your work machine, <code>Server</code> for headless setups</li>
418+
<li><strong>Same computer:</strong> <code>day</code>, <code>night</code>, or <code>focus</code> profiles with different terminal themes</li>
408419
</ul>
409420
</ExampleCard>
410421

411422
<ExampleCard title="Sharing common files">
423+
<p>You decide which files are shared. Move any file to <strong>Common</strong> and it will be symlinked in every profile. Files stay in Common when you switch profiles.</p>
412424
<ol>
413-
<li>Add a file like <code>.gitconfig</code> to your collection</li>
414-
<li>Move it to the <strong>Common</strong> section</li>
415-
<li>The file will now be symlinked in every profile</li>
425+
<li>Go to <strong>Manage Files</strong></li>
426+
<li>Select a file from your profile</li>
427+
<li>Press <kbd>M</kbd> to move it to Common</li>
416428
</ol>
429+
<p>Press <kbd>M</kbd> again on a common file to move it back to the active profile.</p>
430+
<CodeBlock code={"Common Files (you choose) Profiles (per-machine)\n───────────────────────── ──────────────────────\n .gitconfig ┌──────► Personal/.zshrc\n .tmux.conf ─────┤ Personal/.ssh/config\n .vimrc └──────► Work/.zshrc\n Work/work-scripts/"} />
417431
</ExampleCard>
418432
</div>
419433
</article>
@@ -794,6 +808,11 @@ const sections = [
794808
</Layout>
795809

796810
<style>
811+
.screenshot {
812+
width: 100%;
813+
height: auto;
814+
}
815+
797816
.requirements-list {
798817
list-style: none;
799818
margin-left: 0;

0 commit comments

Comments
 (0)