-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
131 lines (105 loc) · 4.58 KB
/
Makefile
File metadata and controls
131 lines (105 loc) · 4.58 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
CURRENT_DIR := $(shell pwd)
INSTALL_DIR := $(HOME)
XDG_CONFIG_HOME := $(HOME)/.config
OS = ${shell uname}
all: cui mac
.PHONY: git tig lazygit tmux vim zsh ripgrep homebrew aqua
cui: git tig lazygit tmux vim zsh peco ripgrep aqua
.PHONY: slate finicky karabiner ghostty
mac: slate finicky karabiner ghostty
.PHONY: alacritty ideavim nodoka windows-terminal
windows: ideavim nodoka windows-terminal
aqua:
ln -fns $(HOME)/src/github.com/hamaco/my-aqua-config $(XDG_CONFIG_HOME)/aquaproj-aqua
mise:
ln -fns $(CURRENT_DIR)/mise_ $(XDG_CONFIG_HOME)/mise
dropbox:
ln -fns $(HOME)/Dropbox/data/snippets $(INSTALL_DIR)/.snippets
ln -fns $(HOME)/Dropbox/data/linux/share/phpmanual $(INSTALL_DIR)/share/phpmanual
git:
ln -fns $(CURRENT_DIR)/git $(XDG_CONFIG_HOME)/git
if [ ! -d $(XDG_CONFIG_HOME)/gh ]; then \
mkdir $(XDG_CONFIG_HOME)/gh; \
fi
ln -fns $(CURRENT_DIR)/gh/config.yml $(XDG_CONFIG_HOME)/gh/config.yml
ln -fns $(CURRENT_DIR)/gh/extensions/gh-dash $(XDG_CONFIG_HOME)/gh-dash
ln -fns $(CURRENT_DIR)/gh/extensions/gh-triage $(XDG_DATA_HOME)/gh-triage
homebrew:
@if ! builtin command -v brew > /dev/null; then \
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \
fi
ripgrep:
ln -fns $(CURRENT_DIR)/ripgrep $(XDG_CONFIG_HOME)/ripgrep
ln -fns $(CURRENT_DIR)/ripgrep/rgignore $(HOME)/.rgignore
slate:
ln -fns $(CURRENT_DIR)/slate/slate.js $(INSTALL_DIR)/.slate.js
finicky:
ln -fns $(CURRENT_DIR)/mac/finicky.js $(INSTALL_DIR)/.finicky.js
tig:
ln -fns $(CURRENT_DIR)/tig/tigrc $(INSTALL_DIR)/.tigrc
lazygit:
ln -fns $(CURRENT_DIR)/lazygit $(XDG_CONFIG_HOME)/lazygit
tmux:
@if [ ! -d $(INSTALL_DIR)/.tmux/plugins/tpm ]; then \
git clone https://github.com/tmux-plugins/tpm.git $(INSTALL_DIR)/.tmux/plugins/tpm; \
fi
ln -fns $(CURRENT_DIR)/tmux $(XDG_CONFIG_HOME)/tmux
vim:
@if [ ! -d $(INSTALL_DIR)/.bundle ]; then \
git clone git://github.com/Shougo/neobundle.vim $(INSTALL_DIR)/.bundle/neobundle.vim; \
fi
ln -fns $(CURRENT_DIR)/vim/vim $(INSTALL_DIR)/.vim
ln -fns $(CURRENT_DIR)/vim/vimrc $(INSTALL_DIR)/.vimrc
ln -fns $(CURRENT_DIR)/vim/gvimrc $(INSTALL_DIR)/.gvimrc
vim -N -u $(INSTALL_DIR)/.vim/neobundle.vimrc -U NONE -i NONE -V1 -e -s \
-c "try | NeoBundleUpdate $* | finally | qall! | endtry"
zsh:
ln -fns $(CURRENT_DIR)/zsh/zshenv $(INSTALL_DIR)/.zshenv
ln -fns $(CURRENT_DIR)/zsh/zsh $(XDG_CONFIG_HOME)/zsh
ln -fns $(CURRENT_DIR)/zsh/sheldon $(XDG_CONFIG_HOME)/sheldon
ln -fns $(CURRENT_DIR)/zsh/zeno $(XDG_CONFIG_HOME)/zeno
alacritty:
@if [ "$(OS)" = "Darwin" ]; then \
if [ ! -d $(XDG_CONFIG_HOME)/alacritty ]; then \
mkdir $(XDG_CONFIG_HOME)/alacritty; \
fi; \
ln -fns $(CURRENT_DIR)/alacritty/alacritty.yml $(XDG_CONFIG_HOME)/alacritty/alacritty.yml; \
ln -fns $(CURRENT_DIR)/alacritty/alacritty.darwin.yml $(XDG_CONFIG_HOME)/alacritty/alacritty.darwin.yml; \
else \
if [ ! -d /mnt/c/Users/hamaco/AppData/Roaming/alacritty ]; then \
mkdir /mnt/c/Users/hamaco/AppData/Roaming/alacritty; \
fi; \
cp $(CURRENT_DIR)/alacritty/alacritty.toml /mnt/c/Users/hamaco/AppData/Roaming/alacritty/alacritty.toml; \
cp $(CURRENT_DIR)/alacritty/alacritty.windows.toml /mnt/c/Users/hamaco/AppData/Roaming/alacritty/alacritty.windows.toml; \
cp $(CURRENT_DIR)/alacritty/alacritty.themes.*.toml /mnt/c/Users/hamaco/AppData/Roaming/alacritty/; \
fi
ghostty:
@if [ "$(OS)" = "Darwin" ]; then \
if [ ! -d "${HOME}/Library/Application Support/com.mitchellh.ghostty" ]; then \
mkdir "${HOME}/Library/Application Support/com.mitchellh.ghostty"; \
fi; \
ln -fns $(CURRENT_DIR)/ghostty/config "${HOME}/Library/Application Support/com.mitchellh.ghostty/config"; \
else \
echo 'TODO: macOS以外に入れていないので入れる時に頑張る'; \
fi
windows-terminal:
@if [ "$(OS)" = "Darwin" ]; then \
echo 'Windows Terminal は Windows 専用'; \
else \
cp $(CURRENT_DIR)/windows-terminal/settings.json /mnt/c/Users/hamaco/AppData/Local/Packages/Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe/LocalState/settings.json; \
fi
ideavim:
@if [ "$(OS)" = "Darwin" ]; then \
ln -fns $(CURRENT_DIR)/ideavim/ideavimrc $(INSTALL_DIR)/.ideavimrc; \
else \
cp $(CURRENT_DIR)/ideavim/ideavimrc /mnt/c/Users/hamaco/.ideavimrc; \
fi
nodoka:
cp $(CURRENT_DIR)/nodoka/dot.nodoka /mnt/c/Users/hamaco/dot.nodoka
karabiner:
if [ -d $(XDG_CONFIG_HOME)/karabiner/assets/complex_modifications ]; then \
rmdir $(XDG_CONFIG_HOME)/karabiner/assets/complex_modifications; \
fi; \
ln -fns $(CURRENT_DIR)/karabiner/complex_modifications $(XDG_CONFIG_HOME)/karabiner/assets/complex_modifications
go:
go install github.com/mattn/sleepy@v0.0.3