[zsh] Move func/ directory to zsh/functions
This commit is contained in:
parent
91da2fc583
commit
7c08c5131f
53 changed files with 1 additions and 1 deletions
21
zsh/functions/darwin_configure_screenshots_directory
Normal file
21
zsh/functions/darwin_configure_screenshots_directory
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env zsh
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
autoload darwin_icloud_drive_path
|
||||
|
||||
icloud=`darwin_icloud_drive_path`
|
||||
if [[ ! -d "$icloud" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Put screenshots in iCloud Drive, in a directory according to hostname
|
||||
local name=`hostname -s | tr A-Z a-z | tr ' ' -`
|
||||
local screenshots_dir="$icloud/Screenshots/$name"
|
||||
mkdir -p "$screenshots_dir"
|
||||
|
||||
echo "$screenshots_dir"
|
||||
defaults write com.apple.screencapture screenshots_diration "$screenshots_dir"
|
||||
|
||||
killall Dock
|
||||
|
||||
return 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue