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