]> git.rmz.io Git - dotfiles.git/blobdiff - Makefile
Makefile: enable mpd when installing config
[dotfiles.git] / Makefile
index 1c5af2e8ce39292d22c4af7f15fae91b5ff8bc46..8a2c883db9effd8e206dbc0f57ce795efad8e2bb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,65 @@
 APATH := $(realpath .)
-RPATH := $(subst $(wildcard ~/),,$(APATH))
 
 FILES := bin
-DOTFILES := bash* flexget vim*
+DOTFILES := conky* goobookrc msmtp* mutt profile tmux.conf weechat Xresources
+CONFIGFILES := aliases compton.conf git gnupg mpv offlineimap ranger retroarch xbindkeys xkb
 
-.PHONY: install $(FILES) $(DOTFILES)
-install: $(FILES) $(DOTFILES)
+.PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES)
+install: $(FILES) $(DOTFILES) $(CONFIGFILES)
+
+~/.config:
+       mkdir -p ~/.config
+
+vim:
+       ln -sfT $(APATH)/vim ~/.config/vim
+       mkdir -p ~/.local/share/vim
+       git clone https://github.com/gmarik/vundle ~/.local/share/vim/vundle
+.PHONY: vim
+
+awesome: ~/.config
+       ln -sfT $(APATH)/awesome ~/.config/awesome
+.PHONY: awesome
+
+qutebrowser: ~/.config
+       ln -sfT $(APATH)/qutebrowser ~/.config/qutebrowser
+       mkdir -p ~/downloads
+.PHONY: qutebrowser
+
+mpd: systemd
+       ln -sfT $(APATH)/mpd ~/.config/mpd
+       mkdir -p ~/.local/share/mpd/playlists
+       systemctl --user enable mpd
+       systemctl --user start mpd
+.PHONY: mpd
+
+ncmpcpp:
+       ln -sfT $(APATH)/ncmpcpp ~/.config/ncmpcpp
+       mkdir -p ~/.local/share/mpd/lyrics
+.PHONY: ncmpcpp
+
+systemd:
+       ln -sfT $(APATH)/$@ ~/.config/$@
+.PHONY: systemd
+
+zsh:
+       ln -sfT $(APATH)/zshrc ~/.zshrc
+       ln -sfT $(APATH)/zprofile ~/.zprofile
+       ln -sfT $(APATH)/zshenv ~/.zshenv
+       ln -sfT $(APATH)/zsh ~/.config/zsh
+       mkdir -p ~/.cache/zsh
+.PHONY: zsh
+
+xprofile:
+       ln -sfT $(APATH)/xprofile ~/.xprofile
+.PHONY: xprofile
+
+dircolors:
+       ln -sfT $(APATH)/dircolors ~/.config/dircolors
+.PHONY: dircolors
+
+urxvt:
+       ln -sfT $(APATH)/urxvt ~/.config/urxvt
+.PHONY: urxvt
 
 $(FILES): 
        @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
@@ -16,7 +70,7 @@ $(FILES):
            fi; \
            rm -r ~/$@; \
        fi; 
-       ln -sf $(RPATH)/$@ ~/$@
+       ln -sfT $(APATH)/$@ ~/$@
 
 $(DOTFILES): 
        @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
@@ -27,4 +81,15 @@ $(DOTFILES):
            fi; \
            rm -r ~/.$@; \
        fi; 
-       ln -sf $(RPATH)/$@ ~/.$@
+       ln -sfT $(APATH)/$@ ~/.$@
+
+$(CONFIGFILES):  ~/.config
+       @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
+           if [[ -d .config/$@ ]]; then \
+             cp -r ~/.config/$@/* $@; \
+           else \
+             cp -r ~/.config/$@ $@; \
+           fi; \
+           rm -r ~/.config/$@; \
+       fi; 
+       ln -sfT $(APATH)/$@ ~/.config/$@