-
Notifications
You must be signed in to change notification settings - Fork 0
/
macos-packages.sh
executable file
·155 lines (135 loc) · 3.11 KB
/
macos-packages.sh
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#!/usr/bin/env bash
package_manager() {
# Install homebrew.
[ ! -d "/opt/homebrew/bin" ] && /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
export PATH="/opt/homebrew/bin:$PATH"
}
core_pkgs() {
pkgs=(
alacritty
anki
biber # cv textlive
clang-format
cmake
dive
dlv # golang debugger
eslint
fd
ffmpeg
firefox
flake8
fzf
gnupg
golang
golangci-lint
golines
google-cloud-sdk # work specific
gopls
htop
jq
lazygit
lf
lua-language-server
mpv
n
neofetch
neovim
newsboat
nmap
npm
obs #obs studio
p7zip
pandoc
pinentry-mac
prettier
pyright
ripgrep
rlwrap
rust
shellcheck
stylua # lua formatter
tailwindcss-language-server
texlive # cv textlive
tmux
tree
typescript
typescript-language-server
vscode-langservers-extracted # cssls
wget
yamllint
yapf
yarn
yq # jq but for yaml and toml
yt-dlp
zk
)
brew install "${pkgs[@]}"
brew uninstall --ignore-dependencies node
sudo n 20 # install node lts version
}
misc_pkgs() {
# zsh.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
}
cask_pkgs() {
brew tap homebrew/cask-fonts
pkgs=(
adobe-acrobat-reader
discord
firefox
font-jetbrains-mono-nerd-font
google-chrome
microsoft-teams
wireshark
inkscape
)
brew install --cask "${pkgs[@]}"
}
optional_pkgs() {
pkgs=(
qbittorrent
)
brew install "${pkgs[@]}"
brew uninstall --ignore-dependencies node
}
work_pkgs() {
pkgs=(
bloomrpc
devcontainer
k9s
kubectl
)
brew install "${pkgs[@]}"
brew uninstall --ignore-dependencies node
}
npm_pkgs() {
pkgs=(
emmet-ls
)
sudo npm -g install "${pkgs[@]}"
}
alacritty_finder_icon() {
icon_path=/Applications/Alacritty.app/Contents/Resources/alacritty.icns
if [ ! -f "$icon_path" ]; then
echo "Can't find existing icon, make sure Alacritty is installed"
exit 1
fi
echo "Backing up existing icon"
hash="$(shasum $icon_path | head -c 10)"
mv "$icon_path" "$icon_path.backup-$hash"
echo "Downloading replacement icon"
icon_url=https://github.com/hmarr/dotfiles/files/8549877/alacritty.icns.gz
curl -sL $icon_url | gunzip > "$icon_path"
touch /Applications/Alacritty.app
killall Finder
killall Dock
}
# package_manager
# core_pkgs
# misc_pkgs
# cask_pkgs
# work_pkgs
# npm_pkgs
alacritty_finder_icon