]> git.rmz.io Git - dotfiles.git/blob - Makefile
vim: add vim-gtest plugin
[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 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 gnupg: systemd
45 ln -sfT $(APATH)/$@ ~/.config/$@
46 systemctl --user enable gpg-agent.socket gpg-agent-extra.socket gpg-agent-browser.socket dirmngr.socket
47 systemctl --user start gpg-agent.socket gpg-agent-extra.socket gpg-agent-browser.socket dirmngr.socket
48 .PHONY: gnupg
49
50 zsh:
51 ln -sfT $(APATH)/zshrc ~/.zshrc
52 ln -sfT $(APATH)/zprofile ~/.zprofile
53 ln -sfT $(APATH)/zshenv ~/.zshenv
54 ln -sfT $(APATH)/zsh ~/.config/zsh
55 mkdir -p ~/.cache/zsh
56 .PHONY: zsh
57
58 xprofile:
59 ln -sfT $(APATH)/xprofile ~/.xprofile
60 .PHONY: xprofile
61
62 dircolors:
63 ln -sfT $(APATH)/dircolors ~/.config/dircolors
64 .PHONY: dircolors
65
66 urxvt:
67 ln -sfT $(APATH)/urxvt ~/.config/urxvt
68 .PHONY: urxvt
69
70 $(FILES):
71 @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
72 if [[ -d $@ ]]; then \
73 cp -r ~/$@/* $@; \
74 else \
75 cp -r ~/$@ $@; \
76 fi; \
77 rm -r ~/$@; \
78 fi;
79 ln -sfT $(APATH)/$@ ~/$@
80
81 $(DOTFILES):
82 @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
83 if [[ -d .$@ ]]; then \
84 cp -r ~/.$@/* $@; \
85 else \
86 cp -r ~/.$@ $@; \
87 fi; \
88 rm -r ~/.$@; \
89 fi;
90 ln -sfT $(APATH)/$@ ~/.$@
91
92 $(CONFIGFILES): ~/.config
93 @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
94 if [[ -d .config/$@ ]]; then \
95 cp -r ~/.config/$@/* $@; \
96 else \
97 cp -r ~/.config/$@ $@; \
98 fi; \
99 rm -r ~/.config/$@; \
100 fi;
101 ln -sfT $(APATH)/$@ ~/.config/$@