]> git.rmz.io Git - dotfiles.git/blob - Makefile
vim: pprint cpp snippet
[dotfiles.git] / Makefile
1 APATH := $(realpath .)
2
3 FILES := bin
4 DOTFILES := 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 gdb:
20 ln -sfT $(APATH)/gdbinit ~/.gdbinit
21 ln -sfT $(APATH)/cgdb ~/.cgdb
22 .PHONY: gdb
23
24 awesome: ~/.config
25 ln -sfT $(APATH)/awesome ~/.config/awesome
26 .PHONY: awesome
27
28 qutebrowser: ~/.config
29 ln -sfT $(APATH)/qutebrowser ~/.config/qutebrowser
30 mkdir -p ~/downloads
31 .PHONY: qutebrowser
32
33 mpd: systemd
34 ln -sfT $(APATH)/mpd ~/.config/mpd
35 mkdir -p ~/.local/share/mpd/playlists
36 systemctl --user enable mpd
37 systemctl --user start mpd
38 .PHONY: mpd
39
40 ncmpcpp:
41 ln -sfT $(APATH)/ncmpcpp ~/.config/ncmpcpp
42 mkdir -p ~/.local/share/mpd/lyrics
43 .PHONY: ncmpcpp
44
45 systemd:
46 ln -sfT $(APATH)/$@ ~/.config/$@
47 .PHONY: systemd
48
49 gnupg: systemd
50 ln -sfT $(APATH)/$@ ~/.config/$@
51 systemctl --user enable gpg-agent.socket gpg-agent-extra.socket gpg-agent-browser.socket dirmngr.socket
52 systemctl --user start gpg-agent.socket gpg-agent-extra.socket gpg-agent-browser.socket dirmngr.socket
53 .PHONY: gnupg
54
55 zsh:
56 ln -sfT $(APATH)/zshrc ~/.zshrc
57 ln -sfT $(APATH)/zprofile ~/.zprofile
58 ln -sfT $(APATH)/zshenv ~/.zshenv
59 ln -sfT $(APATH)/zsh ~/.config/zsh
60 mkdir -p ~/.cache/zsh
61 .PHONY: zsh
62
63 xprofile:
64 ln -sfT $(APATH)/xprofile ~/.xprofile
65 .PHONY: xprofile
66
67 dircolors:
68 ln -sfT $(APATH)/dircolors ~/.config/dircolors
69 .PHONY: dircolors
70
71 urxvt:
72 ln -sfT $(APATH)/urxvt ~/.config/urxvt
73 .PHONY: urxvt
74
75 $(FILES):
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 $(DOTFILES):
87 @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
88 if [[ -d .$@ ]]; then \
89 cp -r ~/.$@/* $@; \
90 else \
91 cp -r ~/.$@ $@; \
92 fi; \
93 rm -r ~/.$@; \
94 fi;
95 ln -sfT $(APATH)/$@ ~/.$@
96
97 $(CONFIGFILES): ~/.config
98 @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
99 if [[ -d .config/$@ ]]; then \
100 cp -r ~/.config/$@/* $@; \
101 else \
102 cp -r ~/.config/$@ $@; \
103 fi; \
104 rm -r ~/.config/$@; \
105 fi;
106 ln -sfT $(APATH)/$@ ~/.config/$@