1 .\" Copyright (c) 2022 Omar Polo <op@openbsd.org>
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.
43 Produce more verbose output.
47 instead of the default
49 to communicate with the daemon.
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|off
62 When consume mode is enabled the tracks are removed from the playlist
63 once played til the end.
66 .It Cm jump Ar pattern
67 Play the first song in the playing queue that matches
69 .Pq a basic case-insensitive regexp .
70 .It Cm load Op Ar file
74 A playlist is a list of paths to music files given one per line
75 and optionally prefixed by
78 If the list was generated by
81 restore also the position in the playlist.
82 Otherwise, if already playing something, try to match the currently
84 Failing that, the playlist will be played from the first track
86 .It Cm monitor Op Ar events
87 Stop indefinitely and print when an event in the comma-separated list
90 happened, or all if not given.
95 .Bl -tag -compact -width Ds
97 Added a song to the playlist.
99 Jumped to a different song in the playlist.
101 Loaded a new playlist.
104 .Pq repeat or consume .
106 Advanced to next song.
110 Playing or resuming a song.
112 Gone back to previous song.
114 Seeked in the current track.
123 Start or resume the playback.
125 Play the previous song.
126 .It Cm repeat one|all Op Cm on|off
127 Enable or disable the automatic repetition of the current track
129 or of the whole playing queue
132 Rewind the current song to the beginning.
137 .It Cm seek Oo Oo Ar hours : Oc Ns Ar minutes : Oc Ns Ar seconds | Ar percentage Ns %
138 Seek by the specified amount of time into the current song.
139 If the argument is prefixed by either
143 then the seek is relative to the current position.
150 list with the current playing song prefixed by
152 .It Cm status Op Fl f Ar format
153 Print playback status and current song.
156 is a comma-separated list of words that select the information to
159 .Ev AMUSED_STATUS_FORMAT
161 .Dq status,time,repeat
163 The format available are:
165 .Bl -tag -compact -width time:percentage
167 Path of the current song
169 Repeat status in a single line.
171 Repeat all and repeat one status, one per line.
173 Playback status by the path to the current song.
175 Position and duration in a single line.
177 Percentage of the current position.
179 Current position and duration in seconds.
181 Current position and duration in a human-readable format.
184 Stop the music player.
186 Play/pause the playback.
189 Commands can be abbreviated to a unique prefix, for example
191 can be given instead of
195 automatically skips and removes from the playlist non-regular files by
197 Files with non recognized audio format are skippend and removed from
200 .Bl -tag -width AMUSED_STATUS_FORMAT
201 .It Ev AMUSED_STATUS_FORMAT
202 The default format used by
207 .Bl -tag -width "/tmp/amused-$UID" -compact
208 .It Pa /tmp/amused-$UID
210 socket used for communication with the daemon.
213 Enqueue all mp3 files in the current directory:
214 .Bd -literal -offset indent
218 Recursively add all opus files:
219 .Bd -literal -offset indent
220 $ find . -type f -iname \\*.opus -exec amused add {} +
223 Load every file under the current directory recursively:
224 .Bd -literal -offset indent
225 $ find . | amused load
228 Save the state of the player to the file
230 .Bd -literal -offset indent
231 $ amused show -p > state
234 Load a previous state:
235 .Bd -literal -offset indent
236 $ amused load < state
239 Shuffle the playlist:
240 .Bd -literal -offset indent
241 $ amused show | sort -R | amused load
245 .Bd -literal -offset indent
246 $ amused show | sort | uniq | amused load
251 .Bd -literal -offset indent
252 $ amused jump "$(amused show | fzf +s)"
258 utility was written by
259 .An Omar Polo Aq Mt op@openbsd.org .