[zsh] Update init-macos
This commit is contained in:
parent
e856c04bbf
commit
f783d87bb0
1 changed files with 13 additions and 4 deletions
17
rc.darwin
17
rc.darwin
|
@ -34,8 +34,17 @@ function init-macos
|
|||
killall Dock
|
||||
|
||||
# Put screenshots in Google Drive, in a directory according to hostname
|
||||
name=`hostname -s | tr A-Z a-z`
|
||||
loc="$HOME/Google Drive/Screenshots/$name"
|
||||
mkdir -p "$loc"
|
||||
defaults write com.apple.screencapture location "$loc"
|
||||
icloud=`darwin-icloud-drive-path`
|
||||
if [[ -d "$icloud" ]]; then
|
||||
name=`hostname -s | tr A-Z a-z`
|
||||
loc="$icloud/Screenshots/$name"
|
||||
mkdir -p "$loc"
|
||||
defaults write com.apple.screencapture location "$loc"
|
||||
else
|
||||
echo "iCloud directory doesn't exist: $icloud"
|
||||
fi
|
||||
|
||||
echo "Disabling overly restrictive Gatekeeper"
|
||||
# See https://techstuffer.com/this-app-is-damaged-error-macos-sierra/
|
||||
sudo spctl --master-disable
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue