-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (59 loc) · 1.86 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
OS := $(shell uname -s)
ifeq ($(OS),Darwin)
MACOS := true
endif
ifeq ($(OS),Linux)
LINUX := true
endif
install: install-xmonad install-bashrc install-vim install-ideavim install-readline install-tmux
XMONAD_HOME := ~/.config/xmonad
install-xmonad:
ifdef LINUX
$(info installing xmonad config)
mkdir -p $(XMONAD_HOME)
rm $(XMONAD_HOME)/*.hs ~/.xmobarrc ~/.Xresources
ln -s `pwd`/xmonad/bin $(XMONAD_HOME)/bin
ln -s `pwd`/xmonad/xmonad.hs $(XMONAD_HOME)
ln -s `pwd`/xmonad/xmobarrc.hs ~/.xmobarrc
ln -s `pwd`/xmonad/Xresources ~/.Xresources
xrdb -merge ~/.Xresources
endif
install-bashrc:
ifdef LINUX
$(info installing linux bash config)
`pwd`/bash/bin/install
endif
vundle_home := ~/.vim/bundle/Vundle.vim
install-vim:
$(info installing vim settings)
ifeq "" "$(wildcard $(vundle_home))"
git clone https://github.com/VundleVim/Vundle.vim.git $(vundle_home)
endif
ln -sf `pwd`/vim/vimrc ~/.vimrc
vim +PluginInstall +qall
install-ideavim:
$(info installing idea vim plugin config)
rm -f ~/.ideavimrc
ln -s `pwd`/ideavimrc ~/.ideavimrc
install-powerline-fonts:
$(info installing powerline fonts)
git clone https://github.com/powerline/fonts.git /tmp/powerline-fonts
/tmp/powerline-fonts/install.sh
install-readline:
$(info installing readline config)
rm -f ~/.inputrc
ln -s `pwd`/readline/inputrc ~/.inputrc
install-tmux:
$(info installing tmux config)
rm -f ~/.tmux.conf
ln -s `pwd`/tmux/tmux.conf ~/.tmux.conf
DOOM_CONFIG := ~/.doom.d/config.el
LOAD_EXPORT_DEFS := (after! (org-roam) (load! "mc-export-defs"))
install-emacs:
ifeq "" "$(wildcard $(DOOM_CONFIG))"
$(error no $(DOOM_CONFIG) present, can't add custom emacs functions)
endif
$(info installing emacs config)
rm -f ~/.doom.d/mc-export-defs.el
ln -s `pwd`/emacs/mc-export-defs.el ~/.doom.d/mc-export-defs.el
grep -qxF '$(LOAD_EXPORT_DEFS)' $(DOOM_CONFIG) || echo '$(LOAD_EXPORT_DEFS)' >> $(DOOM_CONFIG)