ZZQZL2APVQWSZQB3LU22QBJ4XABXFO3P57IDEARTSDUHARGFMOCAC VQ2DEF34BLM3WZP2NQXT2US6T6Q5AH2KAHCU5JUV4FLR3Z2SB7XAC TV3UCUKAIECQR4QCXWDN3YZVSZ3RKXE6466TWLWGCKDJ2JAIYLMQC JYWJMGAXOKDI6WWDRIZYEKJV67PROQI3RVGNFAIR6QAGEGNHBMTAC 4BXYTJPI3YWWXJ4JFUNFUO6ANCMJNALQ7L3XK3U3AXQGFDV7CAEQC 674WSHB4WR6RY67PKK53GYUBY22BRMFHYNRLOTWE66CWJI2RNMJAC 57YU55IK55Q4QDV45LD3ILNQDQV46NKLYK3HS6VWR2SDTOFSYXKAC T43Q2EZ2JQWK4WMW7RRYU7MNP3QJJXW4BQKIQMRYFCGKHL7FJ7SQC K5PQ626TQQRIYJPYDZ5OM77ZIBX2G2QXALFRJCSKVF3PKO37C7KAC RBBBDTNM7J6BR3SUIZQQ3FATAVWTXFQ5472JJGVH3TC37VYGSTFAC 73ADP3OYJPH4DOQU3G3VS4T66GCP5EQF5FWRRLTLCTSTDGHCEAUQC QJLEFROGUIQZ2UTL4EIGVXNBX5QJ5PSDAPWNYQESZDL6WHJPXF7AC alias to_plain_text='textutil -convert txt -stdin -stdout -encoding 30'alias copy='to_plain_text | pbcopy'alias fullcopy=pbcopyalias paste=pbpaste# open finder in $PWDalias finder="open -a Finder ."# change directories into the directory of top most finder windowalias cdfinder="cd `osascript < $DOTFILES/applescripts/finder_cwd.applescript`"function preview {# open a file in the default macOS previewqlmanage -p "$@" &> /dev/null}function trash {# put a file in the macOS default trash foldercommand mv "$@" ~/.Trash}function start_screensaver {/System/Library/CoreServices/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine}function lock_computer {/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend}function toggle_desktop_icons {case `defaults read com.apple.finder CreateDesktop 2> /dev/null` in0) enable="true";;1) enable="false";;*) enable="false";;esacdefaults write \com.apple.finder \CreateDesktop -bool $enable \&& killall Finder}function toggle_autocorrect_mode {case `defaults read -g NSAutomaticSpellingCorrectionEnabled 2> /dev/null` in0) enable="true";;1) enable="false";;*) enable="false";;esacdefaults write -g NSAutomaticSpellingCorrectionEnabled -bool $enable}function toggle_system_ui_keyboard_behavior {# 0 is default, 3 enables things like tab in system dialogs# https://github.com/herrbischoff/awesome-macos-command-line#full-keyboard-accesscase `defaults read NSGlobalDomain AppleKeyboardUIMode 2> /dev/null` in0) value=3;;3) value=0;;*) value=0;;esacdefaults write NSGlobalDomain AppleKeyboardUIMode -int $value}function toggle_hidden_files_in_finder {case `defaults read com.apple.finder AppleShowAllFiles 2> /dev/null` in"false") value="true";;"true") value="false";;*) value="true";;esacdefaults write com.apple.finder AppleShowAllFiles $value && killall Finder}
MACOS_FUNCTIONS=$DOTFILES/zsh/macos_functionsfpath=($MACOS_FUNCTIONS $fpath)for func in $(ls $MACOS_FUNCTIONS); do autoload $func; done;
# put a file in the macOS default trash foldercommand mv "$@" ~/.Trash
# 0 is default, 3 enables things like tab in system dialogs# https://github.com/herrbischoff/awesome-macos-command-line#full-keyboard-accesscase `defaults read NSGlobalDomain AppleKeyboardUIMode 2> /dev/null` in0) value=3;;3) value=0;;*) value=0;;esacdefaults write NSGlobalDomain AppleKeyboardUIMode -int $value
case `defaults read com.apple.finder AppleShowAllFiles 2> /dev/null` in"false") value="true";;"true") value="false";;*) value="true";;esacdefaults write com.apple.finder AppleShowAllFiles $value && killall Finder
case `defaults read com.apple.finder CreateDesktop 2> /dev/null` in0) enable="true";;1) enable="false";;*) enable="false";;esacdefaults write \com.apple.finder \CreateDesktop -bool $enable \&& killall Finder
case `defaults read -g NSAutomaticSpellingCorrectionEnabled 2> /dev/null` in0) enable="true";;1) enable="false";;*) enable="false";;esacdefaults write -g NSAutomaticSpellingCorrectionEnabled -bool $enable
textutil -convert txt -stdin -stdout -encoding 30
/System/Library/CoreServices/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine
# open a file in the default macOS previewqlmanage -p "$@" &> /dev/null
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
# open finder in $PWDopen -a Finder .
to_plain_text | pbcopy
cd `osascript < $DOTFILES/applescripts/finder_cwd.applescript`
# remove empty lines, leading and trailing whitespacesed '/^$/d' | sed -e 's/^ *//' | sed -e 's/ *$//'
date +%Y-%m-%d
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export NVM_DIR="$HOME/.nvm"[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion