Last active
August 12, 2022 19:39
-
-
Save mflknr/927f9dfc87592bd08a87e116ca7408be to your computer and use it in GitHub Desktop.
MacOS initial development setup and installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Run with | |
# `sudo curl -s https://gist.githubusercontent.com/mflknr/927f9dfc87592bd08a87e116ca7408be/raw/f8c8bf14f1e4a51107feb764db39c33e36e2575c/setup.sh | zsh` | |
set -e | |
# install command line tools | |
xcode-select --install | |
echo 'Waiting for Command Line Tools to finish installing. \nAfter installation is complete, press any key to continue...'; read -k1 -s | |
# enable buildtimes in xcode | |
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES | |
# install homebrew and oh-my-zsh | |
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash | |
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash | |
echo 'Waiting for Homebrew to finish installing. \nAfter installation is complete, press any key to continue...'; read -k1 -s | |
# install powerlevel10k | |
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k | |
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc | |
echo 'Waiting for Powerlevel10k to finish installing. \nAfter installation is complete, press any key to continue...'; read -k1 -s | |
# install zsh plugins | |
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.zsh/zsh-autosuggestions | |
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting | |
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
echo 'plugins=(aliases colored-man-pages command-not-found common-aliases extract git gitfast gitignore git-auto-fetch git-escape-magic git-trim history per-directory-history swiftpm thefuck vscode wd xcode zsh-autosuggestions zsh-interactive-cd zsh-syntax-highlighting)' >>~/.zshrc | |
echo 'Waiting for finishing installing zsh plugin. Don't forget to add them to the config! \nAfter installation is complete, press any key to continue...'; read -k1 -s | |
echo 'for vscode: open the Command Palette via (F1 or ⇧⌘P) and type shell command to find the Shell Command: Shell Command: Install 'code' command in PATH...'; read -k1 -s | |
# brew installations | |
brew install swiftlint aria2 diff-so-fancy fzf thefuck | |
brew install --cask \ | |
spotify \ | |
spotify-now-playing \ | |
visual-studio-code \ | |
raycast \ | |
iterm2 \ | |
stats \ | |
xcodes \ | |
$(brew --prefix)/opt/fzf/install | |
echo 'Waiting for brew cask installations to finish installing. \nAfter installation is complete, press any key to continue...'; read -k1 -s | |
# configuration | |
echo 'Git will now be configured ...' | |
git config --global user.name "Marius Felkner" | |
git config --global user.email "mflknr@mail.de" | |
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX" | |
git config --global core.excludesfile = "~/.gitignore_global" | |
git config --global core.editor "nano" | |
git config --global fetch.prune true | |
git config --global push.default simple | |
git config --global pull.rebase true | |
git config --global pull.ff only | |
git config --global diff.wsErrorHighlight all | |
git config --global merge.ff false | |
git config --global grep.lineNumber true | |
git config --global interactive.diffFilter "diff-so-fancy --patch" | |
# manual steps (if necessary): | |
echo 'Finished installing necessary components. Now manual steps are required.' | |
# - install Transporter | |
# - install GPG Suite | |
# - install Enpass (or other suitable password manager) | |
# - install Postman | |
# - install Proxyman | |
# - install Raycast extensions (Brew, GitHub, Kill process, Spotify, Translate, Safari Bookmarks) | |
# - set up icloud | |
# - set up system preferences keyboard shortcuts (especially Raycast) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment