]> git.rmz.io Git - dotfiles.git/blob - Makefile
Makefile: enable mpd when installing config
[dotfiles.git] / Makefile
1 APATH := $(realpath .)
2
3 FILES := bin
4 DOTFILES := conky* goobookrc msmtp* mutt profile tmux.conf weechat Xresources
5 CONFIGFILES := aliases compton.conf git gnupg mpv offlineimap ranger retroarch xbindkeys xkb
6
7 .PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES)
8 install: $(FILES) $(DOTFILES) $(CONFIGFILES)
9
10 ~/.config:
11 mkdir -p ~/.config
12
13 vim:
14 ln -sfT $(APATH)/vim ~/.config/vim
15 mkdir -p ~/.local/share/vim
16 git clone https://github.com/gmarik/vundle ~/.local/share/vim/vundle
17 .PHONY: vim
18
19 awesome: ~/.config
20 ln -sfT $(APATH)/awesome ~/.config/awesome
21 .PHONY: awesome
22
23 qutebrowser: ~/.config
24 ln -sfT $(APATH)/qutebrowser ~/.config/qutebrowser
25 mkdir -p ~/downloads
26 .PHONY: qutebrowser
27
28 mpd: systemd
29 ln -sfT $(APATH)/mpd ~/.config/mpd
30 mkdir -p ~/.local/share/mpd/playlists
31 systemctl --user enable mpd
32 systemctl --user start mpd
33 .PHONY: mpd
34
35 ncmpcpp:
36 ln -sfT $(APATH)/ncmpcpp ~/.config/ncmpcpp
37 mkdir -p ~/.local/share/mpd/lyrics
38 .PHONY: ncmpcpp
39
40 systemd:
41 ln -sfT $(APATH)/$@ ~/.config/$@
42 .PHONY: systemd
43
44 zsh:
45 ln -sfT $(APATH)/zshrc ~/.zshrc
46 ln -sfT $(APATH)/zprofile ~/.zprofile
47 ln -sfT $(APATH)/zshenv ~/.zshenv
48 ln -sfT $(APATH)/zsh ~/.config/zsh
49 mkdir -p ~/.cache/zsh
50 .PHONY: zsh
51
52 xprofile:
53 ln -sfT $(APATH)/xprofile ~/.xprofile
54 .PHONY: xprofile
55
56 dircolors:
57 ln -sfT $(APATH)/dircolors ~/.config/dircolors
58 .PHONY: dircolors
59
60 urxvt:
61 ln -sfT $(APATH)/urxvt ~/.config/urxvt
62 .PHONY: urxvt
63
64 $(FILES):
65 @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
66 if [[ -d $@ ]]; then \
67 cp -r ~/$@/* $@; \
68 else \
69 cp -r ~/$@ $@; \
70 fi; \
71 rm -r ~/$@; \
72 fi;
73 ln -sfT $(APATH)/$@ ~/$@
74
75 $(DOTFILES):
76 @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
77 if [[ -d .$@ ]]; then \
78 cp -r ~/.$@/* $@; \
79 else \
80 cp -r ~/.$@ $@; \
81 fi; \
82 rm -r ~/.$@; \
83 fi;
84 ln -sfT $(APATH)/$@ ~/.$@
85
86 $(CONFIGFILES): ~/.config
87 @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
88 if [[ -d .config/$@ ]]; then \
89 cp -r ~/.config/$@/* $@; \
90 else \
91 cp -r ~/.config/$@ $@; \
92 fi; \
93 rm -r ~/.config/$@; \
94 fi;
95 ln -sfT $(APATH)/$@ ~/.config/$@