Difference between revisions of "Dotfiles"

From ArchWiki
Jump to: navigation, search
m (Repositories)
m (Added my dotfiles repo, along with the programs I use.)
 
(92 intermediate revisions by 35 users not shown)
Line 1: Line 1:
 
{{Lowercase title}}
 
{{Lowercase title}}
 
[[Category:Dotfiles]]
 
[[Category:Dotfiles]]
{{Article summary start|Summary}}
+
[[ja:ドットファイル]]
{{Article summary text|This article collects links to many user repositories containing custom configuration files.}}
+
{{Related articles start}}
{{Article summary end}}
+
{{Related|XDG Base Directory support}}
 +
{{Related articles end}}
 +
This article collects user repositories with custom configuration files, commonly known as ''dotfiles''.
  
'''dotfiles''' are configuration files
+
== Version control ==
  
== Managing dotfiles with git ==
+
Managing dotfiles with version control software such as [[Git]] helps to keep track of changes, share with others, and synchronize dotfiles across various hosts.
A popular way of keeping a centralized copy of your dotfiles is hosting them on github.
+
 
 +
=== Using gitignore ===
 +
 
 +
Keeping a [https://git-scm.com/blog/2010/04/11/environment.html git directory] inside the home folder allows to directly keep track of changes. It is recommended to selectively add file contents to the index with {{man|1|git-add}}.
 +
 
 +
To prevent untracked files (appearing in commits and removed by {{man|1|git-clean}}), first exclude all files with {{man|5|gitignore}}:
 +
 
 +
{{hc|~/.git/info/exclude|
 +
*}}
 +
 
 +
Then use {{ic|git add -f}}, for example:
 +
 
 +
$ git add -f ~/.config/*
 +
 
 +
And commit the changes with {{man|1|git-commit}}:
 +
 
 +
$ git commit -a
 +
 
 +
=== Other tools ===
 +
* {{App|etckeeper|Intended to version-control system-wide configuration in /etc. Works by keeping track of permissions and modes which version-control software often ignores. Can use various SCM systems as a backend. Hooks can auto-commit changes to the repository before a system-upgrade; for pacman, these hooks currently have to be triggered manually.|http://joeyh.name/code/etckeeper/|{{Pkg|etckeeper}}}}
 +
* {{App|GNU Stow|Can be used to symlink dotfiles from a repository into the $HOME tree. See [http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html] for more information.|http://www.gnu.org/software/stow/|{{Pkg|stow}}}}
 +
* {{App|Pearl|Package manager for dotfiles, plugins, programs and any form of code accessible via git. Allow to easily share and sync packages across systems and have them ready to work out of the box.|https://github.com/pearl-core/pearl|{{AUR|pearl-git}}}}
 +
* {{App|vcsh|Allows separating differents modules (e.g., Emacs config vs. zsh config) into individual repositories which can be maintained separately, as opposed to keeping all dotfiles in a single repository. Works with git only.|https://github.com/RichiH/vcsh|{{AUR|vcsh}}}}
 +
* {{App|yadm|Manages files across systems using a single Git repository. Provides a way to use alternate files on a specific OS or host. Supplies a method of encrypting confidential data so it can safely be stored in your repository.|https://github.com/TheLocehiliosan/yadm|{{AUR|yadm}}}}
 +
* {{App|homeshick|git dotfiles synchronizer written in bash|https://github.com/andsens/homeshick|{{AUR|homeshick-git}}}}
 +
* {{App|dotbot|A minimalist dotfiles manager that can be installed as a git submodule of your dotfiles repository.|https://github.com/anishathalye/dotbot|}}
 +
 
 +
=== Maintaining dotfiles across multiple machines ===
 +
 
 +
{{Style|This and the section below need a rewrite}}
 +
 
 +
One way of maintaining dotfiles across various machines across various hosts while still allowing for per-host customizations, is 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; as shared configuration is added to the master-branch, the per-machine branches are then rebased on top of the updated master.
 +
 
 +
Another approach is to put machine-specific configuration into specially commented blocks and to use [https://pypi.python.org/pypi/mir.qualia/ qualia] to automatically uncomment them on each machine. This approach requires less manual work and doesn't cause merge conflicts.
 +
 
 +
=== Confidential information ===
 +
 
 +
Occasionally, software may keep plain-text passwords in configuration files, as opposed to hooking into a keyring. In these cases, git clean-filters may be handy to avoid accidentally commiting confidential information. E. g., the following .gitattributes file assigns a filter to the file “some-dotfile”:
 +
 
 +
<pre>
 +
# .gitattributes
 +
some-dotfile filter=remove-pass
 +
</pre>
 +
 
 +
Whenever the file “some-dotfile” is checked into git, git will invoke the filter “remove-pass” on the file before checking it in. The filter must be defined in .git/config, e. g.:
 +
 
 +
<pre>
 +
[filter "remove-pass"]
 +
clean = "sed -e 's/^password=.*/#password=TODO/'"
 +
</pre>
  
 
== Repositories ==
 
== Repositories ==
  
{| class="wikitable sortable" border="1" cellpadding="1" cellspacing="0"
+
{| class="wikitable sortable"
 
! scope="col" | Author
 
! scope="col" | Author
 
! scope="col" | Shell
 
! scope="col" | Shell
Line 23: Line 74:
 
! scope="col" | Mail
 
! scope="col" | Mail
 
! scope="col" | IRC
 
! scope="col" | IRC
 +
|-
 +
! [https://bitbucket.org/ambrevar/dotfiles Ambrevar]
 +
| zsh || awesome || emacs || rxvt-unicode ||  || cmus || htop/vicious || mutt ||
 +
|-
 +
! [https://github.com/awalGarg/dotfiles awal]
 +
| fish || i3 || vim || sakura || tmux || || i3status || || The Lounge
 +
|-
 +
! [https://github.com/bamos/dotfiles bamos]
 +
| zsh || i3/xmonad || vim/emacs || rxvt-unicode || tmux || mpv/cmus || conky/xmobar || mutt || ERC
 
|-
 
|-
 
! [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 || screen || || dzen || [https://github.com/pbrisbin/mutt-config mutt] || [https://github.com/pbrisbin/irssi-config irssi]
 +
|-
 +
! [https://github.com/bstaletic bstaletic]
 +
| [https://github.com/bstaletic/dotfiles/blob/master/.zshrc zsh] || [https://github.com/bstaletic/dotfiles/blob/master/dwm/config.h dwm] || [https://github.com/bstaletic/dotfiles/blob/master/.vimrc vim]{{Dead link|2016|11|19}} || terminator || screen || [https://github.com/bstaletic/blob/master/.ncmpcpp/config ncmpcpp]{{Dead link|2016|11|19}} || [https://github.com/bstaletic/dotfiles/blob/master/.conkyrc conky] || ||
 
|-
 
|-
 
! [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/drkh5h/dotfiles drkhsh]
 +
| zsh || dwm || vim || st || screen || cmus || conky || mutt || weechat
 +
|-
 +
! [https://github.com/Earnestly/dotfiles Earnestly]
 +
| zsh || i3/orbment || vim/emacs || termite || tmux || mpd || conky || mutt || weechat
 +
|-
 +
! [https://github.com/ErikBjare/dotfiles ErikBjare]
 +
| zsh || xmonad/xfce4 || vim || terminator || tmux || || xfce4-panel || || weechat
 
|-
 
|-
 
! [https://github.com/falconindy/dotfiles falconindy]
 
! [https://github.com/falconindy/dotfiles falconindy]
Line 36: Line 108:
 
| zsh || xfce4 || vim || terminal || || ncmpcpp || custom || thunderbird ||
 
| zsh || xfce4 || vim || terminal || || ncmpcpp || custom || thunderbird ||
 
|-
 
|-
! [http://code.gtmanfred.com/cgit/dotfiles.git/tree/?h=tower gtmanfred]
+
! [http://code.gtmanfred.com/cgit/dotfiles.git/tree/?h=tower gtmanfred]{{Dead link|2016|11|19}}
 
| zsh || dwm || vim || termite-git || tmux || mpd || conky || mutt || weechat
 
| zsh || dwm || vim || termite-git || tmux || mpd || conky || mutt || weechat
 
|-
 
|-
! [https://bitbucket.org/jasonwryan/eeepc/src jasonwryan]
+
! [https://github.com/hugdru/dotfiles hugdru]
| bash || dwm || vim || rxvt-unicode || tmux || ncmpcpp || bash script || mutt || irrsi
+
| zsh || awesome || neovim || rxvt-unicode || tmux || || || thunderbird || weechat
 
|-
 
|-
! [http://github.com/meskarune/.dotfiles meskarune]
+
! [https://github.com/insanum/dotfiles insanum]
 +
| bash || herbstluftwm || vim || evilvte || tmux || || dzen || mutt-kz ||
 +
|-
 +
! [https://github.com/izmntuk/archiso/tree/testing/configs/alter/airootfs/ izmntuk]
 +
| zsh || xfce4 || vim || rxvt-unicode/yaft || tmux || cmus || xfce4-panel ||  || irssi
 +
|-
 +
! [https://bitbucket.org/jasonwryan/shiv/src jasonwryan]
 +
| bash/zsh || dwm || vim || rxvt-unicode || tmux || ncmpcpp || custom || mutt || irrsi
 +
|-
 +
! [https://github.com/JDevlieghere/dotfiles/ jdevlieghere]
 +
| zsh || xmonad || vim || terminal || tmux || || htop || mutt || weechat
 +
|-
 +
! [https://github.com/jelly/Dotfiles jelly]
 +
| zsh || i3 || vim || termite || tmux || ncmpcpp || || mutt-kz-git || weechat
 +
|-
 +
! [https://github.com/meskarune/.dotfiles meskarune]
 
| bash || herbstluftwm || vim || rxvt-unicode || screen || || conky || || weechat
 
| bash || herbstluftwm || vim || rxvt-unicode || screen || || conky || || weechat
 
|-
 
|-
Line 50: Line 137:
 
! [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/pid1/dotfiles pid1]
 +
| zsh || dwm || neovim || st || tmux || || custom || mutt || weechat
 +
|-
 +
! [https://github.com/polyzen/dotfiles polyzen]
 +
| zsh || i3 || vim || termite || tmux || || i3status || || weechat
 +
|-
 +
! [https://bitbucket.org/swalladge/dotfiles swalladge]{{Dead link|2016|11|19}}
 +
| zsh/bash || i3 || neovim/vim || termite || tmux || cmus || i3pystatus || mutt ||
 +
|-
 +
! [https://github.com/thiagowfx/dotfiles thiagowfx]
 +
| bash/zsh || i3 || vim/emacs || rxvt-unicode || || ncmpcpp || i3blocks || ||
 
|-
 
|-
 
! [http://hg.subtle.de/dotfiles/file unexist]
 
! [http://hg.subtle.de/dotfiles/file unexist]
 
| zsh || subtle || vim || rxvt-unicode || || ncmpcpp || || mutt || irssi
 
| zsh || subtle || vim || rxvt-unicode || || ncmpcpp || || mutt || irssi
 
|-
 
|-
! [http://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
 
|-
 
|-
! [http://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
 
|-
 
|-
! [http://github.com/Wintervenom/Configuration Wintervenom]
+
! [https://github.com/Wintervenom/Configuration Wintervenom]
| bash || herbstluftwm ||vim || rxvt-unicode || screen ||mpd ([https://github.com/Wintervenom/Scripts/tree/master/audio/mpd mpc-utils]) || [https://github.com/Wintervenom/Scripts/blob/master/wm/herbstluftwm/hlwm-dzen2https://github.com/wolfcore/dotfiles hlwm-dzen2] || mutt || weechat
+
| bash || herbstluftwm ||vim || rxvt-unicode || screen ||mpd ([https://github.com/Wintervenom/Scripts/tree/master/audio/mpd mpc-utils]) || [https://github.com/Wintervenom/Scripts/blob/master/wm/herbstluftwm/hlwm-dzen2 hlwm-dzen2] || mutt || weechat
 
|-
 
|-
! [http://github.com/wolfcore/dotfiles wolfcore]  
+
! [https://github.com/wolfcore/dotfiles wolfcore]  
 
| bash || dwm || vim || rxvt-unicode || tmux || cmus || custom || || weechat
 
| bash || dwm || vim || rxvt-unicode || tmux || cmus || custom || || weechat
 
|-
 
|-
! [https://github.com/xfausto/dotfiles xfausto]
+
! [https://github.com/xfausto/dotfiles xfausto]{{Dead link|2016|11|19}}
 
| zsh || dwm || vim || st || || ncmpcpp || conky || ||
 
| zsh || dwm || vim || st || || ncmpcpp || conky || ||
 
|-
 
|-
Line 72: Line 171:
 
| [https://github.com/zendeavor/config-stuff/tree/sandbag/zsh zsh] || [https://github.com/zendeavor/config-stuff/blob/sandbag/i3/config i3] || [https://github.com/zendeavor/dotvim/tree/sandbag vim] || [https://github.com/zendeavor/config-stuff/blob/sandbag/X11/Xresources#L14 rxvt-unicode] || [https://github.com/zendeavor/config-stuff/tree/sandbag/tmux tmux] || [https://github.com/zendeavor/config-stuff/blob/sandbag/ncmpcpp/config ncmpcpp] || [https://github.com/zendeavor/config-stuff/blob/sandbag/i3/i3status.conf i3status] || || [https://github.com/zendeavor/config-stuff/tree/kiwi/weechat weechat]
 
| [https://github.com/zendeavor/config-stuff/tree/sandbag/zsh zsh] || [https://github.com/zendeavor/config-stuff/blob/sandbag/i3/config i3] || [https://github.com/zendeavor/dotvim/tree/sandbag vim] || [https://github.com/zendeavor/config-stuff/blob/sandbag/X11/Xresources#L14 rxvt-unicode] || [https://github.com/zendeavor/config-stuff/tree/sandbag/tmux tmux] || [https://github.com/zendeavor/config-stuff/blob/sandbag/ncmpcpp/config ncmpcpp] || [https://github.com/zendeavor/config-stuff/blob/sandbag/i3/i3status.conf i3status] || || [https://github.com/zendeavor/config-stuff/tree/kiwi/weechat weechat]
 
|-
 
|-
 +
! [https://github.com/0n-s/dotfiles dillebidum]
 +
| mksh/bash/dash || i3-gaps || vim || rxvt-unicode || tmux || ncmpcpp/mpv || htop/i3blocks || mutt || irssi
 +
|-
 +
 
|}
 
|}
  
 
== See also ==
 
== See also ==
* [http://mywiki.wooledge.org/DotFiles Dotfiles - Greg's Wiki]
+
 
* [http://www.haskell.org/haskellwiki/Xmonad/Config_archive XMonad Config Archive]
+
* [[gregswiki:DotFiles]]
 +
* [http://wiki.haskell.org/Xmonad/Config_archive XMonad Config Archive]
 
* [http://dotshare.it dotshare.it]
 
* [http://dotshare.it dotshare.it]
* [http://dotfiles.org dotfiles.org] - [http://techie.cat/all-contents-from-dotfiles-org/ Copy of contents]
+
* [https://dotfiles.github.io/ dotfiles.github.io]

Latest revision as of 20:45, 23 November 2016

Related articles

This article collects user repositories with custom configuration files, commonly known as dotfiles.

Version control

Managing dotfiles with version control software such as Git helps to keep track of changes, share with others, and synchronize dotfiles across various hosts.

Using gitignore

Keeping a git directory inside the home folder allows to directly keep track of changes. It is recommended to selectively add file contents to the index with git-add(1).

To prevent untracked files (appearing in commits and removed by git-clean(1)), first exclude all files with gitignore(5):

~/.git/info/exclude
*

Then use git add -f, for example:

$ git add -f ~/.config/*

And commit the changes with git-commit(1):

$ git commit -a

Other tools

  • etckeeper — Intended to version-control system-wide configuration in /etc. Works by keeping track of permissions and modes which version-control software often ignores. Can use various SCM systems as a backend. Hooks can auto-commit changes to the repository before a system-upgrade; for pacman, these hooks currently have to be triggered manually.
http://joeyh.name/code/etckeeper/ || etckeeper
  • GNU Stow — Can be used to symlink dotfiles from a repository into the $HOME tree. See [1] for more information.
http://www.gnu.org/software/stow/ || stow
  • Pearl — Package manager for dotfiles, plugins, programs and any form of code accessible via git. Allow to easily share and sync packages across systems and have them ready to work out of the box.
https://github.com/pearl-core/pearl || pearl-gitAUR
  • vcsh — Allows separating differents modules (e.g., Emacs config vs. zsh config) into individual repositories which can be maintained separately, as opposed to keeping all dotfiles in a single repository. Works with git only.
https://github.com/RichiH/vcsh || vcshAUR
  • yadm — Manages files across systems using a single Git repository. Provides a way to use alternate files on a specific OS or host. Supplies a method of encrypting confidential data so it can safely be stored in your repository.
https://github.com/TheLocehiliosan/yadm || yadmAUR
  • homeshick — git dotfiles synchronizer written in bash
https://github.com/andsens/homeshick || homeshick-gitAUR
  • dotbot — A minimalist dotfiles manager that can be installed as a git submodule of your dotfiles repository.
https://github.com/anishathalye/dotbot ||

Maintaining dotfiles across multiple machines

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements.Tango-edit-clear.png

Reason: This and the section below need a rewrite (Discuss in Talk:Dotfiles#)

One way of maintaining dotfiles across various machines across various hosts while still allowing for per-host customizations, is 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; as shared configuration is added to the master-branch, the per-machine branches are then rebased on top of the updated master.

Another approach is to put machine-specific configuration into specially commented blocks and to use qualia to automatically uncomment them on each machine. This approach requires less manual work and doesn't cause merge conflicts.

Confidential information

Occasionally, software may keep plain-text passwords in configuration files, as opposed to hooking into a keyring. In these cases, git clean-filters may be handy to avoid accidentally commiting confidential information. E. g., the following .gitattributes file assigns a filter to the file “some-dotfile”:

# .gitattributes
some-dotfile filter=remove-pass

Whenever the file “some-dotfile” is checked into git, git will invoke the filter “remove-pass” on the file before checking it in. The filter must be defined in .git/config, e. g.:

[filter "remove-pass"]
clean = "sed -e 's/^password=.*/#password=TODO/'"

Repositories

Author Shell WM / DE Editor Terminal Multiplexer Audio Monitor Mail IRC
Ambrevar zsh awesome emacs rxvt-unicode cmus htop/vicious mutt
awal fish i3 vim sakura tmux i3status The Lounge
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
bstaletic zsh dwm vim[dead link 2016-11-19] terminator screen ncmpcpp[dead link 2016-11-19] conky
cinelli zsh dwm vim termite-git pianobar htop mutt-kz weechat
drkhsh zsh dwm vim st screen cmus conky mutt weechat
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
gtmanfred[dead link 2016-11-19] zsh dwm vim termite-git tmux mpd conky mutt weechat
hugdru zsh awesome neovim rxvt-unicode tmux thunderbird weechat
insanum bash herbstluftwm vim evilvte tmux dzen mutt-kz
izmntuk zsh xfce4 vim rxvt-unicode/yaft tmux cmus xfce4-panel irssi
jasonwryan bash/zsh dwm vim rxvt-unicode tmux ncmpcpp custom mutt irrsi
jdevlieghere zsh xmonad vim terminal tmux htop mutt weechat
jelly zsh i3 vim termite tmux ncmpcpp mutt-kz-git weechat
meskarune bash herbstluftwm vim rxvt-unicode screen conky weechat
neersighted zsh i3 vim rxvt-unicode tmux ncmpcpp htop mutt irssi
OK100 bash dwm vim rxvt-unicode cmus conky, dzen mutt weechat
pid1 zsh dwm neovim st tmux custom mutt weechat
polyzen zsh i3 vim termite tmux i3status weechat
swalladge[dead link 2016-11-19] zsh/bash i3 neovim/vim termite tmux cmus i3pystatus mutt
thiagowfx bash/zsh i3 vim/emacs rxvt-unicode ncmpcpp i3blocks
unexist zsh subtle vim rxvt-unicode ncmpcpp mutt irssi
vodik zsh xmonad vim termite-git tmux ncmpcpp custom mutt weechat
w0ng zsh dwm vim rxvt-unicode tmux ncmpcpp custom mutt irssi
Wintervenom bash herbstluftwm vim rxvt-unicode screen mpd (mpc-utils) hlwm-dzen2 mutt weechat
wolfcore bash dwm vim rxvt-unicode tmux cmus custom weechat
xfausto[dead link 2016-11-19] zsh dwm vim st ncmpcpp conky
zendeavor zsh i3 vim rxvt-unicode tmux ncmpcpp i3status weechat
dillebidum mksh/bash/dash i3-gaps vim rxvt-unicode tmux ncmpcpp/mpv htop/i3blocks mutt irssi

See also