]> git.rmz.io Git - dotfiles.git/blob - Makefile
Makefile: add vim, awesome and qutebrowser recipes
[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 systemd 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:
29 ln -sfT $(APATH)/mpd ~/.config/mpd
30 mkdir -p ~/.local/share/mpd/playlists
31 .PHONY: mpd
32
33 ncmpcpp:
34 ln -sfT $(APATH)/ncmpcpp ~/.config/ncmpcpp
35 mkdir -p ~/.local/share/mpd/lyrics
36 .PHONY: ncmpcpp
37
38 zsh:
39 ln -sfT $(APATH)/zshrc ~/.zshrc
40 ln -sfT $(APATH)/zprofile ~/.zprofile
41 ln -sfT $(APATH)/zshenv ~/.zshenv
42 ln -sfT $(APATH)/zsh ~/.config/zsh
43 mkdir -p ~/.cache/zsh
44 .PHONY: zsh
45
46 xprofile:
47 ln -sfT $(APATH)/xprofile ~/.xprofile
48 .PHONY: xprofile
49
50 dircolors:
51 ln -sfT $(APATH)/dircolors ~/.config/dircolors
52 .PHONY: dircolors
53
54 urxvt:
55 ln -sfT $(APATH)/urxvt ~/.config/urxvt
56 .PHONY: urxvt
57
58 $(FILES):
59 @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
60 if [[ -d $@ ]]; then \
61 cp -r ~/$@/* $@; \
62 else \
63 cp -r ~/$@ $@; \
64 fi; \
65 rm -r ~/$@; \
66 fi;
67 ln -sfT $(APATH)/$@ ~/$@
68
69 $(DOTFILES):
70 @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
71 if [[ -d .$@ ]]; then \
72 cp -r ~/.$@/* $@; \
73 else \
74 cp -r ~/.$@ $@; \
75 fi; \
76 rm -r ~/.$@; \
77 fi;
78 ln -sfT $(APATH)/$@ ~/.$@
79
80 $(CONFIGFILES): ~/.config
81 @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
82 if [[ -d .config/$@ ]]; then \
83 cp -r ~/.config/$@/* $@; \
84 else \
85 cp -r ~/.config/$@ $@; \
86 fi; \
87 rm -r ~/.config/$@; \
88 fi;
89 ln -sfT $(APATH)/$@ ~/.config/$@