-
-
Notifications
You must be signed in to change notification settings - Fork 33
Stow
stow
is a software package installation manage, to make simple, it just create, for each files present in a directory, a symbolic link in another directory (like your homedir).
Start by clone my repository to play with stow:
$ cd
$ git clone https://github.com/szorfein/dotfiles
$ cd dotfiles
So, look the content of a theme:
$ cd theme-madness
tree -a | head -n 7
I just show a little part:
.
├── .colors
│ └── color
├── .config
│ ├── cava
│ │ └── config
│ ├── compton.conf
stow
will create a symbolic link of each files here in another directory, for example, if you want test in a temporary directory:
$ mkdir ~/tmp
$ cd dotfiles
$ stow theme-madness -t ~/tmp
$ cd ~/tmp
$ tree -al | head -n 7
stow
have just recreate the same content in the tmp
dir.
.
├── .colors -> ../dotfiles/theme-madness/.colors
│ └── color
├── .config -> ../dotfiles/theme-madness/.config
│ ├── cava
│ │ └── config
│ ├── compton.conf
To clear this intro, use stow -D
:
$ cd dotfiles
$ stow -D theme-madness -t ~/tmp
So, the next step is to install a theme in your homedir, e.g: with the theme-madness
.
$ cd dotfiles
$ stow theme-madness -t ~
On a fresh install, it should pass, but if you have alrealy some contents, the next come :)
If a file alrealy exist, stow
will show a WARNING!
, but no panic, this is easyly solvable:
$ stow theme-madness -t ~
WARNING! stowing config would cause conflicts:
* existing target is neither a link nor a directory: .Xresources
* existing target is neither a link nor a directory: .xinitrc
All operations aborted.
Here, you have to backup the files .Xresources
and .xinitrc
$ mv ~/.Xresources ~/.Xresources-BACKUP
$ mv ~/.xinitrc ~/.xinitrc-BACKUP
And relaunch stow
to see if it's right.
$ stow theme-madness
Next, after few days with the theme-madness
, you want try the theme-empire
.
You have just to remove the older theme:
$ cd dotfiles
$ stow -D theme-madness
$ stow theme-empire
And restart X. It's all.
When you update this repository with git pull
, the symlink of the new files are not automatically created so, you have to use stow -R
for this:
$ cd dotfiles
$ git pull
$ stow -R image -t ~
$ stow -R theme-universe -t ~
To purge all the symlinks, just use stow -D <directory>
massively :)