forked from jackfranklin/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
103 lines (88 loc) · 3.49 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
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
DIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
all: base16 symlinks brew-bundle vim ruby npm tpm powerline-fonts pinentry gpg mac-settings
symlinks:
@mkdir -p ~/.config
@ln -sf $(DIR)/bin ~/.bin
@ln -nsf $(DIR)/zsh ~/.zsh
@ln -sf $(DIR)/zsh/zshrc ~/.zshrc
@ln -sf $(DIR)/zsh/profile ~/.zprofile
@ln -sf $(DIR)/vim/vimrc ~/.vimrc
@ln -shf $(DIR)/vim ~/.config/nvim
@mkdir -p ~/.vim
@ln -sf $(DIR)/vim/lua ~/.vim/lua
@ln -sf $(DIR)/tmux/tmux.conf ~/.tmux.conf
@ln -sf $(DIR)/git/gitconfig ~/.gitconfig
@ln -sf $(DIR)/git/gitignore_global ~/.gitignore_global
@ln -sf $(DIR)/ctags/ctags ~/.ctags
@ln -sf $(DIR)/gem/gemrc ~/.gemrc
@ln -nsf $(DIR)/bundle ~/.bundle
@ln -sf $(DIR)/pry/pryrc ~/.pryrc
@ln -sf $(DIR)/psql/psqlrc ~/.psqlrc
@mkdir -p ~/.ssh
@ln -sf $(DIR)/ssh/config ~/.ssh/config
@mkdir -p ~/.rbenv
@ln -sf $(DIR)/rbenv/default-gems ~/.rbenv/default-gems
@ln -sf $(DIR)/editorconfig ~/.editorconfig
@mkdir -p ~/.gnupg
@chmod 700 ~/.gnupg
@ln -sf $(DIR)/gpg/gpg.conf ~/.gnupg/gpg.conf
@ln -sf $(DIR)/gpg/gpg-agent.conf ~/.gnupg/gpg-agent.conf
@rm -rf ~/.config/kitty && ln -shf $(DIR)/kitty ~/.config/kitty
brew:
which brew || make install-brew
install-brew:
mkdir -p tmp
curl -fsSL -o tmp/install-brew.sh https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
/bin/bash tmp/install-brew.sh
rm tmp/install-brew.sh
brew-bundle: symlinks brew
# Chrome updates too frequently to have SHAsums
HOMEBREW_CASK_OPTS="" brew install google-chrome
HOMEBREW_CASK_OPTS="" brew install google-cloud-sdk --cask
@brew tap Homebrew/bundle || echo ''
brew bundle
LATEST_RUBY="3.2.0"
ruby:
[ -d ~/.rbenv/versions/$(LATEST_RUBY) ] || rbenv install $(LATEST_RUBY)
rbenv global $(LATEST_RUBY)
npm:
fnm install
zsh -c 'npm install npm --location=global && \
npm install serve --location=global && \
npm install --location=global typescript typescript-language-server eslint eslint_d prettier'
tpm:
[ -d ~/.tmux/plugins/tpm ] || git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
cd ~/.tmux/plugins/tpm && git pull
base16:
[ -d ~/.config/base16-shell ] || git clone https://github.com/chriskempson/base16-shell.git ~/.config/base16-shell
(cd ~/.config/base16-shell && git pull)
[ -d ~/.config/base16-kitty ] || git clone https://github.com/kdrag0n/base16-kitty.git ~/.config/base16-kitty
(cd ~/.config/base16-kitty && git pull)
powerline-fonts:
[ -d ~/.config/powerline ] || git clone https://github.com/powerline/fonts.git ~/.config/powerline
(cd ~/.config/powerline && git pull && ./install.sh)
pinentry:
$(shell brew --prefix)/bin/pinentry-touchid -fix
.PHONY: gpg
gpg:
gpg --import $(DIR)/gpg/pubkey.gpg
gpgconf --launch gpg-agent
gpg-agent
vim: symlinks npm
nvim +PlugInstall +CocInstall +qall
mac-settings:
@echo 'setting up screensaver'
@defaults -currentHost write com.apple.screensaver idleTime 300
@defaults -currentHost write com.apple.screensaver moduleDict -dict \
moduleName Aerial \
path '$(HOME)/Library/Screen Savers/Aerial.saver' \
type 0
@echo 'enabling three finger drag'
@defaults -currentHost write -globalDomain com.apple.trackpad.threeFingerDragGesture -int 1
@echo "reducing motion"
@defaults write com.apple.Accessibility ReduceMotionEnabled 1
@echo "configuring mission control"
@defaults write com.apple.dock showDesktopGestureEnabled -int 0
@defaults write com.apple.dock showLaunchpadGestureEnabled -int 0
@defaults write com.apple.dock showMissionControlGestureEnabled -int 0
@defaults write com.apple.dock mru-spaces -int 0