README 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Dotfiles
  2. Manages dotfiles across multiple machines via symlinks, with per-host
  3. and per-group overrides.
  4. ## Quick start
  5. curl https://git.capella.pro/capella/dotfiles/raw/master/start | bash -s -- sync
  6. Or if already installed:
  7. dotsync
  8. ## Usage
  9. start sync [--machine|--group <name>] [dot_file]
  10. start list
  11. start status
  12. ## Multi-host
  13. Each host is identified by its hostname (`uname -n`).
  14. ### File overrides
  15. dots/ # common dotfiles (all hosts)
  16. dots.<hostname>/ # host-specific overrides (entire files)
  17. dots.@<group>/ # group-level overrides
  18. Resolution order (last wins): common -> groups (alphabetical) -> host.
  19. ### Sync lists
  20. to_sync # files synced to all hosts
  21. to_sync.<hostname> # additional files for a specific host
  22. to_sync.@<group> # additional files for a group
  23. ### Groups
  24. groups.<hostname> # one group name per line
  25. Example `groups.jellyfish`:
  26. wayland
  27. Hosts in the same group share `to_sync.@<group>` and `dots.@<group>/`.
  28. ### In-file markers
  29. For files that are mostly shared with a few per-host differences,
  30. use markers instead of duplicating the whole file:
  31. # @host jellyfish
  32. set $mod Mod4
  33. # @end
  34. # @host tompot
  35. set $mod Mod1
  36. # @end
  37. # @group wayland
  38. exec waybar
  39. # @end
  40. - Lines between `@host <name>` and `@end` are included only on that host
  41. - Lines between `@group <name>` and `@end` are included for hosts in that group
  42. - Lines outside any markers are always included
  43. - The comment prefix (`#`, `//`, `;`, etc.) is auto-detected
  44. - Files with markers are processed and written (not symlinked)
  45. - Files without markers are symlinked as usual
  46. ## Adding dotfiles
  47. # Add to common (all hosts):
  48. dotsync sync .config/foo
  49. # Add for this host only:
  50. dotsync sync --machine .config/bar
  51. # Add for a group:
  52. dotsync sync --group wayland .config/baz