1 .\" Copyright (c) 2022, 2023 Omar Polo <op@omarpolo.com>
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
31 is a music player daemon and command-line utility to play music.
32 The server is started automatically in the background on demand.
34 The following options are available:
39 will run in the foreground and log to standard error.
40 It's ignored if any commands are given on the command line or if the
41 server is already running.
45 instead of the default
47 to communicate with the daemon.
49 Produce more verbose output.
50 .It Ar command Op Ar argument ...
51 Specify the command to run.
52 If no commands are specified,
57 The following commands are available:
60 Enqueue the given files.
61 .It Cm consume Op Cm on Ns | Ns Cm off
62 Enable or disable the consume mode.
63 When consume mode is enabled the tracks are removed from the playlist
64 once played until the end.
65 Without arguments toggle the current status.
68 .It Cm jump Ar pattern
69 Play the first song in the playing queue that matches
71 .Pq a basic case-insensitive regexp .
72 .It Cm load Op Ar file
76 A playlist is a list of paths to music files given one per line
77 and optionally prefixed by
80 If the list was generated by
83 restore also the position in the playlist.
84 Otherwise, if already playing something, try to match the currently
86 Failing that, the playlist will be played from the first track
88 .It Cm monitor Op Ar events
89 Stop indefinitely and print when an event in the comma-separated list
92 happened, or all if not given.
97 .Bl -tag -compact -width Ds
99 Added a song to the playlist.
101 Jumped to a different song in the playlist.
103 Loaded a new playlist.
106 .Pq repeat or consume .
108 Advanced to next song.
112 Playing or resuming a song.
114 Gone back to previous song.
116 Seeked in the current track.
125 Start or resume the playback.
127 Play the previous song.
128 .It Cm repeat one Ns | Ns Cm all Op Cm on Ns | Ns Cm off
129 Enable or disable the automatic repetition of the current track
131 or of the whole playing queue
133 Without arguments toggle the given repeat mode.
135 Rewind the current song to the beginning.
140 .It Cm seek Oo Oo Ar hours : Oc Ns Ar minutes : Oc Ns Ar seconds | Ar percentage Ns %
141 Seek by the specified amount of time into the current song.
142 If the argument is prefixed by either
146 then the seek is relative to the current position.
153 list with the current playing song prefixed by
155 .It Cm status Op Fl f Ar format
156 Print playback status and current song.
159 is a comma-separated list of words that select the information to
162 .Ev AMUSED_STATUS_FORMAT
164 .Dq status,time:oneline,mode:oneline
166 The formats available are:
168 .Bl -tag -compact -width time:percentage
170 Path of the current song
172 Mode status in a single line.
174 Repeat all, one and consume, one per line.
176 Playback status by the path to the current song.
178 Position and duration in a single line.
180 Percentage of the current position.
182 Current position and duration in seconds.
184 Current position and duration in a human-readable format.
189 Play/pause the playback.
192 Commands can be abbreviated to a unique prefix, for example
194 can be given instead of
198 automatically skips and removes from the playlist non-regular files
199 or ones with a non-recognized audio format.
201 .Bl -tag -width AMUSED_STATUS_FORMAT
202 .It Ev AMUSED_STATUS_FORMAT
203 The default format used by
207 Path to the directory where the control socket is created.
212 .Bl -tag -width "/tmp/amused-UID" -compact
213 .It Pa /tmp/amused-UID
215 socket used for communication with the daemon.
218 Load every file under the current directory recursively:
219 .Bd -literal -offset indent
220 $ find . | amused load
223 Enqueue all mp3 files in the current directory:
224 .Bd -literal -offset indent
228 Recursively add all opus files:
229 .Bd -literal -offset indent
230 $ find . -type f -iname \\*.opus -exec amused add {} +
233 Save the state of the player to the file
235 .Bd -literal -offset indent
236 $ amused show -p > amused.dump
239 Load a previous state:
240 .Bd -literal -offset indent
241 $ amused load < amused.dump
244 Shuffle the playlist:
245 .Bd -literal -offset indent
246 $ amused show | sort -R | amused load
250 .Bd -literal -offset indent
251 $ amused show | sort | uniq | amused load
256 .Bd -literal -offset indent
257 $ amused jump "$(amused show | fzf +s)"
263 utility was written by
264 .An Omar Polo Aq Mt op@omarpolo.com .