implement mpd client
This commit is contained in:
parent
4c81c0ca4a
commit
decdd636d4
2 changed files with 57 additions and 15 deletions
|
|
@ -26,18 +26,36 @@ else
|
|||
set -a message ""
|
||||
end
|
||||
|
||||
set options " Play/Pause" " Stop" " Next" " Previous" " Consume" " Random" " Repeat" " Single"
|
||||
set options " Play/Pause" " Stop" " Next" " Previous" " Clear Queue" " Consume" " Random" " Repeat" " Single"
|
||||
|
||||
set input (menu --mesg="$(mpc current --format "%artist% - %album% - %title%")
|
||||
$(string join -- ' ' $message)" $options)
|
||||
|
||||
switch $input
|
||||
case $options[1]
|
||||
mpc consume
|
||||
mpc toggle
|
||||
|
||||
case $options[2]
|
||||
mpc random
|
||||
mpc stop
|
||||
|
||||
case $options[3]
|
||||
mpc repeat
|
||||
mpc next
|
||||
|
||||
case $options[4]
|
||||
mpc prev
|
||||
|
||||
case $options[5]
|
||||
mpc clear
|
||||
|
||||
case $options[6]
|
||||
mpc consume
|
||||
|
||||
case $options[7]
|
||||
mpc random
|
||||
|
||||
case $options[8]
|
||||
mpc repeat
|
||||
|
||||
case $options[9]
|
||||
mpc single
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue