# # Defines Mac OS X aliases and functions. # # Authors: # Sorin Ionescu # # Return if requirements are not found. if [[ "$OSTYPE" != darwin* ]]; then return 1 fi # # Aliases # # Changes directory to the current Finder directory. alias cdf='cd "$(pfd)"' # Pushes directory to the current Finder directory. alias pushdf='pushd "$(pfd)"' # Locks screen. alias lock='/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend' # Saves a screen shot to the current directory with 1s delay for app switching. alias snap="screencapture -T 1 "Screen Shot $(date +'%Y-%m-%d') at $(date +"%I.%M.%S %p").png";" # Mutes/Unmutes the system volume. alias mute="osascript -e 'set volume output muted true'" alias unmute="osascript -e 'set volume output muted false'"