You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
820 B
31 lines
820 B
#
|
|
# Defines Mac OS X aliases and functions.
|
|
#
|
|
# Authors:
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
#
|
|
|
|
# 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'" |