mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
merge
This commit is contained in:
commit
982c4c0f83
17 changed files with 636 additions and 20 deletions
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue