-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmpdctl
executable file
·66 lines (62 loc) · 2.49 KB
/
mpdctl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
#
# ############################################################################
# Project: scripts (none)
# File...: mpdctl
# Created: Sunday, 2023/07/16 - 12:05:00
# Author.: @fbnmtz, ([email protected])
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Last Modified: Monday, 2024/12/09 - 17:40:07
# Modified By..: @fbnmtz, ([email protected])
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Version: 1.0.12.176
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Description:
# >
# ############################################################################
# HISTORY:
#
# shellcheck disable=SC1090
source "$xSHELL_INIT"
use args mpdctl.lib
xrequirements mpd mpc pkill
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~
xarg --group "Music Options"
xarg --id -p,--play --var f:p --desc "play music of current playlist"
xarg --id -N,--next --var f:n --desc "next music"
xarg --id -P,--prev --var f:P --desc "previous music"
xarg --id -t,--toggle --var f:t --desc "toggle music"
xarg --id -A,--all --var f:A --desc "play all music on database"
xarg --id -c,--current --var f:c --desc "show current music"
xarg --id -l,--list-play --var f:l --desc "select and play music"
xarg --id -L,--playlist --var f:L --desc "playlists functions"
xarg --id -s,--status --var f:s --desc "music status"
xarg --id -w,--watch --var f:w --desc "watch music status"
xarg --id -o,--options --var f:o,value+r --desc "set options (s|single)(r|repeat)(z|random)"
xarg --group "Server Options"
xarg --id -r,--run --var f:r --desc "start MPD server"
xarg --id -S,--stats --var f:S --desc "MPD server stats"
xarg --id -q,--quit --var f:q --desc "stop MPD server"
xarg --id -u,--update --var f:u --desc "update MPD database"
xrun --xreject-unknow --xrequire-one --xversionrc --xcolors "$@"
# verify MPD
_mpd_check_
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~
# shellcheck disable=SC2154
case "$f" in
p) mpc play ;;
n) mpc next ;;
P) mpc prev ;;
t) mpc toggle ;;
A) mPlayAll ;;
c) mpc current ;;
l) mListPlay ;;
L) mPlaylists ;;
s) mpc stats ;;
w) mWatch ;;
r) mpd & ;;
S) mpc status ;;
q) pkill mpd ;;
u) mUpdate ;;
o) mOptions ;;
esac