-
-
Save osben/d91f92a0974568a0f3d66e1aeeee0115 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
# Scroll direction: natural | |
defaults write 'Apple Global Domain' com.apple.swipescrolldirection -bool FALSE | |
# Set the timezone | |
sudo systemsetup -settimezone "Europe/Paris" > /dev/null | |
# Require password immediately after sleep or screen saver begins | |
#defaults write com.apple.screensaver askForPasswordDelay -int 0 | |
# Icon size of Dock items | |
defaults write com.apple.dock tilesize -int 32 | |
# Dock magnification | |
defaults write com.apple.dock magnification -bool TRUE | |
# Top left screen corner | |
defaults write com.apple.dock wvous-tl-corner -int 10 | |
defaults write com.apple.dock wvous-tl-modifier -int 10 | |
# Homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
brew install [email protected] git bash-completion jsonpp htop composer | |
brew cask install firefox google-chrome meteorologist yujitach-menumeters spotify phpstorm docker slack visual-studio-code sequel-pro | |
echo '[[ -s ~/.bashrc ]] && source ~/.bashrc' > ~/.bash_profile | |
# Remove all app icons from Dock | |
defaults write com.apple.dock persistent-apps -array | |
# Add my app icons | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Firefox.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Google Chrome.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Safari.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Slack.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Spotify.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Utilities/Terminal.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/PhpStorm.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Visual Studio Code.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Notes.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/System Preferences.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>" | |
# Show percent for battery | |
defaults write com.apple.menuextra.battery ShowPercent -string "YES" | |
# Use plain text mode for new TextEdit documents | |
defaults write com.apple.TextEdit RichText -int 0 | |
# Enable Secure Keyboard Entry in Terminal.app | |
defaults write com.apple.terminal SecureKeyboardEntry -bool true | |
# MenuMeters | |
defaults write com.ragingmenace.MenuMeters CPUAverageMultiProcs -int 1 | |
defaults write com.ragingmenace.MenuMeters CPUPercentDisplayMode -int 2 | |
defaults write com.ragingmenace.MenuMeters DiskImageSet -int 4 | |
defaults write com.ragingmenace.MenuMeters MemDisplayMode -int 1 | |
defaults write com.ragingmenace.MenuMeters NetDisplayMode -int 2 | |
# Meteorologist | |
defaults write com.heat.Meteorologist city -string "Paris, FR" | |
defaults write com.heat.Meteorologist displayCity -string "Paris" | |
defaults write com.heat.Meteorologist degreesUnit -int 1 | |
defaults write com.heat.Meteorologist displayDegreeType -int 1 | |
defaults write com.heat.Meteorologist displayHumidity -int 0 | |
defaults write com.heat.Meteorologist distanceUnit -int 2 | |
defaults write com.heat.Meteorologist speedUnit -int 1 | |
defaults write com.heat.Meteorologist useNewWeatherIcons -int 0 | |
# git | |
echo -n "Enter your name and press [ENTER]: " | |
read -t 10 name || name="John Doe" | |
git config --global user.name $name | |
echo -n "Enter your email and press [ENTER]: " | |
read -t 10 email || email="[email protected]" | |
git config --global user.email $email | |
# github/gitlab | |
ssh-keygen -t rsa -b 4096 -C $email | |
cat > ~/.ssh/config <<- EOF | |
Host * | |
AddKeysToAgent yes | |
UseKeychain yes | |
IdentityFile ~/.ssh/id_rsa | |
EOF | |
ssh-add -K ~/.ssh/id_rsa | |
cat ~/.ssh/id_rsa.pub | pbcopy | |
open -a "Google Chrome" https://github.com/settings/ssh/new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment