-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·67 lines (59 loc) · 1.59 KB
/
install
File metadata and controls
executable file
·67 lines (59 loc) · 1.59 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
#!/usr/bin/env bash
set -e
check_install () {
echo -n "checking if $1 is installed... "
if command -v $1 &> /dev/null ; then
echo "✓"
else
echo "✗"
return 1
fi
}
check_install git
check_install nvim
check_install tmux
check_install atuin
check_install ghostty
# oh-my-zsh
if [ ! -d ~/.oh-my-zsh ]; then
echo "oh-my-zsh not found. installing..."
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
else
echo "oh-my-zsh already installed. skipping..."
fi
# zsh
if [ ! -f ~/.zshrc ]; then
ln -s ${PWD}/zsh/zshrc ~/.zshrc
else
echo "zshrc already exists. skipping..."
fi
# neovim
if [ ! -d ~/.config/nvim ]; then
ln -s ${PWD}/nvim ~/.config/nvim
else
echo "neovim config already exists. skipping..."
fi
# tmux
if [ ! -d ~/.tmux/plugins/tpm ]; then
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
fi
if [ ! -d ~/.config/tmux ]; then
ln -s ${PWD}/tmux ~/.config/tmux
echo "don't forget to disable the default ctrl-space binding in MacOS so you can use it as the tmux prefix"
echo "System Settings > Keyboard shortcuts > Input Sources - uncheck all"
echo "System Settings > Keyboard shortcuts > Mission Control - uncheck all under Mission Control submenu"
else
echo "tmux config already exists. skipping..."
fi
# ghostty
if [ ! -d ~/.config/ghostty ]; then
ln -s ${PWD}/ghostty ~/.config/ghostty
else
echo "ghostty config already exists. skipping..."
fi
# add git aliases if none already defined
if ! grep -q "\[alias\]" ~/.gitconfig; then
cat ${PWD}/git/.gitconfig >> ~/.gitconfig
else
echo "git aliases already defined. skipping..."
fi