summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2016-04-09 17:19:49 +0100
committerUrbain Vaes <urbain@vaes.uk>2016-04-09 17:19:49 +0100
commitc8fb4a598c6067944d4d4ea3c13856f28167f4e7 (patch)
tree4cf5e67f506604457c9513f69218b95f401ac074 /bin
parent28969c5dee61c2b6108965be7dec7cab38247063 (diff)
Use environment variable in dotfiles
Diffstat (limited to 'bin')
-rw-r--r--bin/.dotmap35
-rwxr-xr-xbin/dot2
2 files changed, 36 insertions, 1 deletions
diff --git a/bin/.dotmap b/bin/.dotmap
new file mode 100644
index 0000000..f3a6946
--- /dev/null
+++ b/bin/.dotmap
@@ -0,0 +1,35 @@
+declare -A dotmap
+dotmap[$HOME/.bashrc]=$HOME/dotfiles/bashrc
+dotmap[$HOME/bin]=$HOME/dotfiles/bin
+dotmap[$HOME/.config/dunst/dunstrc]=$HOME/dotfiles/dunstrc
+dotmap[$HOME/.config/i3/config]=$HOME/dotfiles/i3/config
+dotmap[$HOME/.config/i3status/config]=$HOME/dotfiles/i3/i3status.conf
+dotmap[$HOME/.config/newsbeuter]=$HOME/dotfiles/newsbeuter
+dotmap[$HOME/.config/nvim]=$HOME/dotfiles/vim
+dotmap[$HOME/.config/qutebrowser]=$HOME/dotfiles/qutebrowser
+dotmap[$HOME/.config/zathura/zathurarc]=$HOME/dotfiles/zathurarc
+dotmap[$HOME/.gitconfig]=$HOME/dotfiles/gitconfig
+dotmap[$HOME/.git_template]=$HOME/dotfiles/git_template
+dotmap[$HOME/.inputrc]=$HOME/dotfiles/inputrc
+dotmap[$HOME/.latexmkrc]=$HOME/dotfiles/latexmkrc
+dotmap[$HOME/.ledgerrc]=$HOME/dotfiles/ledgerrc
+dotmap[$HOME/.local/share/qutebrowser/userscripts]=$HOME/dotfiles/qutebrowser/userscripts
+dotmap[$HOME/.mbsyncrc]=$HOME/dotfiles/mbsyncrc
+dotmap[$HOME/.mrconfig]=$HOME/dotfiles/mr/mrconfig
+dotmap[$HOME/.mrtrust]=$HOME/dotfiles/mr/mrtrust
+dotmap[$HOME/.msmtprc]=$HOME/dotfiles/msmtprc
+dotmap[$HOME/.mutt]=$HOME/dotfiles/mutt
+dotmap[$HOME/.ncmpcpp]=$HOME/dotfiles/ncmpcpp
+dotmap[$HOME/.password-store]=$HOME/dotfiles/passwords
+dotmap[$HOME/.surfraw.bookmarks]=$HOME/dotfiles/surfraw.bookmarks
+dotmap[$HOME/.tmux.conf]=$HOME/dotfiles/tmux.conf
+dotmap[$HOME/.urxvt]=$HOME/dotfiles/urxvt
+dotmap[$HOME/.vifm]=$HOME/dotfiles/vifm
+dotmap[$HOME/.vim]=$HOME/dotfiles/vim
+dotmap[$HOME/.vimperatorrc]=$HOME/dotfiles/vimperatorrc
+dotmap[$HOME/.vimrc]=$HOME/dotfiles/vim/vimrc
+dotmap[$HOME/.xinitrc]=$HOME/dotfiles/xinitrc
+dotmap[$HOME/.Xresources]=$HOME/dotfiles/Xresources
+dotmap[$HOME/.zgen]=$HOME/dotfiles/zsh/zgen
+dotmap[$HOME/.zsh]=$HOME/dotfiles/zsh
+dotmap[$HOME/.zshrc]=$HOME/dotfiles/zsh/zshrc
diff --git a/bin/dot b/bin/dot
index 0049e9c..acb0e64 100755
--- a/bin/dot
+++ b/bin/dot
@@ -40,7 +40,7 @@ save()
{
echo "declare -A dotmap" > .dotmap
get_links | while read link; do
- echo "dotmap[$link]=$(realpath -q $link)" >> .dotmap
+ echo "dotmap[$link]=$(readlink -f -q $link)" | sed "s#$HOME#"'$HOME#g' >> .dotmap
done
sort .dotmap -o .dotmap
}