]> git.rmz.io Git - dotfiles.git/blob - Makefile
weechat: delete beep.pl (its been integrated upstream)
[dotfiles.git] / Makefile
1 APATH := $(realpath .)
2
3 FILES := bin
4 DOTFILES := goobookrc msmtp* profile tmux.conf weechat Xresources
5 CONFIGFILES := compton.conf 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 task: ~/.config
14 ln -sfT $(APATH)/taskrc ~/.config/taskrc
15
16 git: ~/.config
17 ln -sfT $(APATH)/git ~/.config/git
18 ln -sfT $(APATH)/tig ~/.config/tig
19 .PHONY: git
20
21 vim: ~/.config
22 ln -sfT $(APATH)/vim ~/.config/vim
23 mkdir -p ~/.local/share/vim
24 git clone https://github.com/gmarik/vundle ~/.local/share/vim/vundle
25 .PHONY: vim
26
27 mutt: ~/.config
28 ln -sfT $(APATH)/mutt ~/.config/mutt
29 .PHONY: mutt
30
31 gdb:
32 mkdir ~/.local/share/gdb
33 ln -sfT $(APATH)/gdbinit ~/.gdbinit
34 ln -sfT $(APATH)/cgdb ~/.cgdb
35 .PHONY: gdb
36
37 awesome: ~/.config
38 ln -sfT $(APATH)/awesome ~/.config/awesome
39 .PHONY: awesome
40
41 qutebrowser: ~/.config
42 ln -sfT $(APATH)/qutebrowser ~/.config/qutebrowser
43 mkdir -p ~/downloads
44 .PHONY: qutebrowser
45
46 mpd: systemd
47 ln -sfT $(APATH)/mpd ~/.config/mpd
48 mkdir -p ~/.local/share/mpd/playlists
49 systemctl --user enable mpd
50 systemctl --user start mpd
51 .PHONY: mpd
52
53 ncmpcpp: ~/.config
54 ln -sfT $(APATH)/ncmpcpp ~/.config/ncmpcpp
55 mkdir -p ~/.local/share/mpd/lyrics
56 .PHONY: ncmpcpp
57
58 systemd: ~/.config
59 ln -sfT $(APATH)/$@ ~/.config/$@
60 .PHONY: systemd
61
62 gnupg: systemd
63 ln -sfT $(APATH)/$@ ~/.config/$@
64 systemctl --user enable gpg-agent.socket gpg-agent-extra.socket gpg-agent-browser.socket dirmngr.socket
65 systemctl --user start gpg-agent.socket gpg-agent-extra.socket gpg-agent-browser.socket dirmngr.socket
66 .PHONY: gnupg
67
68 zsh: ~/.config
69 ln -sfT $(APATH)/zshrc ~/.zshrc
70 ln -sfT $(APATH)/zprofile ~/.zprofile
71 ln -sfT $(APATH)/zshenv ~/.zshenv
72 ln -sfT $(APATH)/zsh ~/.config/zsh
73 ln -sfT $(APATH)/aliases ~/.config/aliases
74 mkdir -p ~/.cache/zsh
75 .PHONY: zsh
76
77 xprofile:
78 ln -sfT $(APATH)/xprofile ~/.xprofile
79 .PHONY: xprofile
80
81 dircolors: ~/.config
82 ln -sfT $(APATH)/dircolors ~/.config/dircolors
83 .PHONY: dircolors
84
85 urxvt: ~/.config
86 ln -sfT $(APATH)/urxvt ~/.config/urxvt
87 .PHONY: urxvt
88
89 $(FILES):
90 @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
91 if [[ -d $@ ]]; then \
92 cp -r ~/$@/* $@; \
93 else \
94 cp -r ~/$@ $@; \
95 fi; \
96 rm -r ~/$@; \
97 fi;
98 ln -sfT $(APATH)/$@ ~/$@
99
100 $(DOTFILES):
101 @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
102 if [[ -d .$@ ]]; then \
103 cp -r ~/.$@/* $@; \
104 else \
105 cp -r ~/.$@ $@; \
106 fi; \
107 rm -r ~/.$@; \
108 fi;
109 ln -sfT $(APATH)/$@ ~/.$@
110
111 $(CONFIGFILES): ~/.config
112 @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
113 if [[ -d .config/$@ ]]; then \
114 cp -r ~/.config/$@/* $@; \
115 else \
116 cp -r ~/.config/$@ $@; \
117 fi; \
118 rm -r ~/.config/$@; \
119 fi;
120 ln -sfT $(APATH)/$@ ~/.config/$@