-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_once_before_install-packages-darwin.sh.tmpl
116 lines (97 loc) · 2.47 KB
/
run_once_before_install-packages-darwin.sh.tmpl
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
{{- if (eq .chezmoi.os "darwin") -}}
#!/bin/bash -x
PACKAGES=(
node
gh
go
hugo
mas
shellcheck
the_silver_searcher
starship
neovim
exa
tre-command
bat
git-delta
fzf
zoxide
)
CASKS=(
1password
1password-cli
font-fira-code
font-hack-nerd-font
google-drive
steam
syncthing
visual-studio-code
symboliclinker
epic-games
xnviewmp
)
MASPACKAGES=(
# 824171161 # "Affinity Designer"
# 824183456 # "Affinity Photo"
411643860 # "DaisyDisk"
# 486626129 # "Folder Tidy"
682658836 # "GarageBand"
1099568401 # "Home Assistant"
408981434 # "iMovie"
# 498944723 # "JPEGmini"
# 409183694 # "Keynote"
# 405399194 # "Kindle"
441258766 # "Magnet"
409203825 # "Numbers"
409201541 # "Pages"
# 445189367 # "PopClip"
# 413965349 # "Soulver 2"
# 1062679359 # "Typeface"
)
GOAPPS=(
github.com/Crosse/font-install
)
# If Homebrew is not installed on the system, it will be installed here
if test ! $(which brew); then
printf '\n\n\e[33mHomebrew not found. \e[0mInstalling Homebrew...'
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
else
printf '\n\n\e[0mHomebrew found. Continuing...'
fi
# Update homebrew packages
printf '\nInitiating Homebrew update...\n'
brew update
printf '\nInstalling packages...\n'
brew install ${PACKAGES[@]}
printf '\n\nRemoving out of date packages...\n'
brew cleanup
printf '\n\nInstalling cask...\n'
brew install cask
printf '\n\nInstalling cask apps...\n'
brew install --cask ${CASKS[@]}
printf '\nInstalling MacAppStore apps...\n'
for app in ${MASPACKAGES[@]}; do
mas install ${app}
done
printf '\n\nInstalling go programs...\n'
for app in "${GOAPPS[@]}"; do
go install "${app}@latest"
done
printf '\n\nUpdating npm...\n'
npm install -g npm
printf '\n\nInstalling global npm packages...\n'
npm install -g sass
printf '\n\nSetting Global Mac Settings...\n'
# better key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 15
defaults write NSGlobalDomain KeyRepeat -int 1
# no delay for dock hiding
defaults write com.apple.dock autohide-delay -float 0
dscacheutil -flushcache
printf '\n\nSetup autocomplete...\n'
sudo mkdir -p /usr/local/share/zsh/site-functions/
sudo chown -R $(whoami) /usr/local/share/zsh/site-functions/
hugo completion zsh > /usr/local/share/zsh/site-functions/_hugo
printf '\n\nSetting up antigen...\n'
curl -L git.io/antigen > ${HOME}/.antigen.zsh
{{ end -}}