Skip to content

Instantly share code, notes, and snippets.

@sonique6784
Last active December 14, 2023 10:53
Show Gist options
  • Save sonique6784/c638edfcf1ef9782622c2ed642b4c34b to your computer and use it in GitHub Desktop.
Save sonique6784/c638edfcf1ef9782622c2ed642b4c34b to your computer and use it in GitHub Desktop.
Install and Configure macOS
# Install homebrew - package manager
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# add home brew to the PATH
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile
# Oh-my-ssh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Add cask for unstable version (alpha, beta, nighly)
brew tap homebrew/cask-versions
# Add cask for fonts
brew tap homebrew/cask-fonts
brew install \
stats \ # Menu bar info (CPU, RAM, Temperature)
protobuf \ # Protobuf library
e2fsprogs \ # Tools for Linux filesystems (ext2,3,4)
ffmpeg \ # Video toolbox
imagemagick \ # Image manipulation toolbox
neovim \ # powerful terminal editor, successor of vim
python3 \ # Python programming language
node \ # nodeJS
openjdk \ # Java Dev Tools
rustup-init \ # Rust environment selector
virtualbox \ # Virtual Machine
### Android Stuff ###
# Android Studio
brew install --cask android-studio
# Android Message
brew install --cask orangedrangon-android-messages
# Android File transfer
brew install --cask android-file-transfer
# Android Studio Preview
brew install --cask android-studio-preview-canary
# NearBy Share / NearDrop
brew install grishka/grishka/neardrop
### Other Coding stuff ###
# VSCode
brew install --cask visual-studio-code
# iTerm2
brew install --cask iterm2
# AstroVim - NeoVim distribution / theme
git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim
# Docker
brew install --cask docker
# MacDown
brew install --cask macdown
### Browsers ###
brew install --cask google-chrome
brew install --cask firefox
# Entertainment
brew install --cask vlc # Video player
brew install --cask spotify # Music
brew install --cask blackhole-2ch # Audio routing
# Graphics
brew install --cask gimp # Image editor
brew install --cask blender # 3D Editor
brew install --cask figma # UX Editor
# System utils
brew install --cask cakebrew # GUI Brew package manager
brew install --cask the-unarchiver # all kind of archives
brew install --cask onyx # macOS maintenance tool
# Game emulation
brew install --cask openemu
brew install --cask ares
# Network
brew install --cask wireshark
# Communication
brew install --cask discord
brew install --cask whatsapp
brew install --cask zoom
brew install --cask skype
brew install --cask microsoft-teams
# Security
brew install --cask macpass # KeePass-like
# fonts
brew install font-hack-nerd-font font-3270-nerd-font font-anonymice-nerd-font font-anonymice-powerline
### Finder Configuration ###
# Other Finder configs for inspiration
# https://gist.github.com/alanzeino/42b6d983c7aa2f29d64ea2749621f7cf
# https://gist.github.com/MatthewEppelsheimer/2269385
# https://macos-defaults.com/finder/showpathbar.html
# https://github.com/karmi/dotfiles/blob/master/mac/__application_preferences.sh
# https://github.com/rusty1s/dotfiles/blob/master/macos/defaults.sh
# https://setup.fe.engineer/
# echo "Show all filename extensions in Finder"
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# echo "Show Status bar in Finder"
defaults write com.apple.finder ShowStatusBar -bool true
# Show Tab View
defaults write com.apple.finder ShowTabView -bool true
# echo "Avoid creating .DS_Store files on network volumes"
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# echo "Disable the warning when changing a file extension"
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Always expand Save Panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Default Finder view is List:
defaults write com.apple.Finder FXPreferredViewStyle Nlsv
# Put Dock on the right
defaults write com.apple.dock orientation -string right
# disable show recent
defaults write com.apple.dock show-recents -bool FALSE
defaults write NSGlobalDomain NSRecentDocumentsLimit 0
defaults write -g NSNavRecentPlacesLimit -int 0
# Enable snap-to-grid for desktop icons
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
# Enable tap to click on Trackpad and login screen
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write com.apple.mouse.tapBehaviour -int 1
# Don't open files in Safari after downloading:
defaults write com.apple.Safari AutoOpenSafeDownloads -bool false
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Keep folders at the top
defaults write com.apple.finder "_FXSortFoldersFirst" -bool "true"
# show path bar
defaults write com.apple.finder "ShowPathbar" -bool "true"
# default opening folder (command-N) (""PfHm"" = Home ; "PfDe" = Desktop ; "PfDo" = Documents)
defaults write com.apple.finder NewWindowTargetPath -string "PfHm"
# Set location to save screenshots
mkdir ~/Pictures/Screenshots/
defaults write com.apple.screencapture location ~/Pictures/Screenshots/
# Enable night shift from sunset to sunrise
defaults write com.apple.CoreBrightness NightShiftSchedule -dict Enabled -bool true
### SSH ###
# ssh-keygen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment