-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup
executable file
·62 lines (51 loc) · 1.59 KB
/
setup
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
#!/usr/bin/env bash
set -e
# Create symlinks
cd "$HOME"
[ ! -L icloud-drive ] && ln -s "$HOME/Library/Mobile Documents/com~apple~CloudDocs" icloud-drive
files=(
.bin
.gitconfig
.ideavimrc
.psqlrc
.tmux.conf
.tmuxinator
.vscode
)
for link in ${files[@]}; do
if [ -L "$HOME/$link" ]; then
echo "Link '$link' already exists"
else
ln -s "icloud-drive/dotfiles/$link" .
fi
done
# Link nvim config
mkdir -p "$HOME/.config"
cd "$HOME/.config"
[ ! -L fish ] && ln -s ../icloud-drive/dotfiles/.config/fish .
[ ! -L nvim ] && mkdir nvim
[ ! -L nvim/init.lua ] && ln -s ../icloud-drive/dotfiles/.config/nvim/init.lua nvim/init.lua
[ ! -L nvim/autoload ] && ln -s ../icloud-drive/dotfiles/.config/nvim/autoload nvim/autoload
[ ! -L nvim/coc-settings.json ] && ln -s ../icloud-drive/dotfiles/.config/nvim/coc-settings.json nvim/coc-settings.json
[ ! -L starship.toml ] && ln -s ../icloud-drive/dotfiles/.config/starship.toml .
cd ..
# Link .ssh config
mkdir -p "$HOME/.ssh"
cd "$HOME/.ssh"
[ ! -L config ] && ln -s ../icloud-drive/dotfiles/.ssh/config .
cd ..
# Set macOS default hidden settings
## Disabling shadows on windows when taking screenshots - requires killall SystemUIServer
defaults write com.apple.screencapture disable-shadow -bool true
# Install things
if command -v brew; then
echo "Homebrew already installed;"
else
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Install homebrew bundle
echo "Updating brew, running 'brew bundle', and upgrading packages"
brew update
brew tap Homebrew/bundle
brew bundle --verbose
brew upgrade