managing dotfiles with gnu stow - GNU/Linux

Users browsing this thread: 1 Guest(s)
xero
Long time nixers
it's been said of every console user: "you are your dotfiles".

i manage mine with gnu stow, a free, portable, lightweight symlink farm manager. this allows me to keep a versioned directory of all my config files that are virtually linked into place via a single command. this makes sharing these files among many users (root) and computers super simple. and does not clutter your home directory with version control files.

installing
stow is available for all gnu/linux and most other unix like distributions via your package manager.

Code:
sudo pacman -S stow
Code:
sudo apt-get install stow
Code:
brew install stow

how it works
by default the stow command will create symlinks for files in the parent directory of where you execute the command. so my dotfiles setup assumes this repo is located in the root of your home directory ~/dotfiles. and all stow commands should be executed in that directory. otherwise you'll need to use the -d flag with the repo directory location.

the rest of this article will directly corrilate to my dotfiles, they're available here: http://git.io/.files

to install most of my configs you execute the stow command with the folder name as the only argument.

to install herbstluft theme use the command:

Code:
stow herbstluftwm

this will symlink files to ~/.config/herbstluftwm and various other places. (note the folder structure on the herbstluftwm directory)

but you can override the default behavior and symlink files to another location with the -t (target) argument flag.

to install the ryu-login you need to execute the command:

Code:
stow -t / ryu-login

this will symlink the file to /etc/issue.

note: stow can only create a symlink if a config file does not already exist. if a default file was created upon program installation you must delete it first before you can install a new one with stow. this does not apply to directories, only files.

tl;dr
navigate to your home directory

Code:
cd ~

clone the repo:

Code:
git clone https://github.com/xero/dotfiles.git

enter the dotfiles directory

Code:
cd dotfiles

install the zsh settings

Code:
stow zsh

install the root zsh settings

Code:
sudo stow zsh-root -t /root

install awesomewm theme

Code:
stow awesome

uninstall awesome theme

Code:
stow -D awesome

install herbstluftwm

Code:
stow herbstluftwm

i hope this gives you some ideas for managing your own dotfiles!


Messages In This Thread
managing dotfiles with gnu stow - by xero - 05-08-2014, 12:57 PM
RE: managing dotfiles with gnu stow - by yrmt - 05-08-2014, 01:42 PM
RE: managing dotfiles with gnu stow - by z3bra - 05-08-2014, 04:26 PM
RE: managing dotfiles with gnu stow - by dami0 - 05-08-2014, 05:11 PM
RE: managing dotfiles with gnu stow - by z3bra - 05-08-2014, 07:09 PM
RE: managing dotfiles with gnu stow - by xero - 06-08-2014, 11:37 AM
RE: managing dotfiles with gnu stow - by dami0 - 06-08-2014, 07:29 PM
RE: managing dotfiles with gnu stow - by AlexTes - 03-12-2016, 05:19 PM
RE: managing dotfiles with gnu stow - by Wildefyr - 08-06-2019, 10:13 AM
RE: managing dotfiles with gnu stow - by xero - 17-06-2019, 06:04 PM
RE: managing dotfiles with gnu stow - by piotr - 28-06-2019, 01:27 PM
RE: managing dotfiles with gnu stow - by Halfwit - 29-06-2019, 10:35 PM
RE: managing dotfiles with gnu stow - by venam - 14-09-2020, 02:30 AM
RE: managing dotfiles with gnu stow - by jkl - 14-09-2020, 07:25 AM
RE: managing dotfiles with gnu stow - by z3bra - 14-09-2020, 08:15 AM
RE: managing dotfiles with gnu stow - by mcol - 14-09-2020, 11:06 AM
RE: managing dotfiles with gnu stow - by s0kx - 14-09-2020, 12:59 PM
RE: managing dotfiles with gnu stow - by seninha - 15-09-2020, 09:59 PM
RE: managing dotfiles with gnu stow - by ckester - 15-09-2020, 11:30 PM
RE: managing dotfiles with gnu stow - by neeasade - 16-09-2020, 01:07 PM
RE: managing dotfiles with gnu stow - by mcol - 16-09-2020, 04:07 PM