Dotfiles: Difference between revisions

From ArchWiki
(Add zh-hans page)
m (.)
 
(42 intermediate revisions by 25 users not shown)
Line 9: Line 9:
{{Related|X resources}}
{{Related|X resources}}
{{Related articles end}}
{{Related articles end}}
User-specific application configuration is traditionally stored in so called [[Wikipedia:dotfile|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 [[#Tools|a dedicated tool]]). Apart from explaining how to manage your dotfiles this article also contains [[#User repositories|a list of dotfile repositories]] from Arch Linux users.
 
User-specific application configuration is traditionally stored in so called [[Wikipedia:dotfile|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 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 [[#Tools|a dedicated tool]]). Apart from explaining how to manage dotfiles this article also contains [[#User repositories|a list of dotfile repositories]] from Arch Linux users.


== Tracking dotfiles directly with Git ==
== Tracking dotfiles directly with Git ==
Line 20: Line 21:


  $ git init --bare ~/.dotfiles
  $ git init --bare ~/.dotfiles
  $ alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
  $ alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
  $ config config status.showUntrackedFiles no
$ dotfiles config status.showUntrackedFiles no
 
{{note|Usually one's dotfiles all have default permissions, but if specific file permissions for some files are a must, another approach should be used, as git does not store permissions ([[Talk:Dotfiles#Git approach fails on permissions and ownership|Discussion]])}}
 
Your dotfiles can be replicated on a new system like:
 
$ git clone --bare <git-repo-url> $HOME/.dotfiles
$ alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
  $ dotfiles checkout
$ dotfiles config --local status.showUntrackedFiles no
 
* In case of already having some stock dotfiles which might get overwritten, you'll encounter something similar to the following the error:
:{{bc|<nowiki>
$ dotfiles checkout
error: The following untracked working tree files would be overwritten by checkout:
    .bashrc
    .gitignore
Please move or remove them before you can switch branches.
Aborting
</nowiki>}}
 
:You could use {{ic|$ dotfiles checkout -f}} which will rewrite the already existing files, or in a safer approach take a backup of all the files with the following script and then using {{ic|checkout}}:
:{{bc|<nowiki>
mkdir -p .dotfiles-backup && \
dotfiles checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \
xargs -I{} mv {} .dotfiles-backup/{}
</nowiki>}}


You can then manage your dotfiles with the created [[alias]]. If you are using [[Bash]] and would like bash completion for this alias, simply install {{AUR|bash-complete-alias}}, then add the alias and the following line to your {{ic|~/.bashrc}}.
You can then manage your dotfiles with the created [[alias]]. If you are using [[Bash]] and would like bash completion for this alias, simply install {{AUR|bash-complete-alias}}, then add the alias and the following line to your {{ic|~/.bashrc}}.


  $ complete -F _complete_alias config
  $ complete -F _complete_alias dotfiles


Another way to get completion in bash is adding the following to your {{ic|~/.bashrc}} (taken from [https://askubuntu.com/a/642778]):
Another way to get completion in bash is adding the following to your {{ic|~/.bashrc}} (taken from [https://askubuntu.com/a/642778]):


  source /usr/share/bash-completion/completions/git
  source /usr/share/bash-completion/completions/git
  __git_complete config __git_main
  __git_complete dotfiles __git_main


{{Tip|To avoid accidentally commiting confidential information, see [[Git#Filtering confidential information]].}}
{{Tip|To avoid accidentally committing confidential information, see [[Git#Filtering confidential information]].}}


== Host-specific configuration ==
== Host-specific configuration ==
Line 61: Line 88:
{| 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/anishathalye/dotbot dotbot]
| {{AUR|dotbot}} || Python || configuration file || {{Grey|No}}
|-
|-
! [https://github.com/twpayne/chezmoi chezmoi]
! [https://github.com/twpayne/chezmoi chezmoi]
Line 68: Line 98:
| {{AUR|dot-templater-git}} || Rust || directory-based || custom syntax
| {{AUR|dot-templater-git}} || Rust || directory-based || custom syntax
|-
|-
! [https://deadc0de.re/dotdrop/ dotdrop]
! [https://github.com/oknozor/toml-bombadil toml-bombadil]
| {{Pkg|toml-bombadil}} || Rust || configuration file || tera
|-
! [https://github.com/deadc0de6/dotdrop dotdrop]
| {{AUR|dotdrop}} || Python || configuration file || Jinja2
| {{AUR|dotdrop}} || Python || configuration file || Jinja2
|-
|-
Line 93: Line 126:
|-
|-
! [https://github.com/thoughtbot/rcm rcm]
! [https://github.com/thoughtbot/rcm rcm]
| {{AUR|rcm}} || Perl || directory-based (by host or tag) || {{Grey|No}}
| {{AUR|rcm}} || Shell || directory-based (by host or tag) || {{Grey|No}}
|-
! [https://github.com/sebastiancarlos/yas-bdsm yas-bdsm]
| {{-}} || Shell || directory-based || {{Grey|No}}
|}
|}


Line 122: Line 158:
|-
|-
! [https://yadm.io yadm]<sup>(1)</sup>
! [https://yadm.io yadm]<sup>(1)</sup>
| {{Pkg|yadm}} || Python || filename-based<br>(by class/OS/distro/hostname/user)[https://yadm.io/docs/alternates] ||Built-in templates/Jinja2/ESH[https://yadm.io/docs/templates]<br>(optional)
| {{Pkg|yadm}} || Shell || filename-based<br>(by class/OS/distro/hostname/user)[https://yadm.io/docs/alternates] ||Built-in templates/Jinja2/ESH[https://yadm.io/docs/templates]<br>(optional)
|-
! [https://github.com/justone/dotfiles dfm]
| {{AUR|dfm}} || Perl || repository-wise || {{Grey|No}}
|}
|}


Line 128: Line 167:


== User repositories ==
== User repositories ==
{{Note|This table is used as a reference/examples of dotfiles, if you are submitting your dotfiles to the table, please ensure they are kept clean, commented and up to date.}}
{{Warning|These dotfiles have not been verified by any of the Arch Linux staff, use at your own risk.}}


{| class="wikitable sortable" style="text-align:center"
{| class="wikitable sortable" style="text-align:center"
Line 133: Line 175:
|-
|-
! [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/Ambrevar/dotfiles Ambrevar]
! [https://gitlab.com/Ambrevar/dotfiles Ambrevar]
| Eshell || EXWM || Emacs || Emacs (Eshell) || Emacs TRAMP + dtach || EMMS || conky/dzen || mu4e || Circe || ||
| Eshell || [[EXWM]] || [[Emacs]] || Emacs (Eshell) || Emacs TRAMP + dtach || EMMS || [[Conky]]/[[Dzen]] || mu4e || Circe || ||
|-
|-
! [https://github.com/ask1234560/dotfiles_bspwm ananthu]
! [https://github.com/ask1234560/dotfiles_bspwm ananthu]
| zsh || bspwm || neovim || alacritty ||  || mpv || htop, polybar || neomutt || weechat || ranger ||
| [[Zsh]] || [[Bspwm]] || [[Neovim]] || [[Alacritty]] ||  || [[Mpv]] || [[Htop]], [[Polybar]] || [[Neomutt]] || [[WeeChat]] || [[Ranger]] ||
|-
|-
! [https://github.com/awalGarg/dotfiles awal]
! [https://github.com/awalGarg/dotfiles awal]
| fish || i3 || vim || st || tmux || || i3status || || The Lounge || ||
| [[Fish]] || [[i3]] || [[Vim]] || [[St]] || [[tmux]] || || i3status || || The Lounge || ||
|-
|-
! [https://github.com/ayekat/localdir ayekat]
! [https://github.com/ayekat/localdir ayekat]
| zsh || karuiwm || vim || rxvt-unicode || tmux || ncmpcpp/mpd || karuibar || mutt || irssi || ||
| [[Zsh]] || karuiwm || [[Vim]] || [[Rxvt-unicode]] || [[tmux]] || [[Ncmpcpp]]/[[Mpd]] || karuibar || [[Mutt]] || [[Irssi]] || ||
|-
|-
! [https://github.com/BachoSeven/dotfiles bachoseven]
! [https://github.com/BachoSeven/dotfiles bachoseven]
| zsh || [https://github.com/BachoSeven/dwm dwm] || neovim || [https://github.com/BachoSeven/st st] || || ncmpcpp || bottom || neomutt || weechat || lf ||
| [[Zsh]] || [[Dwm]] [https://github.com/BachoSeven/dwm source] || [[Neovim]] || [[St]] [https://github.com/BachoSeven/st source] || [[tmux]] || [[Ncmpcpp]] || bottom || [[Neomutt]] || [[WeeChat]] || [[Lf]] || [[newsboat]]
|-
|-
! [https://github.com/bamos/dotfiles bamos]
! [https://github.com/bamos/dotfiles bamos]
| zsh || i3/xmonad || vim/emacs || rxvt-unicode || tmux || mpv/cmus || conky/xmobar || mutt || ERC || ||
| [[Zsh]] || [[i3]]/[[xmonad]] || vim/emacs || rxvt-unicode || [[tmux]] || mpv/cmus || conky/xmobar || mutt || ERC || ||
|-
|-
! [https://github.com/benmezger/dotfiles benmezger]  
! [https://github.com/benmezger/dotfiles benmezger]  
| [https://github.com/benmezger/dotfiles zsh/bash] || [https://github.com/benmezger/dotfiles/tree/main/dot_config/i3 i3-gaps] || [https://github.com/benmezger/dotfiles/tree/main/dot_doom.d emacs] || [https://github.com/benmezger/dotfiles/blob/main/dot_Xresources rxvt-unicode]/[https://github.com/benmezger/dotfiles/blob/main/dot_config/alacritty/ alacritty] || [https://github.com/benmezger/dotfiles/blob/main/dot_tmux.conf tmux] || [https://github.com/benmezger/dotfiles/blob/main/dot_config/mopidy mopidy]/[https://github.com/benmezger/dotfiles/tree/main/dot_config/ncmpcpp/ ncmpcpp] || [https://github.com/benmezger/dotfiles/blob/main/dot_config/i3/status.toml.tmpl i3status-rs] || [https://github.com/benmezger/dotfiles/blob/main/dot_doom.d/ mu4e]/[https://github.com/benmezger/dotfiles/blob/main/dot_config/neomutt neomutt]/[https://github.com/benmezger/dotfiles/blob/main/dot_mbsyncrc.tmpl mbsync] || [https://github.com/benmezger/dotfiles/blob/main/dot_weechat/ weechat] || ||
| [https://github.com/benmezger/dotfiles zsh/bash] || [https://github.com/benmezger/dotfiles/tree/main/dot_config/i3 i3-gaps] || [https://github.com/benmezger/dotfiles/tree/main/dot_doom.d emacs] || [https://github.com/benmezger/dotfiles/blob/main/dot_Xresources rxvt-unicode]/[https://github.com/benmezger/dotfiles/blob/main/dot_config/alacritty/ alacritty] || [https://github.com/benmezger/dotfiles/blob/main/dot_tmux.conf tmux] || mopidy/ncmpcpp || [https://github.com/benmezger/dotfiles/blob/main/dot_config/i3/status.toml.tmpl i3status-rs] || [https://github.com/benmezger/dotfiles/blob/main/dot_doom.d/ mu4e]/[https://github.com/benmezger/dotfiles/blob/main/dot_config/neomutt neomutt]/[https://github.com/benmezger/dotfiles/blob/main/dot_mbsyncrc.tmpl mbsync] || [https://github.com/benmezger/dotfiles/blob/main/dot_weechat/ weechat] || ||
|-
|-
! [https://github.com/pbrisbin/dotfiles brisbin33]
! [https://github.com/pbrisbin/dotfiles brisbin33]
| [https://github.com/pbrisbin/oh-my-zsh zsh] || [https://github.com/pbrisbin/xmonad-config xmonad] || [https://github.com/pbrisbin/vim-config vim] || rxvt-unicode || screen || || dzen || [https://github.com/pbrisbin/mutt-config mutt] || [https://github.com/pbrisbin/irssi-config irssi] || ||
| [https://github.com/pbrisbin/oh-my-zsh zsh] || [https://github.com/pbrisbin/xmonad-config xmonad] || [https://github.com/pbrisbin/vim-config vim] || rxvt-unicode || [[GNU Screen]] || || dzen || [https://github.com/pbrisbin/mutt-config mutt] || [https://github.com/pbrisbin/irssi-config irssi] || ||
|-
|-
! [https://gitlab.com/BVollmerhaus/dotfiles BVollmerhaus]
! [https://gitlab.com/BVollmerhaus/dotfiles BVollmerhaus]
| [https://gitlab.com/BVollmerhaus/dotfiles/-/tree/master/config/fish fish] || [https://gitlab.com/BVollmerhaus/dotfiles/blob/master/config/i3/config i3-gaps] || [https://gitlab.com/BVollmerhaus/dotfiles/blob/master/config/kak/kakrc kakoune] || [https://gitlab.com/BVollmerhaus/dotfiles/-/blob/master/config/kitty/kitty.conf kitty] || || || [https://gitlab.com/BVollmerhaus/dotfiles/blob/master/config/polybar/config polybar] || || || [https://gitlab.com/BVollmerhaus/dotfiles/-/tree/master/config/ranger ranger] ||
| [https://gitlab.com/BVollmerhaus/dotfiles/-/tree/master/config/fish fish] || [https://gitlab.com/BVollmerhaus/dotfiles/blob/master/config/i3/config i3-gaps] || [https://gitlab.com/BVollmerhaus/dotfiles/blob/master/config/kak/kakrc kakoune] || [https://gitlab.com/BVollmerhaus/dotfiles/-/blob/master/config/kitty/kitty.conf kitty] || || || [https://gitlab.com/BVollmerhaus/dotfiles/blob/master/config/polybar/config polybar] || || || [https://gitlab.com/BVollmerhaus/dotfiles/-/tree/master/config/ranger ranger] ||
|-
! [https://github.com/christian-heusel/dotfiles christian-heusel]
| [[Zsh]] || [[i3]] || [[Neovim]] || [[st]] / [[terminator]] || byobu / [[tmux]] || || [[htop]] || [[neomutt]]/[[thunderbird]] || [[WeeChat]] || [[nemo]] / [[ranger]] ||
|-
|-
! [https://github.com/cinelli/dotfiles cinelli]
! [https://github.com/cinelli/dotfiles cinelli]
| zsh || dwm || vim || termite-git || || pianobar || htop || mutt-kz || weechat || ||
| [[Zsh]] || dwm || [[Vim]] || termite-git || || pianobar || htop || mutt-kz || weechat || ||
|-
|-
! [https://github.com/dikiaap/dotfiles dikiaap]
! [https://github.com/dikiaap/dotfiles dikiaap]
| zsh || i3-gaps || neovim || alacritty || tmux || || i3blocks || || || nnn ||
| [[Zsh]] || [[i3]]-gaps || neovim || alacritty || [[tmux]] || || i3blocks || || || nnn ||
|-
|-
! [https://github.com/Earnestly/dotfiles Earnestly]
! [https://github.com/Earnestly/dotfiles Earnestly]
| zsh || i3/orbment || vim/emacs || termite || tmux || mpd || conky || mutt || weechat || ||
| [[Zsh]] || [[i3]]/orbment || vim/emacs || termite || [[tmux]] || mpd || conky || mutt || weechat || ||
|-
|-
! [https://github.com/ErikBjare/dotfiles ErikBjare]
! [https://github.com/ErikBjare/dotfiles ErikBjare]
| zsh || xmonad/xfce4 || vim || terminator || tmux || || xfce4-panel || || weechat || ||
| [[Zsh]] || [[xmonad]]/[[Xfce4]] || [[Vim]] || terminator || [[tmux]] || || xfce4-panel || || weechat  
|-
! [https://github.com/erikw/dotfiles erikw]
| [[Zsh]]/[[Bash]] || DWM/macOS || NeoVim || urxvtc || [[tmux]] || mpd ||  || mutt || irssi || ||
|-
|-
! [https://github.com/falconindy/dotfiles falconindy]
! [https://github.com/falconindy/dotfiles falconindy]
| bash || i3 || vim || rxvt-unicode || || ncmpcpp || conky || mutt || || ||
| [[Bash]] || [[i3]] || [[Vim]] || rxvt-unicode || || ncmpcpp || conky || mutt || || ||
|-
|-
! [https://github.com/filiparag/dotfiles filiparag]
! [https://github.com/filiparag/dotfiles filiparag]
| fish || bspwm || vim || alacritty || tmux || mpv, [https://github.com/altdesktop/playerctl playerctl] || htop, polybar || [https://www.nongnu.org/mailnotify/ mail-notification] || || [https://wiki.lxde.org/en/PCManFM pcmanfm]{{Dead link|2022|09|17|status=404}} ||
| [[fish]] || bspwm || [[Vim]] || alacritty || [[tmux]] || mpv, [https://github.com/altdesktop/playerctl playerctl] || htop, polybar || [https://www.nongnu.org/mailnotify/ mail-notification] || || [[PCManFM]] ||
|-
! [https://github.com/Freed-Wu/Freed-Wu Freed-Wu]
| [[zsh]] || [[openbox]] || [[neovim]] || [[wezterm]] || [[tmux]] || [[cmus]] || bottom || [[neomutt]] || [[WeeChat]] || [[neovim]] || [[newsboat]]
|-
|-
! [https://git.sr.ht/~gardenapple/dotfiles gardenapple]
! [https://git.sr.ht/~gardenapple/dotfiles gardenapple]
| zsh || sway || neovim || kitty || || || htop || [https://aerc-mail.org/ aerc] || || ||
| [[Zsh]] ([https://git.sr.ht/~gardenapple/dotfiles/tree/main/item/stow/zsh/.zshrc fish-like]) || [[Hyprland]] || [[neovim]] || [[kitty]] || || || [[htop]] || [[aerc]] || || [[vifm]] || [[Newsboat]]
|-
|-
! [https://github.com/graysky2/configs/tree/master/dotfiles graysky]
! [https://github.com/graysky2/configs/tree/master/dotfiles graysky]
| zsh || xfce4 || vim || terminal || || ncmpcpp || custom || thunderbird || || ||
| [[Zsh]] || xfce4 || [[Vim]] || terminal || || ncmpcpp || custom || thunderbird || || ||
|-
|-
! [https://github.com/hugdru/dotfiles hugdru]
! [https://github.com/hugdru/dotfiles hugdru]
| zsh || awesome || neovim || rxvt-unicode || tmux || || || thunderbird || weechat || ||
| [[Zsh]] || awesome || neovim || rxvt-unicode || [[tmux]] || || || thunderbird || weechat || ||
|-
|-
! [https://github.com/insanum/dotfiles insanum]
! [https://github.com/insanum/dotfiles insanum]
| bash || herbstluftwm || vim || evilvte || tmux || || dzen || mutt-kz || || ||
| [[Bash]] || herbstluftwm || [[Vim]] || evilvte || [[tmux]] || || dzen || mutt-kz || || ||
|-
|-
! [https://github.com/isti115/dotfiles isti115]
! [https://github.com/isti115/dotfiles isti115]
Line 197: Line 248:
|| [https://github.com/Isti115/dotfiles/tree/master/.config/nvim neovim]
|| [https://github.com/Isti115/dotfiles/tree/master/.config/nvim neovim]
|| [https://github.com/Isti115/dotfiles/blob/master/.config/alacritty/alacritty.yml alacritty]
|| [https://github.com/Isti115/dotfiles/blob/master/.config/alacritty/alacritty.yml alacritty]
|| tmux
|| [[tmux]]
|| [https://github.com/Isti115/dotfiles/tree/master/.config/mpv mpv] / playerctl
|| [https://github.com/Isti115/dotfiles/tree/master/.config/mpv mpv] / playerctl
|| [https://github.com/Isti115/dotfiles/tree/master/.config/waybar waybar] / htop / ytop
|| [https://github.com/Isti115/dotfiles/tree/master/.config/waybar waybar] / htop / ytop
Line 206: Line 257:
|-
|-
! [https://hg.sr.ht/~jasonwryan/shiv jasonwryan]
! [https://hg.sr.ht/~jasonwryan/shiv jasonwryan]
| bash/zsh || dwm || vim || rxvt-unicode || tmux || ncmpcpp || custom || mutt || irssi || ||
| bash/zsh || dwm || [[Vim]] || rxvt-unicode || [[tmux]] || ncmpcpp || custom || mutt || irssi || ||
|-
|-
! [https://github.com/JDevlieghere/dotfiles/ jdevlieghere]
! [https://github.com/JDevlieghere/dotfiles/ jdevlieghere]
| zsh || xmonad || vim || terminal || tmux || || htop || mutt || weechat || ||
| [[Zsh]] || xmonad || [[Vim]] || terminal || [[tmux]] || || htop || mutt || weechat || ||
|-
|-
! [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/JonasDe/dotfiles JonasDe]{{Dead link|2022|09|17|status=404}}
| zsh || i3 || vim || rxvt-unicode || tmux || || || || || ||
|-
! [https://github.com/Jorengarenar/dotfiles Jorengarenar]
| [https://github.com/Jorengarenar/dotfiles/tree/master/shell sh]/[https://github.com/Jorengarenar/dotfiles/blob/master/bashrc Bash] || [https://github.com/Jorengarenar/dotfiles/tree/master/i3 i3] || [https://github.com/Jorengarenar/dotfiles/tree/master/vim Vim] || [https://github.com/Jorengarenar/dotfiles/blob/master/X11/Xresources xterm] || [https://github.com/Jorengarenar/dotfiles/blob/master/tmux.conf tmux]{{Dead link|2022|09|17|status=404}} || [https://github.com/Jorengarenar/dotfiles/tree/master/mpv mpv] || [https://github.com/Jorengarenar/dotfiles/blob/master/htoprc htop] || [https://github.com/Jorengarenar/dotfiles/tree/master/aerc aerc] || [https://github.com/Jorengarenar/dotfiles/tree/master/weechat WeeChat] || [https://github.com/Jorengarenar/dotfiles/blob/master/ranger.conf ranger] || QuiteRSS
|-
|-
! [https://github.com/markuszoppelt/dotfiles MarkusZoppelt]
! [https://github.com/markuszoppelt/dotfiles MarkusZoppelt]
| zsh || gnome || vim || terminal || tmux || ||  ||  || || ||
| [[Zsh]] || gnome || [[Neovim]] || [[Alacritty]] || [[tmux]] || ||  ||  || || ||
|-
|-
! [https://github.com/maximbaz/dotfiles maximbaz]
! [https://github.com/maximbaz/dotfiles maximbaz]
| zsh || sway || kakoune || kitty || || || waybar || neomutt || || nnn ||
| [[Zsh]] || sway || kakoune || kitty || || || waybar || neomutt || || nnn ||
|-
|-
! [https://git.mehalter.com/mehalter/dotfiles mehalter]
! [https://git.mehalter.com/mehalter/dotfiles mehalter]
| zsh || i3-gaps || neovim || termite || tmux || cmus || gotop || neomutt || weechat || ranger ||
| [[Zsh]] || [[i3]]-gaps || neovim || termite || [[tmux]] || cmus || gotop || neomutt || weechat || ranger ||
|-
|-
! [https://github.com/meskarune/.dotfiles meskarune]
! [https://github.com/meskarune/.dotfiles meskarune]
| bash || herbstluftwm || vim || rxvt-unicode || screen || || conky || || weechat || ||
| [[Bash]] || herbstluftwm || [[Vim]] || rxvt-unicode || [[GNU Screen]] || || conky || || weechat || ||
|-
|-
! [https://github.com/neersighted/dotfiles neersighted]
! [https://github.com/neersighted/dotfiles neersighted]
| fish || i3 || neovim || alacritty || tmux || ncmpcpp || || || || ||
| [[fish]] || [[i3]] || neovim || alacritty || [[tmux]] || ncmpcpp || || || || ||
|-
|-
! [https://github.com/nimaipatel/dotfiles nimaipatel]
! [https://github.com/nimaipatel/dotfiles nimaipatel]
| fish || awesome|| neovim || alacritty || || ncmpcpp || || || || ||
| [[fish]] || awesome|| neovim || alacritty || || ncmpcpp || || || || ||
|-
|-
! [https://github.com/oibind/dotfiles oibind]
! [https://github.com/oibind/dotfiles oibind]
| fish || awesome || neovim || st || tmux || || htop-vim || || weechat || lf ||
| [[fish]] || awesome || neovim || st || [[tmux]] || || htop-vim || || weechat || lf ||
|-
|-
! [https://github.com/ok100/configs OK100]
! [https://github.com/ok100/configs OK100]
| bash || dwm || vim || rxvt-unicode || || cmus || conky, dzen || mutt || weechat || ||
| [[Bash]] || dwm || [[Vim]] || rxvt-unicode || || cmus || conky, dzen || mutt || weechat || ||
|-
|-
! [https://github.com/orhun/dotfiles orhun]
! [https://github.com/orhun/dotfiles orhun]
| bash || i3-gaps || vsc || alacritty || || || i3status || || weechat || tere ||
| [[Bash]] || [[i3]]-gaps || neovim || alacritty || || || i3status || || weechat || tere ||
|-
|-
! [https://github.com/pablox-cl/dotfiles pablox-cl]
! [https://github.com/pablox-cl/dotfiles pablox-cl]
| zsh (zplug) || gnome3 || neovim || kitty || || || || || || ||
| zsh (zplug) || [[GNOME]] || neovim || kitty || || || || || || ||
|-
! [https://github.com/patri9ck/dotfiles patri9ck]
| [[Zsh]] || [[bspwm]] || [[Vim]] || [[kitty]] || || || || || || [[Thunar]] ||
|-
|-
! [https://gitlab.com/peterzuger/dotfiles peterzuger]
! [https://gitlab.com/peterzuger/dotfiles peterzuger]
| zsh || i3-gaps || emacs || rxvt-unicode || screen || moc || htop || || || ||
| [[Zsh]] || [[i3]]-gaps || emacs || rxvt-unicode || [[GNU Screen]] || moc || htop || || || ||
|-
! [https://gitlab.com/polyzen/dotfiles polyzen]
| [[Zsh]] || [[i3]] || Neovim || Alacritty || [[tmux]] || mpv || i3status,htop || himalaya || || ranger || Newsboat
|-
|-
! [https://github.com/potamides/dotfiles potamides]
! [https://github.com/potamides/dotfiles potamides]
| bash || awesome || neovim || termite || tmux || ncmpcpp || conky,htop || mutt || weechat || ranger ||
| [[Bash]] || awesome || neovim || termite || [[tmux]] || ncmpcpp || conky,htop || mutt || weechat || ranger ||
|-
|-
! [https://github.com/reisub0/dot reisub0]
! [https://github.com/reisub0/dot reisub0]
| fish || qtile || neovim || kitty || || mpd || conky || || || ||
| [[fish]] || qtile || neovim || kitty || || mpd || conky || || || ||
|-
! [https://git.sr.ht/~scrumplex/dotfiles Scrumplex]
| fish || sway || neovim || kitty || || ncmpcpp / pipewire || waybar || aerc || || ranger ||
|-
|-
! [https://github.com/sistematico/majestic sistematico]
! [https://github.com/sistematico/majestic sistematico]
| zsh/fish/bash || [https://github.com/Airblader/i3 i3-gaps] || vim/nano || termite || tmux || ncmpcpp || polybar || mutt || weechat || ||
| zsh/fish/bash || [https://github.com/Airblader/i3 i3-gaps] || vim/nano || termite || [[tmux]] || ncmpcpp || polybar || mutt || weechat || ||
|-
|-
! [https://git.sitilge.id.lv/sitilge/dotfiles sitilge]
! [https://git.sitilge.id.lv/sitilge/dotfiles sitilge]{{Dead link|2024|01|13|status=domain name not resolved}}
| zsh || sway || neovim || alacritty || || || htop || thunderbird || || ||
| [[Zsh]] || sway || neovim || alacritty || || || htop || thunderbird || || ||
|-
|-
! [https://git.sr.ht/~thecashewtrader/dotfiles thecashewtrader]
! [https://git.sr.ht/~thecashewtrader/dotfiles thecashewtrader]
Line 272: Line 320:
|-
|-
! [https://github.com/thiagowfx/.dotfiles thiagowfx]
! [https://github.com/thiagowfx/.dotfiles thiagowfx]
| bash/zsh || i3 || vim || alacritty || tmux || playerctl || i3status || || || ranger ||
| bash/zsh || [[i3]] || [[Vim]] || alacritty || [[tmux]] || playerctl || i3status || || || ranger ||
|-
! [https://codeberg.org/tplasdio/dotfiles tplasdio]
| [https://codeberg.org/tplasdio/bash-config bash (ble.sh)] || [https://codeberg.org/tplasdio/awesomewm-config awesome] || [https://codeberg.org/tplasdio/neovim-config neovim] || [https://codeberg.org/tplasdio/dotfiles/src/branch/main/.config/alacritty/alacritty.yml alacritty] || [https://codeberg.org/tplasdio/dotfiles/src/branch/main/.config/byobu/.tmux.conf tmux] || [https://codeberg.org/tplasdio/mpv-config mpv], mpvs || htop || neomutt || weechat || [https://codeberg.org/tplasdio/lf-config lf] ||  
|-
|-
! [https://github.com/tuurep/dotfiles tuurep]
! [https://github.com/tuurep/dotfiles tuurep]
| bash || openbox || neovim || alacritty || tmux || || polybar || || || ||
| [[Bash]] || openbox || neovim || alacritty || [[tmux]] || || polybar || || || ||
|-
|-
! [https://github.com/vodik/dotfiles vodik]
! [https://github.com/vodik/dotfiles vodik]
| zsh || xmonad || vim || termite-git || tmux || ncmpcpp || custom || mutt || weechat || ||
| [[Zsh]] || xmonad || [[Vim]] || termite-git || [[tmux]] || ncmpcpp || custom || mutt || weechat || ||
|-
|-
! [https://github.com/w0ng/dotfiles w0ng]
! [https://github.com/w0ng/dotfiles w0ng]
| zsh || dwm || vim || rxvt-unicode || tmux || ncmpcpp || custom || mutt || irssi || ||
| [[Zsh]] || dwm || [[Vim]] || rxvt-unicode || [[tmux]] || ncmpcpp || custom || mutt || irssi || ||
|-
|-
! [https://github.com/whitelynx/dotfiles whitelynx]
! [https://github.com/whitelynx/dotfiles whitelynx]
| fish || i3 || neovim || kitty || || || i3pystatus || || || ||
| [[fish]] || [[i3]] || neovim || kitty || || || i3pystatus || || || ||
|-
|-
! [https://git.sr.ht/~whynothugo/dotfiles whynothugo]
! [https://git.sr.ht/~whynothugo/dotfiles whynothugo]
| zsh || sway || neovim || alacritty || || mpv || waybar, top || neomutt || || nemo ||
| [[Zsh]] || sway || neovim || alacritty || || mpv || waybar, top || neomutt || || nemo ||
|-
|-
! [https://github.com/wryonik/dotfiles wryonik]
! [https://github.com/wryonik/dotfiles wryonik]
| zsh || i3-gaps-rounded || vim || terminator || || cmus || htop, i3blocks, gotop || || || ranger, nautilus ||
| [[Zsh]] || i3-gaps-rounded || [[Vim]] || terminator || || cmus || htop, i3blocks, gotop || || || ranger, nautilus ||
|-
|-
||
|}
|}



Latest revision as of 15:45, 24 February 2024

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 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 dotfiles this article also contains a list of dotfile repositories from Arch Linux users.

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 on Ask Hacker News: What do you use to manage your dotfiles?, which just takes three commands to set up:

$ git init --bare ~/.dotfiles
$ alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
$ dotfiles config status.showUntrackedFiles no
Note: Usually one's dotfiles all have default permissions, but if specific file permissions for some files are a must, another approach should be used, as git does not store permissions (Discussion)

Your dotfiles can be replicated on a new system like:

$ git clone --bare <git-repo-url> $HOME/.dotfiles
$ alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
$ dotfiles checkout
$ dotfiles config --local status.showUntrackedFiles no
  • In case of already having some stock dotfiles which might get overwritten, you'll encounter something similar to the following the error:
$ dotfiles checkout
error: The following untracked working tree files would be overwritten by checkout:
    .bashrc
    .gitignore
Please move or remove them before you can switch branches.
Aborting
You could use $ dotfiles checkout -f which will rewrite the already existing files, or in a safer approach take a backup of all the files with the following script and then using checkout:
mkdir -p .dotfiles-backup && \
dotfiles checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \
xargs -I{} mv {} .dotfiles-backup/{}

You can then manage your dotfiles with the created alias. If you are using Bash and would like bash completion for this alias, simply install bash-complete-aliasAUR, then add the alias and the following line to your ~/.bashrc.

$ complete -F _complete_alias dotfiles

Another way to get completion in bash is adding the following to your ~/.bashrc (taken from [1]):

source /usr/share/bash-completion/completions/git
__git_complete dotfiles __git_main
Tip: To avoid accidentally committing confidential information, see Git#Filtering confidential information.

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.[2]

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
dotbot dotbotAUR Python configuration file No
chezmoi chezmoi Go directory-based Go templates
dot-templater dot-templater-gitAUR Rust directory-based custom syntax
toml-bombadil toml-bombadil Rust configuration file tera
dotdrop dotdropAUR Python configuration file Jinja2
dotfiles dotfilesAUR Python No No
Dots dots-managerAUR Python directory-based custom append points
dotter dotter-rsAUR Rust configuration file Handlebars
dt-cli dt-cliAUR Rust configuration file Handlebars
GNU Stow stow Perl directory-based[3] No
Mackup mackupAUR Python automatic per application No
mir.qualia mir.qualiaAUR Python No custom blocks
rcm rcmAUR Shell directory-based (by host or tag) No
yas-bdsm Shell directory-based 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
dotbare dotbareAUR Shell (fzf) repository-wise No
dotgit dotgitAUR Python filename-based No
homeshick homeshick-gitAUR Bash repository-wise No
homesick Ruby repository-wise No
Pearl pearl-gitAUR Python repository-wise No
vcsh vcsh Shell repository-wise No
yadm(1) yadm Shell filename-based
(by class/OS/distro/hostname/user)[4]
Built-in templates/Jinja2/ESH[5]
(optional)
dfm dfmAUR Perl repository-wise No
  1. Supports encryption of confidential files with GPG or OpenSSL. [6]

User repositories

Note: This table is used as a reference/examples of dotfiles, if you are submitting your dotfiles to the table, please ensure they are kept clean, commented and up to date.
Warning: These dotfiles have not been verified by any of the Arch Linux staff, use at your own risk.
Author Shell (Shell framework) WM / DE Editor Terminal Multiplexer Audio Monitor Mail IRC File Manager RSS reader
alfunx Zsh Awesome Vim Kitty tmux Ncmpcpp/Mpd Htop/lain Thunderbird
Ambrevar Eshell EXWM Emacs Emacs (Eshell) Emacs TRAMP + dtach EMMS Conky/Dzen mu4e Circe
ananthu Zsh Bspwm Neovim Alacritty Mpv Htop, Polybar Neomutt WeeChat Ranger
awal Fish i3 Vim St tmux i3status The Lounge
ayekat Zsh karuiwm Vim Rxvt-unicode tmux Ncmpcpp/Mpd karuibar Mutt Irssi
bachoseven Zsh Dwm source Neovim St source tmux Ncmpcpp bottom Neomutt WeeChat Lf newsboat
bamos Zsh i3/xmonad vim/emacs rxvt-unicode tmux mpv/cmus conky/xmobar mutt ERC
benmezger zsh/bash i3-gaps emacs rxvt-unicode/alacritty tmux mopidy/ncmpcpp i3status-rs mu4e/neomutt/mbsync weechat
brisbin33 zsh xmonad vim rxvt-unicode GNU Screen dzen mutt irssi
BVollmerhaus fish i3-gaps kakoune kitty polybar ranger
christian-heusel Zsh i3 Neovim st / terminator byobu / tmux htop neomutt/thunderbird WeeChat nemo / ranger
cinelli Zsh dwm Vim termite-git pianobar htop mutt-kz weechat
dikiaap Zsh i3-gaps neovim alacritty tmux i3blocks nnn
Earnestly Zsh i3/orbment vim/emacs termite tmux mpd conky mutt weechat
ErikBjare Zsh xmonad/Xfce4 Vim terminator tmux xfce4-panel weechat
erikw Zsh/Bash DWM/macOS NeoVim urxvtc tmux mpd mutt irssi
falconindy Bash i3 Vim rxvt-unicode ncmpcpp conky mutt
filiparag fish bspwm Vim alacritty tmux mpv, playerctl htop, polybar mail-notification PCManFM
Freed-Wu zsh openbox neovim wezterm tmux cmus bottom neomutt WeeChat neovim newsboat
gardenapple Zsh (fish-like) Hyprland neovim kitty htop aerc vifm Newsboat
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
isti115 pwsh sway neovim alacritty tmux mpv / playerctl waybar / htop / ytop ranger
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
MarkusZoppelt Zsh gnome Neovim Alacritty tmux
maximbaz Zsh sway kakoune kitty waybar neomutt nnn
mehalter Zsh i3-gaps neovim termite tmux cmus gotop neomutt weechat ranger
meskarune Bash herbstluftwm Vim rxvt-unicode GNU Screen conky weechat
neersighted fish i3 neovim alacritty tmux ncmpcpp
nimaipatel fish awesome neovim alacritty ncmpcpp
oibind fish awesome neovim st tmux htop-vim weechat lf
OK100 Bash dwm Vim rxvt-unicode cmus conky, dzen mutt weechat
orhun Bash i3-gaps neovim alacritty i3status weechat tere
pablox-cl zsh (zplug) GNOME neovim kitty
patri9ck Zsh bspwm Vim kitty Thunar
peterzuger Zsh i3-gaps emacs rxvt-unicode GNU Screen moc htop
polyzen Zsh i3 Neovim Alacritty tmux mpv i3status,htop himalaya ranger Newsboat
potamides Bash awesome neovim termite tmux ncmpcpp conky,htop mutt weechat ranger
reisub0 fish qtile neovim kitty mpd conky
sistematico zsh/fish/bash i3-gaps vim/nano termite tmux ncmpcpp polybar mutt weechat
sitilge[dead link 2024-01-13 ⓘ] Zsh sway neovim alacritty htop thunderbird
thecashewtrader Eshell EXWM Emacs Emacs (VTerm) Emacs Bongo htop mu4e ERC Dired Elfeed
thiagowfx bash/zsh i3 Vim alacritty tmux playerctl i3status ranger
tplasdio bash (ble.sh) awesome neovim alacritty tmux mpv, mpvs htop neomutt weechat lf
tuurep Bash openbox neovim alacritty tmux polybar
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
whynothugo Zsh sway neovim alacritty mpv waybar, top neomutt nemo
wryonik Zsh i3-gaps-rounded Vim terminator cmus htop, i3blocks, gotop ranger, nautilus

See also