Last active 3 weeks ago

Revision 6402ddbcd9fdfc33e62b6195562ed52a26c0e493

mac-install.sh Raw
1sudo echo
2
3## reboot your mac and press ⌘+R
4## csrutil disable
5## reboot
6
7
8## colors
9red() { printf "\033[31m${1}\033[0m\n\n"; }
10green() { printf "\033[32m${1}\033[0m\n\n"; }
11blue() { printf "\033[38;5;27m${1}\033[0m\n" ; }
12purple() { printf "\033[35m${1}\033[0m\n\n"; }
13
14
15## show hidden files
16defaults write com.apple.Finder AppleShowAllFiles true
17
18# xcode
19blue "Installing xcode"
20xcode-select --install
21
22# brew
23blue "Installing brew"
24bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
25brew update --auto-update
26brew analytics off
27
28# git
29blue "Installing git"
30brew install gh
31gh auth login
32
33## zsh
34blue "Installing zsh"
35sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
36
37local ZSH_CUSTOM="$HOME/.oh-my-zsh/custom/plugins"
38git clone --depth 1 -- https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/zsh-autosuggestions
39git clone --depth 1 -- https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/zsh-syntax-highlighting
40git clone --depth 1 -- https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM}/fast-syntax-highlighting
41git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git $ZSH_CUSTOM/zsh-autocomplete
42git clone --depth 1 -- https://github.com/Aloxaf/fzf-tab $ZSH_CUSTOM/fzf-tab
43
44## brew
45blue "Installing apps"
46brew install git git-gui
47brew install mos ffmpeg
48brew install fastlane
49brew install stats
50brew install carthage
51brew install lima
52brew install swiftformat
53brew install robotsandpencils/made/xcodes
54brew install swiftlint
55brew install mos asciinema
56brew install imagemagick
57brew install aria2
58brew install mackup # backup
59brew install jq
60brew install swiftlint
61brew install rsync
62brew tap majd/repo
63brew install ipatool
64brew install jadx
65brew install apktool
66brew install grep ## ggrep (gnu-unix)
67brew install ccat ## cat with format.
68brew install duti ## set default app.
69brew install ripgrep ## grep like, + recursive
70brew install ngrok/ngrok/ngrok
71brew install imagemagick
72brew install rclone
73brew install fd ## find alt
74brew install bat
75brew install tree
76brew install gitui
77brew install git-delta
78brew install neofetch
79brew install lolcat
80brew install lesspipe ## advance less
81brew install yt-dlp ## as youtube-dl weirdo
82brew install imagemagick
83brew install pngpaste
84brew install micro ## editor
85brew install vhs ## terminal recorder
86brew install rustfmt
87brew install jesseduffield/lazygit/lazygit
88brew install glances ## htop
89brew install mitmproxy
90brew install php
91brew install dua-cli
92brew install gitleaks
93brew install source-highlight
94brew install rbenv
95brew install jq
96brew install yq
97
98brew install git-lfs
99git lfs install
100git lfs install --system
101
102brew install --cask swiftformat-for-xcode
103brew install --cask maccy
104brew install --cask xcodes
105brew install --cask flameshot
106brew install --cask vlc
107brew install --cask localsend
108
109# brew install --cask devtoys
110# brew install --cask hiddenbar
111# brew install --cask swiftbar trex multi // create web application
112# brew install --cask rectangle
113# brew install --cask alt-tab
114# brew install --cask pusher
115# brew install --cask sequel-ace
116# brew install --cask keycastr # keycast
117# brew install --cask linearmouse
118# brew install --cask iconizer
119# brew install --cask kap
120# brew install --cask --no-quarantine middleclick
121# brew install --cask amethyst // tiling window
122
123# https://caddy.community/t/caddy-on-mac-os-as-homebrew-service-autostart-on-system-startup/16940/2
124brew install caddy
125
126## vim
127curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
128 https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim #plugin
129
130# rust
131curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
132
133## services
134brew services start caddy
135# /usr/local/etc/Caddyfile
136
137curl -fsSL https://raw.githubusercontent.com/onmyway133/FinderGo/master/install.sh | sh
138
139## font
140blue "Installing fonts"
141echo -e "\xee\x82\xa0"
142brew tap homebrew/cask-fonts
143brew install --cask font-fira-code
144brew install font-hack-nerd-font
145echo -e "\xee\x82\xa0"
146
147# cli
148curl -sL https://firebase.tools | bash
149curl -fsSL https://d2lang.com/install.sh | sh -s -- # d2 for diagrams, arrows....
150sh -c "$(curl -fsSL https://raw.githubusercontent.com/guarinogabriel/mac-cli/master/mac-cli/tools/install)"
151
152curl https://raw.githubusercontent.com/ax/apk.sh/main/apk.sh -o /usr/local/bin/apk.sh
153chmod +x /usr/local/bin/apk.sh
154
155# node
156brew install node
157brew install watchman
158brew install cocoapods
159
160npm install --global web-ext
161npm install --global git-format-staged
162npm install -g react-native-cli
163npm install -g yarn
164npm install -g eslint
165npm install -g terminalizer
166
167
168# disk-space-analyzer
169curl https://download.nektony.com/download/diskexpert/disk-space-analyzer.dmg -O
170open disk-space-analyzer.dmg
171
172## sublime text
173
174ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
175
176## fzf
177brew install fzf
178$(brew --prefix)/opt/fzf/install
179
180## dotfiles
181blue "Config dotfiles https://www.atlassian.com/git/tutorials/dotfiles"
182git init --bare $HOME/.cfg
183alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
184config config --local status.showUntrackedFiles no
185
186## vim
187curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
188 https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim #plugin
189
190
191# sudo part
192## Enable install from anywhere
193# https://www.reddit.com/r/MacOS/comments/pquuc4/comment/hdds9g0/
194# https://maclife.io/huong-dan-tat-gatekeeper-bat-tuy-chon-anywhere-tren-macos-sierra-10-12-de-cai-ung-dung-ben-ngoai-app-store.html
195sudo spctl --master-disable
196
197sudo gem install cocoapods
198sudo gem install screengrab
199
200# exit
201green "Install successfully, enjoy this awsome machine ❤️"
202exit
203
204## addition
205[vscode xcode] https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line
206[storage] https://nektony.com/disk-expert
207[cliboard] flycut/cutbox
208[editor] textmate coteditor
209[vpn] warp 1.1.1.1
210[player] https://github.com/iina/iina/releases/tag/v1.3.0
211[extension] https://github.com/quoid/userscripts
212[wiget] https://github.com/leits/MeetingBar
213[ci] https://github.com/cirruslabs/tart
214[vm] https://github.com/utmapp/UTM
215[ipa] https://github.com/majd/ipatool
216[xcode] https://github.com/RobotsAndPencils/XcodesApp
217[emulator] https://github.com/PlayCover/PlayCover
218[annotate, cite, and share research] https://www.zotero.org/
219[terminal] https://iterm2.com/downloads.html
220[keyboard] https://github.com/pqrs-org/Karabiner-Elements
221[realm] https://studio-releases.realm.io/latest/download/mac-dmg https://github.com/dsmelov/simsim
222[sketch] https://github.com/duraki/SketchCrapp
223[record] https://github.com/onmyway133/GifCapture/releases/tag/1.1.0
224[note] https://github.com/glushchenko/fsnotes
225[convert video2gif] https://github.com/sindresorhus/Gifski
226[download manager] https://github.com/agalwood/Motrix/releases
227[wallpaper] https://github.com/rlxone/Equinox
228[php] https://github.com/nicoverbruggen/phpmon
229[firmware] https://github.com/ninxsoft/mist-cli
230[xcodeproject] https://github.com/yonaskolb/XcodeGen
231[calender] https://github.com/pakerwreah/Calendr
232[java] https://www.oracle.com/java/technologies/downloads/#jdk19-mac
233[automation] https://www.hammerspoon.org/go/
234[video] https://github.com/mltframework/shotcut/releases
235[xcode] https://github.com/Serchinastico/Kin
236[database] https://github.com/dbeaver/dbeaver/releases
237[default app] https://www.rubicode.com/Downloads/RCDefaultApp-2.1.X.dmg
238[wasm] https://github.com/WebAssembly/wabt/releases/w
239[launchctl] launchcontrol
240[file-explorer] https://github.com/sayanarijit/xplr/releases | https://github.com/ranger/ranger | https://github.com/kamiyaa/joshuto | nnn | https://github.com/sxyazi/yazi
241[file server] https://github.com/sigoden/dufs # webdav
242[localsend] https://localsend.org/#/download # file sharing, airdrop
243[teamview] https://github.com/rustdesk/rustdesk/releases # teamviewer alternative
244[sql] drawsql.app
245[disk] https://github.com/Byron/dua-cli?tab=readme-ov-file
246[monitor brightness] https://github.com/alin23/Lunar
247[export photo library ios] https://github.com/RhetTbull/osxphotos
248[music lyric] buzz
249[image compressor, blog] caesium image compressor
250[vpn] tunelblick
251[bloatware] uad-ng-macos
252[window manager] https://github.com/MrKai77/Loop/releases/
253[editor] https://zed.dev/download
254[software] https://github.com/objective-see/KnockKnock
255[server] https://github.com/lollipopkit/flutter_server_box
256[network monitor] https://github.com/GyulyVGC/sniffnet
257[slideshow] https://github.com/gobbledegook/creevey
258