Save my dotfiles!

G. Capella a05a247e03 Replace sakura with gtklock in synced dotfiles пре 23 часа
dots a05a247e03 Replace sakura with gtklock in synced dotfiles пре 23 часа
dots.tompot 2d48e25952 Add multi-host dotfiles support with groups and in-file markers пре 23 часа
.gitignore 75f7923e52 Fri May 13 22:43:43 BST 2022 пре 3 година
.gitmodules 63f921635f Fri May 13 23:08:31 BST 2022 пре 3 година
README af3b850483 Update README with multi-host documentation пре 23 часа
groups.jellyfish 2d48e25952 Add multi-host dotfiles support with groups and in-file markers пре 23 часа
groups.tompot 2d48e25952 Add multi-host dotfiles support with groups and in-file markers пре 23 часа
start 8656edb404 Expand directories with markers into per-file deploy operations пре 23 часа
to_sync a05a247e03 Replace sakura with gtklock in synced dotfiles пре 23 часа

README

# Dotfiles

Manages dotfiles across multiple machines via symlinks, with per-host
and per-group overrides.

## Quick start

curl https://git.capella.pro/capella/dotfiles/raw/master/start | bash -s -- sync

Or if already installed:

dotsync

## Usage

start sync [--machine|--group ] [dot_file]
start list
start status

## Multi-host

Each host is identified by its hostname (`uname -n`).

### File overrides

dots/ # common dotfiles (all hosts)
dots./ # host-specific overrides (entire files)
dots.@/ # group-level overrides

Resolution order (last wins): common -> groups (alphabetical) -> host.

### Sync lists

to_sync # files synced to all hosts
to_sync. # additional files for a specific host
to_sync.@ # additional files for a group

### Groups

groups. # one group name per line

Example `groups.jellyfish`:

wayland

Hosts in the same group share `to_sync.@` and `dots.@/`.

### In-file markers

For files that are mostly shared with a few per-host differences,
use markers instead of duplicating the whole file:

# @host jellyfish
set $mod Mod4
# @end

# @host tompot
set $mod Mod1
# @end

# @group wayland
exec waybar
# @end

- Lines between `@host ` and `@end` are included only on that host
- Lines between `@group ` and `@end` are included for hosts in that group
- Lines outside any markers are always included
- The comment prefix (`#`, `//`, `;`, etc.) is auto-detected
- Files with markers are processed and written (not symlinked)
- Files without markers are symlinked as usual

## Adding dotfiles

# Add to common (all hosts):
dotsync sync .config/foo

# Add for this host only:
dotsync sync --machine .config/bar

# Add for a group:
dotsync sync --group wayland .config/baz