This commit is contained in:
tinogomes 2013-11-12 17:18:07 -02:00
commit 982c4c0f83
17 changed files with 636 additions and 20 deletions

View file

@ -162,7 +162,37 @@ function lock() {
open -a ScreenSaverEngine
}
# Listen the faggy song
alias faggy='say -v Good\ News faggy faggy faggy faggy faggy faggy faggy faggy'
alias ssh-key-copy="cat ~/.ssh/id_rsa.pub | pbcopy"
# iTunes control function
function itunes() {
local opt=$1
shift
case "$opt" in
launch|play|pause|stop|rewind|resume|quit)
;;
mute)
opt="set mute to true"
;;
unmute)
opt="set mute to false"
;;
next|previous)
opt="$opt track"
;;
""|-h|--help)
echo "Usage: itunes <option>"
echo "option:"
echo "\tlaunch|play|pause|stop|rewind|resume|quit"
echo "\tmute|unmute\tcontrol volume set"
echo "\tnext|previous\tplay next or previous track"
echo "\thelp\tshow this message and exit"
return 0
;;
*)
print "Unkonwn option: $opt"
return 1
;;
esac
osascript -e "tell application \"iTunes\" to $opt"
}