]> git.rmz.io Git - dotfiles.git/blob - Makefile
git: use msmtp to send emails
[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 ln -sfT $(APATH)/gdbinit ~/.gdbinit
33 ln -sfT $(APATH)/cgdb ~/.cgdb
34 .PHONY: gdb
35
36 awesome: ~/.config
37 ln -sfT $(APATH)/awesome ~/.config/awesome
38 .PHONY: awesome
39
40 qutebrowser: ~/.config
41 ln -sfT $(APATH)/qutebrowser ~/.config/qutebrowser
42 mkdir -p ~/downloads
43 .PHONY: qutebrowser
44
45 mpd: systemd
46 ln -sfT $(APATH)/mpd ~/.config/mpd
47 mkdir -p ~/.local/share/mpd/playlists
48 systemctl --user enable mpd
49 systemctl --user start mpd
50 .PHONY: mpd
51
52 ncmpcpp: ~/.config
53 ln -sfT $(APATH)/ncmpcpp ~/.config/ncmpcpp
54 mkdir -p ~/.local/share/mpd/lyrics
55 .PHONY: ncmpcpp
56
57 systemd: ~/.config
58 ln -sfT $(APATH)/$@ ~/.config/$@
59 .PHONY: systemd
60
61 gnupg: systemd
62 ln -sfT $(APATH)/$@ ~/.config/$@
63 systemctl --user enable gpg-agent.socket gpg-agent-extra.socket gpg-agent-browser.socket dirmngr.socket
64 systemctl --user start gpg-agent.socket gpg-agent-extra.socket gpg-agent-browser.socket dirmngr.socket
65 .PHONY: gnupg
66
67 zsh: ~/.config
68 ln -sfT $(APATH)/zshrc ~/.zshrc
69 ln -sfT $(APATH)/zprofile ~/.zprofile
70 ln -sfT $(APATH)/zshenv ~/.zshenv
71 ln -sfT $(APATH)/zsh ~/.config/zsh
72 ln -sfT $(APATH)/aliases ~/.config/aliases
73 mkdir -p ~/.cache/zsh
74 .PHONY: zsh
75
76 xprofile:
77 ln -sfT $(APATH)/xprofile ~/.xprofile
78 .PHONY: xprofile
79
80 dircolors: ~/.config
81 ln -sfT $(APATH)/dircolors ~/.config/dircolors
82 .PHONY: dircolors
83
84 urxvt: ~/.config
85 ln -sfT $(APATH)/urxvt ~/.config/urxvt
86 .PHONY: urxvt
87
88 $(FILES):
89 @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
90 if [[ -d $@ ]]; then \
91 cp -r ~/$@/* $@; \
92 else \
93 cp -r ~/$@ $@; \
94 fi; \
95 rm -r ~/$@; \
96 fi;
97 ln -sfT $(APATH)/$@ ~/$@
98
99 $(DOTFILES):
100 @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
101 if [[ -d .$@ ]]; then \
102 cp -r ~/.$@/* $@; \
103 else \
104 cp -r ~/.$@ $@; \
105 fi; \
106 rm -r ~/.$@; \
107 fi;
108 ln -sfT $(APATH)/$@ ~/.$@
109
110 $(CONFIGFILES): ~/.config
111 @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
112 if [[ -d .config/$@ ]]; then \
113 cp -r ~/.config/$@/* $@; \
114 else \
115 cp -r ~/.config/$@ $@; \
116 fi; \
117 rm -r ~/.config/$@; \
118 fi;
119 ln -sfT $(APATH)/$@ ~/.config/$@