-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
223 lines (192 loc) · 5.73 KB
/
Makefile
File metadata and controls
223 lines (192 loc) · 5.73 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
### Makefile
### Automates the setup of a new environment using GNU make.
###
### Author: Nathan Campos <nathan@innoveworkshop.com>
# Important directories.
DOTFILESDIR = $(HOME)/dotfiles
FONTSDIR = /usr/share/fonts
# Important commands.
LN = ln -sfn
RM = rm -f
MKDIR = mkdir -p
GIT = git
CURL = curl
WGET = wget
CD = cd
# Text snippets.
TXTDONE = 'Done.'
.PHONY: all shellconf bashconf fishconf tmuxconf editors vim emacs nano devenv gdbconf gitconf rconf octaveconf xserver xinit xresources xscreensaverconf consoleapps mutt screen termemus terminator urxvt fonts windowmanagers i3winman i3status
all: xserver windowmanagers termemus consoleapps devenv editors shellconf fonts
#
# Shells
#
shellconf: bashconf fishconf tmuxconf
# Bash
bashconf: $(DOTFILESDIR)/bash/bash_profile $(DOTFILESDIR)/bash/bash_aliases $(DOTFILESDIR)/bash/bashrc
@echo "Setting up Bash..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/bash/bash_profile $(HOME)/.bash_profile
$(LN) $(DOTFILESDIR)/bash/bash_aliases $(HOME)/.bash_aliases
$(LN) $(DOTFILESDIR)/bash/bashrc $(HOME)/.bashrc
$(LN) $(DOTFILESDIR)/dircolors $(HOME)/.dircolors
@echo " Sourcing the new configuration..."
bash $(HOME)/.bash_profile
@echo $(TXTDONE)
# Fish
fishconf: $(DOTFILESDIR)/fish
@echo "Setting up Fish..."
@echo " Symlinking dotfiles..."
$(RM) -r $(HOME)/.config/fish
$(LN) $(DOTFILESDIR)/fish/ $(HOME)/.config/fish
@echo $(TXTDONE)
# tmux
tmuxconf: $(DOTFILESDIR)/tmux.conf
@echo "Setting up tmux..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/tmux.conf $(HOME)/.tmux.conf
@echo $(TXTDONE)
#
# Editors
#
editors: vim emacs nano
# Vim
vim: $(DOTFILESDIR)/vim/vim/ $(DOTFILESDIR)/vim/vimrc
@echo "Setting up Vim..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/vim/vim/ $(HOME)/.vim
$(LN) $(DOTFILESDIR)/vim/vimrc $(HOME)/.vimrc
@echo " Downloading Vundle..."
test -d $(HOME)/.vim/bundle/Vundle.vim || $(GIT) clone https://github.com/VundleVim/Vundle.vim.git $(HOME)/.vim/bundle/Vundle.vim
@echo $(TXTDONE)
# Emacs
emacs: $(DOTFILESDIR)/emacs/
@echo "Setting up Emacs..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/emacs/ $(HOME)/.emacs.d
@echo $(TXTDONE)
# Nano
nano: $(DOTFILESDIR)/nanorc
@echo "Setting up Nano..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/nanorc $(HOME)/.nanorc
@echo $(TXTDONE)
#
# Development Environment
#
devenv: gdbconf gitconf rconf octaveconf
# GDB
gdbconf: $(DOTFILESDIR)/gdbinit
@echo "Setting up GDB..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/gdbinit $(HOME)/.gdbinit
@echo $(TXTDONE)
# Git
gitconf: $(DOTFILESDIR)/gitconfig
@echo "Setting up Git..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/gitconfig $(HOME)/.gitconfig
@echo $(TXTDONE)
# R
rconf: $(DOTFILESDIR)/Rprofile
@echo "Setting up R..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/Rprofile $(HOME)/.Rprofile
@echo $(TXTDONE)
# GNU Octave
octaveconf: $(DOTFILESDIR)/octaverc
@echo "Setting up Octave..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/octaverc $(HOME)/.octaverc
@echo $(TXTDONE)
#
# X Windows Server
#
xserver: xinit xresources xscreensaverconf
# Xinit
xinit: $(DOTFILESDIR)/xinitrc
@echo "Setting up Xinit..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/xinitrc $(HOME)/.xinitrc
@echo $(TXTDONE)
# Xresources
xresources: $(DOTFILESDIR)/Xresources
@echo "Setting up Xresources..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/Xresources $(HOME)/.Xresources
@echo " Loading the new configuration..."
xrdb -merge $(HOME)/.Xresources
@echo $(TXTDONE)
# Xscreensaver
xscreensaverconf: $(DOTFILESDIR)/xscreensaver
@echo "Setting up Xscreenaver..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/xscreensaver $(HOME)/.xscreensaver
@echo " Loading the new configuration..."
-xscreensaver-command -restart
@echo $(TXTDONE)
#
# Console Applications
#
consoleapps: mutt screen
# Mutt
mutt: $(DOTFILESDIR)/mutt/
@echo "Setting up Mutt..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/mutt/ $(HOME)/.mutt
@echo $(TXTDONE)
# GNU Screen
screen: $(DOTFILESDIR)/screenrc
@echo "Setting up GNU Screen..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/screenrc $(HOME)/.screenrc
@echo $(TXTDONE)
#
# Terminal Emulators
#
termemus: terminator urxvt
# Terminator
terminator: $(DOTFILESDIR)/terminator/
@echo "Setting up Terminator..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/terminator/ $(HOME)/.config/terminator
@echo $(TXTDONE)
urxvt: $(DOTFILESDIR)/urxvt/ $(DOTFILESDIR)/urlview
@echo "Setting up URxvt..."
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/urxvt/ $(HOME)/.urxvt
@echo " Setting up UrlView..."
$(LN) $(DOTFILESDIR)/urlview $(HOME)/.urlview
@echo $(TXTDONE)
#
# Fonts
#
fonts: $(FONTSDIR)/truetype
@echo "Setting up fonts..."
@echo " Downloading Liberation Nerd Font..."
$(WGET) https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/LiberationMono.zip -O /tmp/LiberationMono.zip
@echo " Installing Liberation Nerd Font..."
sudo $(MKDIR) $(FONTSDIR)/truetype/liberation
sudo unzip /tmp/LiberationMono.zip -d $(FONTSDIR)/truetype/liberation
@echo " Updating the font cache..."
fc-cache -f -v
@echo $(TXTDONE)
#
# Window Managers
#
windowmanagers: i3winman i3status
# i3
i3winman: $(DOTFILESDIR)/i3
@echo "Setting up i3..."
@echo " Creating directories..."
$(MKDIR) $(HOME)/.config/i3
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/i3 $(HOME)/.config/i3/config
@echo $(TXTDONE)
# i3status
i3status: $(DOTFILESDIR)/i3status
@echo "Setting up i3status..."
@echo " Creating directories..."
$(MKDIR) $(HOME)/.config/i3status
@echo " Symlinking dotfiles..."
$(LN) $(DOTFILESDIR)/i3status $(HOME)/.config/i3status/config
@echo $(TXTDONE)