Difference between revisions of "Dotfiles"
(→Tools: for the record: etckeeper was removed in Special:Diff/564938 because it does not appear to be able to manage dotfiles) |
Neersighted (talk | contribs) (Updated my dotfiles) |
||
(12 intermediate revisions by 10 users not shown) | |||
Line 52: | Line 52: | ||
{| class="wikitable sortable" style="text-align: center;" | {| class="wikitable sortable" style="text-align: center;" | ||
! Name !! Package !! Written in !! File grouping !! Processing | ! Name !! Package !! Written in !! File grouping !! Processing | ||
+ | |- | ||
+ | ! [https://github.com/kesslern/dot-templater dot-templater] | ||
+ | | {{AUR|dot-templater-git}} || Rust || directory-based || custom syntax | ||
|- | |- | ||
! [https://deadc0de.re/dotdrop/ dotdrop] | ! [https://deadc0de.re/dotdrop/ dotdrop] | ||
Line 61: | Line 64: | ||
! [https://github.com/EvanPurkhiser/dots Dots] | ! [https://github.com/EvanPurkhiser/dots Dots] | ||
| {{AUR|dots-manager}} || Python || directory-based || custom append points | | {{AUR|dots-manager}} || Python || directory-based || custom append points | ||
+ | |- | ||
+ | ! [https://github.com/twpayne/chezmoi chezmoi] | ||
+ | | {{Pkg|chezmoi}} || Go || directory-based || Go templates | ||
|- | |- | ||
! [https://www.gnu.org/software/stow/ GNU Stow] | ! [https://www.gnu.org/software/stow/ GNU Stow] | ||
Line 97: | Line 103: | ||
| {{AUR|vcsh}} || Shell || repository-wise || {{Grey|No}} | | {{AUR|vcsh}} || Shell || repository-wise || {{Grey|No}} | ||
|- | |- | ||
− | ! [https://thelocehiliosan.github.io/yadm/ yadm]<sup>1)</sup> | + | ! [https://thelocehiliosan.github.io/yadm/ yadm]<sup>(1)</sup> |
| {{AUR|yadm-git}} || Shell || filename-based<br>(by class, OS, hostname & user) [https://thelocehiliosan.github.io/yadm/docs/alternates] || Jinja2<br>(optional)[https://thelocehiliosan.github.io/yadm/docs/alternates#jinja-templates] | | {{AUR|yadm-git}} || Shell || filename-based<br>(by class, OS, hostname & user) [https://thelocehiliosan.github.io/yadm/docs/alternates] || Jinja2<br>(optional)[https://thelocehiliosan.github.io/yadm/docs/alternates#jinja-templates] | ||
|} | |} | ||
Line 110: | Line 116: | ||
! [https://github.com/alfunx/.dotfiles alfunx] | ! [https://github.com/alfunx/.dotfiles alfunx] | ||
| zsh || awesome || vim || kitty || tmux || ncmpcpp/mpd || htop/lain || thunderbird || | | zsh || awesome || vim || kitty || tmux || ncmpcpp/mpd || htop/lain || thunderbird || | ||
+ | |- | ||
+ | ! [https://gitlab.com/peterzuger/dotfiles peterzuger] | ||
+ | | zsh || i3-gaps || emacs || rxvt-unicode || screen || moc || htop || || | ||
|- | |- | ||
! [https://gitlab.com/Ambrevar/dotfiles Ambrevar] | ! [https://gitlab.com/Ambrevar/dotfiles Ambrevar] | ||
Line 127: | Line 136: | ||
|- | |- | ||
! [https://gitlab.com/BVollmerhaus/dotfiles BVollmerhaus] | ! [https://gitlab.com/BVollmerhaus/dotfiles BVollmerhaus] | ||
− | | | + | | [https://gitlab.com/BVollmerhaus/dotfiles/tree/master/config/fish-custom fish] || [https://gitlab.com/BVollmerhaus/dotfiles/blob/master/config/i3/config i3-gaps] || [https://gitlab.com/BVollmerhaus/dotfiles/blob/master/config/kak/kakrc kakoune] || rxvt-unicode || || || [https://gitlab.com/BVollmerhaus/dotfiles/blob/master/config/polybar/config polybar] || thunderbird || |
|- | |- | ||
! [https://github.com/cinelli/dotfiles cinelli] | ! [https://github.com/cinelli/dotfiles cinelli] | ||
Line 161: | Line 170: | ||
! [https://github.com/jelly/Dotfiles jelly] | ! [https://github.com/jelly/Dotfiles jelly] | ||
| zsh || i3 || vim || termite || tmux || ncmpcpp || || mutt-kz-git || weechat | | zsh || i3 || vim || termite || tmux || ncmpcpp || || mutt-kz-git || weechat | ||
+ | |- | ||
+ | ! [https://github.com/Jorengarenar/dotfiles Jorengarenar] | ||
+ | | bash || i3 || vim || xterm || || mpv || i3blocks || aerc || weechat | ||
|- | |- | ||
! [https://github.com/maximbaz/dotfiles maximbaz] | ! [https://github.com/maximbaz/dotfiles maximbaz] | ||
| zsh || i3-gaps || neovim || kitty || || || py3status || thunderbird || | | zsh || i3-gaps || neovim || kitty || || || py3status || thunderbird || | ||
+ | |- | ||
+ | ! [https://gitlab.com/mehalter/dotfiles mehalter] | ||
+ | | zsh || i3-gaps || neovim || termite || tmux || gpymusic || i3blocks, gotop || neomutt || weechat | ||
|- | |- | ||
! [https://github.com/meskarune/.dotfiles meskarune] | ! [https://github.com/meskarune/.dotfiles meskarune] | ||
Line 169: | Line 184: | ||
|- | |- | ||
! [https://github.com/neersighted/dotfiles neersighted] | ! [https://github.com/neersighted/dotfiles neersighted] | ||
− | | | + | | fish || i3 || neovim || alacritty || tmux || ncmpcpp || || || |
+ | |- | ||
+ | ! [https://github.com/oibind/dotfiles oibind] | ||
+ | | fish || awesome || neovim || termite || || || htop-vim || || weechat | ||
|- | |- | ||
! [https://github.com/ok100/configs OK100] | ! [https://github.com/ok100/configs OK100] | ||
Line 178: | Line 196: | ||
|- | |- | ||
! [https://github.com/reisub0/dot reisub0] | ! [https://github.com/reisub0/dot reisub0] | ||
− | | | + | | fish || qtile || neovim || kitty || || mpd || conky || || |
|- | |- | ||
! [https://github.com/sistematico/majestic sistematico] | ! [https://github.com/sistematico/majestic sistematico] | ||
Line 193: | Line 211: | ||
|- | |- | ||
! [https://github.com/thiagowfx/dotfiles thiagowfx] | ! [https://github.com/thiagowfx/dotfiles thiagowfx] | ||
− | | bash | + | | bash || i3 || vim/emacs || tilix || || || i3blocks || || |
|- | |- | ||
! [https://github.com/vodik/dotfiles vodik] | ! [https://github.com/vodik/dotfiles vodik] |
Latest revision as of 21:42, 2 September 2019
User-specific application configuration is traditionally stored in so called dotfiles (files whose filename starts with a dot). It is common practice to track dotfiles with a version control system such as Git to keep track of changes and synchronize dotfiles across various hosts. There are various approaches to managing your dotfiles (e.g. directly tracking dotfiles in the home directory v.s. storing them in a subdirectory and symlinking/copying/generating files with a shell script or a dedicated tool). Apart from explaining how to manage your dotfiles this article also contains a list of dotfile repositories from Arch Linux users.
Contents
Tracking dotfiles directly with Git
The benefit of tracking dotfiles directly with Git is that it only requires Git and does not involve symlinks. The disadvantage is that host-specific configuration generally requires merging changes into multiple branches.
The simplest way to achieve this approach is to initialize a Git repository directly in your home directory and ignoring all files by default with a gitignore(5) pattern of *
. This method however comes with two drawbacks: it can become confusing when you have other Git repositories in your home directory (e.g. if you forget to initialize a repository you suddenly operate on your dotfile repository) and you can no longer easily see which files in the current directory are untracked (because they are ignored).
An alternative method without these drawbacks is the "bare repository and alias method" popularized by this Hacker News comment, which just takes three commands to set up:
$ git init --bare ~/.dotfiles $ alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' $ config config status.showUntrackedFiles no
You can then manage your dotfiles with the created alias.
Host-specific configuration
A common problem with synchronizing dotfiles across various machines is host-specific configuration.
With Git this can be solved by maintaining a master branch for all shared configuration, while each individual machine has a machine-specific branch checked out. Host-specific configuration can be committed to the machine-specific branch; when shared configuration is modified in the master branch, the per-machine branches need to be rebased on top of the updated master.
In configuration scripts like shell configuration files conditional logic can be used. For example, Bash scripts (i.e. .bashrc
) can apply different configuration depending on the machine name (or type, custom variable, etc.):
if [[ "$(hostname)" == "archlaptop" ]]; then # laptop specific commands here else # desktop or server machine commands fi
Similar can also be achieved with .Xresources.[1]
If you find rebasing Git branches too cumbersome, you may want to use a tool that supports file grouping, or if even greater flexibility is desired, a tool that does processing.
Tools
- File grouping
- How configuration files can be grouped to configuration groups (also called profiles or packages).
- Processing
- Some tools process configuration files to allow them to be customized depending on the host.
Name | Package | Written in | File grouping | Processing |
---|---|---|---|---|
dot-templater | dot-templater-gitAUR | Rust | directory-based | custom syntax |
dotdrop | dotdropAUR | Python | configuration file | Jinja2 |
dotfiles | dotfilesAUR | Python | No | No |
Dots | dots-managerAUR | Python | directory-based | custom append points |
chezmoi | chezmoi | Go | directory-based | Go templates |
GNU Stow | stow | Perl | directory-based[2] | No |
Mackup | mackupAUR | Python | automatic per application | No |
mir.qualia | mir.qualiaAUR | Python | No | custom blocks |
rcm | rcmAUR | Perl | directory-based (by host or tag) | No |
Tools wrapping Git
If you are uncomfortable with Git, you may want to use one of these tools, which abstract the version control system away (more or less).
Name | Package | Written in | File grouping | Processing |
---|---|---|---|---|
dotgit | dotgitAUR | Bash | filename-based | No |
homeshick | homeshick-gitAUR | Bash | repository-wise | No |
homesick | homesickAUR | Ruby | repository-wise | No |
Pearl | pearl-gitAUR | Bash | repository-wise | No |
vcsh | vcshAUR | Shell | repository-wise | No |
yadm(1) | yadm-gitAUR | Shell | filename-based (by class, OS, hostname & user) [3] |
Jinja2 (optional)[4] |
User repositories
Author | Shell (Shell framework) | WM / DE | Editor | Terminal | Multiplexer | Audio | Monitor | IRC | |
---|---|---|---|---|---|---|---|---|---|
alfunx | zsh | awesome | vim | kitty | tmux | ncmpcpp/mpd | htop/lain | thunderbird | |
peterzuger | zsh | i3-gaps | emacs | rxvt-unicode | screen | moc | htop | ||
Ambrevar | Eshell | EXWM | Emacs | Emacs (Eshell) | Emacs TRAMP + dtach | EMMS | conky/dzen | mu4e | Circe |
awal | fish | i3 | vim | st | tmux | i3status | The Lounge | ||
ayekat | zsh | karuiwm | vim | rxvt-unicode | tmux | ncmpcpp/mpd | karuibar | mutt | irssi |
bamos | zsh | i3/xmonad | vim/emacs | rxvt-unicode | tmux | mpv/cmus | conky/xmobar | mutt | ERC |
brisbin33 | zsh | xmonad | vim | rxvt-unicode | screen | dzen | mutt | irssi | |
BVollmerhaus | fish | i3-gaps | kakoune | rxvt-unicode | polybar | thunderbird | |||
cinelli | zsh | dwm | vim | termite-git | pianobar | htop | mutt-kz | weechat | |
dikiaap | zsh | i3-gaps | neovim | alacritty | tmux | i3blocks | |||
Earnestly | zsh | i3/orbment | vim/emacs | termite | tmux | mpd | conky | mutt | weechat |
ErikBjare | zsh | xmonad/xfce4 | vim | terminator | tmux | xfce4-panel | weechat | ||
falconindy | bash | i3 | vim | rxvt-unicode | ncmpcpp | conky | mutt | ||
graysky | zsh | xfce4 | vim | terminal | ncmpcpp | custom | thunderbird | ||
hugdru | zsh | awesome | neovim | rxvt-unicode | tmux | thunderbird | weechat | ||
insanum | bash | herbstluftwm | vim | evilvte | tmux | dzen | mutt-kz | ||
jasonwryan | bash/zsh | dwm | vim | rxvt-unicode | tmux | ncmpcpp | custom | mutt | irssi |
jdevlieghere | zsh | xmonad | vim | terminal | tmux | htop | mutt | weechat | |
jelly | zsh | i3 | vim | termite | tmux | ncmpcpp | mutt-kz-git | weechat | |
Jorengarenar | bash | i3 | vim | xterm | mpv | i3blocks | aerc | weechat | |
maximbaz | zsh | i3-gaps | neovim | kitty | py3status | thunderbird | |||
mehalter | zsh | i3-gaps | neovim | termite | tmux | gpymusic | i3blocks, gotop | neomutt | weechat |
meskarune | bash | herbstluftwm | vim | rxvt-unicode | screen | conky | weechat | ||
neersighted | fish | i3 | neovim | alacritty | tmux | ncmpcpp | |||
oibind | fish | awesome | neovim | termite | htop-vim | weechat | |||
OK100 | bash | dwm | vim | rxvt-unicode | cmus | conky, dzen | mutt | weechat | |
pablox-cl | zsh (zplug) | gnome3 | neovim | kitty | |||||
reisub0 | fish | qtile | neovim | kitty | mpd | conky | |||
sistematico | zsh/fish/bash | i3-gaps | vim/nano | termite | tmux | ncmpcpp | polybar | mutt | weechat |
sitilge | zsh | awesome | neovim | termite | thunderbird | ||||
swalladge | zsh/bash | i3 | neovim/vim | termite | tmux | cmus | i3pystatus | mutt | |
SyfiMalik | zsh | i3 | vim | rxvt-unicode | tmux | ncmpcpp/mpd | polybar | mutt | weechat |
thiagowfx | bash | i3 | vim/emacs | tilix | i3blocks | ||||
vodik | zsh | xmonad | vim | termite-git | tmux | ncmpcpp | custom | mutt | weechat |
w0ng | zsh | dwm | vim | rxvt-unicode | tmux | ncmpcpp | custom | mutt | irssi |
whitelynx | fish | i3 | neovim | kitty | i3pystatus | ||||
Wintervenom | bash | herbstluftwm | vim | rxvt-unicode | screen | mpd (mpc-utils) | hlwm-dzen2 | mutt | weechat |
wolfcore | bash | dwm | vim | rxvt-unicode | tmux | cmus | custom | weechat | |
zendeavor | zsh | i3 | vim | rxvt-unicode | tmux | ncmpcpp | i3status | weechat |
See also
- gregswiki:DotFiles
- XMonad Config Archive
- dotshare.it
- dotfiles.github.io
- terminal.sexy - Terminal color scheme designer