b7f51bbbdd9f0d9ff9ef59b559e91b916d53cdf1
- Author
- Josh Datko <jbdatko@gmail.com>
- Committer
- Josh Datko <jbdatko@gmail.com>
- Date
Message
Adds itunes vol command.
Adds itunes vol, which takes an argument from 0 to 100 to set the
volume from the shell.
Diff
1diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
2index 63760b5ffd04dde6e62d4535ee82cb7fdac5d011..a63f0ee053ccbcbf0182660a04991754e1979268 100644
3--- a/plugins/osx/osx.plugin.zsh
4+++ b/plugins/osx/osx.plugin.zsh
5@@ -174,12 +174,16 @@ function itunes() {
6 next|previous)
7 opt="$opt track"
8 ;;
9+ vol)
10+ opt="set sound volume to $1" #$1 Due to the shift
11+ ;;
12 ""|-h|--help)
13 echo "Usage: itunes <option>"
14 echo "option:"
15 echo "\tlaunch|play|pause|stop|rewind|resume|quit"
16 echo "\tmute|unmute\tcontrol volume set"
17 echo "\tnext|previous\tplay next or previous track"
18+ echo "\tvol\tSet the volume, takes an argument from 0 to 100"
19 echo "\thelp\tshow this message and exit"
20 return 0
21 ;;
22@@ -190,4 +194,3 @@ function itunes() {
23 esac
24 osascript -e "tell application \"iTunes\" to $opt"
25 }
26-