[zsh] Fix up iCloud docs function and darwin-init

This commit is contained in:
Eryn Wells 2021-03-02 08:37:09 -08:00
parent b9479c410d
commit cec88d75a9

View file

@ -24,7 +24,7 @@ unset SOUNDSDIR
function darwin-icloud-drive-path function darwin-icloud-drive-path
{ {
echo "$HOME/Library/Mobile\ Documents/com\~apple\~CloudDocs" echo "$HOME/Library/Mobile Documents/com~apple~CloudDocs"
} }
function darwin-init function darwin-init
@ -38,7 +38,7 @@ function darwin-init
icloud=`darwin-icloud-drive-path` icloud=`darwin-icloud-drive-path`
if [[ -d "$icloud" ]]; then if [[ -d "$icloud" ]]; then
local name=`hostname -s | tr A-Z a-z` local name=`hostname -s | tr A-Z a-z`
local loc="`darwin-icloud-drive-path`/Screenshots/$name" local loc="$(darwin-icloud-drive-path)/Screenshots/$name"
print_info "Setting screenshot directory: $loc" print_info "Setting screenshot directory: $loc"
mkdir -p "$loc" mkdir -p "$loc"
defaults write com.apple.screencapture location "$loc" defaults write com.apple.screencapture location "$loc"