Updated Brewfile and .mac.sh.

This commit is contained in:
Christian Baer 2020-05-20 15:41:39 +02:00
parent 12d2f7a2ac
commit 573d7c76ca
2 changed files with 49 additions and 12 deletions

View File

@ -48,12 +48,9 @@ cask "fantastical"
cask "firefox"
cask "fluid"
cask "fog"
cask "font-courier-prime"
cask "font-courier-prime-code"
cask "font-courier-prime-medium-and-semi-bold"
cask "font-courier-prime-sans"
cask "font-fira-code"
cask "font-source-code-pro"
cask "fork"
cask "github"
cask "handbrake"
cask "hazel"
cask "istat-menus"
@ -65,9 +62,11 @@ cask "little-snitch"
cask "marked"
cask "mediathekview"
cask "moneymoney"
cask "monitorcontrol"
cask "nextcloud"
cask "onyx"
cask "pdf-expert"
cask "plex"
cask "portfolioperformance"
cask "qlcommonmark"
cask "ramme"
@ -84,11 +83,12 @@ cask "typora"
cask "virtualbox"
cask "vlc"
cask "wireshark"
cask "zoomus"
mas "Affinity Designer", id: 824171161
mas "Affinity Photo", id: 824183456
mas "Affinity Publisher", id: 881418622
mas "Amphetamine", id: 937984704
mas "AudioBookBinder", id: 413969927
mas "Banking 4X", id: 926711151
mas "Bitwarden", id: 1352778147
mas "Cardhop", id: 1290358394
mas "Color Picker", id: 641027709

View File

@ -2,6 +2,9 @@
# Inspired by https://github.com/mathiasbynens/dotfiles/blob/master/.macos from Mathias Bynens
MAC_HOSTNAME="leia"
MAC_NATIVEFIERSITES="https://web.threema.ch/ https://app.youneedabudget.com/"
MAC_NATIVEFIEROPTS="--darwin-dark-mode-support"
MAC_NATIVEFIERTMP="/tmp/nativefier"
# Close any open System Preferences panes, to prevent them from overriding
# settings were about to change
@ -10,6 +13,11 @@ osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v
echo ">>> Updating macOS..."
sudo softwareupdate -i -a
echo ">>> Applying settings..."
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@ -19,6 +27,21 @@ sudo scutil --set HostName "$MAC_HOSTNAME"
sudo scutil --set LocalHostName "$MAC_HOSTNAME"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$MAC_HOSTNAME"
# disable automatic update downloads
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticDownload -bool FALSE
# enable network time
sudo systemsetup -setusingnetworktime on
# Enable DSDontWrite - By default, the Finder collects labels, tags, and other
# metadata related to files on mounted SMB volumes before determining how
# to display the files. macOS High Sierra 10.13 introduces the option for the
# Finder to fetch only the basic information about files on a mounted SMB
# volume, and to display them immediately in alphabetical order. This can
# increase performance in certain environments.
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
# Always show scrollbars
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
@ -42,10 +65,6 @@ defaults write com.apple.LaunchServices LSQuarantine -bool false
# Remove duplicates in the “Open With” menu (also see `lscleanup` alias)
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
# Reveal IP address, hostname, OS version, etc. when clicking the clock
# in the login window
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
# Disable automatic capitalization as its annoying when typing code
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
@ -79,7 +98,7 @@ defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}"
# Show icons for hard drives, servers, and removable media on the desktop
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool false
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
# Finder: show all filename extensions
@ -111,7 +130,7 @@ defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Four-letter codes for the other view modes: `icnv`, `clmv`, `glyv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
#Enable AirDrop over Ethernet and on unsupported Macs running Lion
# Enable AirDrop over Ethernet and on unsupported Macs running Lion
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
# Show the /Volumes folder
@ -139,6 +158,7 @@ defaults write com.apple.dock wvous-bl-modifier -int 0
# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
echo ">>> Killing apps..."
# Kill affected apps
for app in "Activity Monitor" \
"cfprefsd" \
@ -147,8 +167,25 @@ for app in "Activity Monitor" \
killall "${app}" &> /dev/null
done
echo ">>> Installing Homebrew..."
# Install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo ">>> Processing Brewfile..."
# Install apps from Brewfile
brew bundle
#TODO Install Luminar
#TODO Install exactscan pro
echo ">>> Creating single site browsers"
mkdir -p $MAC_NATIVEFIERTMP
for s in ${MAC_NATIVEFIERSITES}; do
nativefier ${MAC_NATIVEFIEROPTS} ${s} ${MAC_NATIVEFIERTMP}
done
find $MAC_NATIVEFIERTMP -depth 2 -name "*.app" -exec cp -rf {} /Applications \;
rm -rf $MAC_NATIVEFIERTMP