Skip to content

Instantly share code, notes, and snippets.

@villeodell
Last active January 15, 2021 22:33
Show Gist options
  • Save villeodell/a4431bcbf921504304f3ec2bf02a4839 to your computer and use it in GitHub Desktop.
Save villeodell/a4431bcbf921504304f3ec2bf02a4839 to your computer and use it in GitHub Desktop.
Install base apps on mac using brew, cask, and mas-cli
# Check/install brew
if test ! $(which brew); then
echo "Installing homebrew"
ruby -e "$(curl -fsSl https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew analytics off
# Update homebrew recipes
brew update
# Other useful binaries
binaries=(
highlight
git
hub # https://hub.github.com/
findutils
ffmpeg
lame
parallel
rename
node
mas # for installing mac store apps via cli
youtube-dl
zsh
zsh-autosuggestions
zsh-completions
)
echo "installing binaries..."
brew install ${binaries[@]}
brew cleanup
# homebrew-cask
echo "installing homebrew-cask..."
brew install caskroom/cask/brew-cask
brew tap caskroom/versions
# Install cask apps
apps=(
alfred
appcleaner
atom
bartender
betterzip
box-drive
box-edit
brave-browser
calibre
devonthink
# disk-drill
# docker
# kitematic
# dropbox
fantastical
firefox
firefox-developer-edition
font-source-code-pro
github
google-chrome
iterm2
iina
insomnia
muzzle
notion
# popsql
qlcolorcode
qlimagesize
qlmarkdown
qlstephen
qlvideo
quicklook-json
shifty
skype
slack
spotify
tor-browser
# typora
# veeer
atom
visual-studio-code
vlc
xmind-zen
zoomus
)
# Install apps to /Applications
# Default is /Users/$user/Applications
echo "installing some apps for you..."
brew cask install --appdir="/Applications" ${apps[@]}
brew cleanup
# Install mac app store apps
mas install \
1055273043 `#PDF Expert`\
441258766 `#Magnet`\
1470584107 `#Dato`\
982710545 `#Forecast Bar`\
1147396723 `#WhatsApp`\
485812721 `#TweetDeck`\
462062816 `#Microsoft PowerPoint`\
462054704 `#Microsoft Word`\
462058435 `#Microsoft Excel`\
1122008420 `#Table Tool`\
1225570693 `#Ulysses`\
1435957248 `#Drafts`\
1441915970 `#Vithanco`
# Set some mac defaults
echo "setting a few mac defaults for you..."
# Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0
# Don't default to saving documents to iCloud:
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Enable Password Login:
printf "Require Password Immediately After Sleep or Screen Saver Begins.\n"
defaults write com.apple.screensaver askForPassword 1 > /dev/null 2>&1
defaults write com.apple.screensaver askForPasswordDelay 0 > /dev/null 2>&1
# Enable the firewall with stealth mode
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on
# Disabled allow signed downloaded applications automatically
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setallowsignedapp off
#restart socketfilterfw
sudo pkill -HUP socketfilterfw
echo "It's done! -- Have a look at https://github.com/drduh/macOS-Security-and-Privacy-Guide"
echo "https://github.com/cnstntn-kndrtv/open-in-buttons-for-finder-toolbar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment