mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
a165c91512
2 changed files with 35 additions and 1 deletions
|
|
@ -157,3 +157,37 @@ function trash() {
|
|||
function vncviewer() {
|
||||
open vnc://$@
|
||||
}
|
||||
|
||||
# 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"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ if [[ ${_plugin__forwarding} == "yes" && -n "$SSH_AUTH_SOCK" ]]; then
|
|||
elif [ -f "${_plugin__ssh_env}" ]; then
|
||||
# Source SSH settings, if applicable
|
||||
. ${_plugin__ssh_env} > /dev/null
|
||||
ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
|
||||
ps x | grep ${SSH_AGENT_PID} | grep ssh-agent > /dev/null || {
|
||||
_plugin__start_agent;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue