Blame


1 3baa2617 2022-02-16 op .\" Copyright (c) 2022 Omar Polo <op@openbsd.org>
2 3baa2617 2022-02-16 op .\"
3 3baa2617 2022-02-16 op .\" Permission to use, copy, modify, and distribute this software for any
4 3baa2617 2022-02-16 op .\" purpose with or without fee is hereby granted, provided that the above
5 3baa2617 2022-02-16 op .\" copyright notice and this permission notice appear in all copies.
6 3baa2617 2022-02-16 op .\"
7 3baa2617 2022-02-16 op .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 3baa2617 2022-02-16 op .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 3baa2617 2022-02-16 op .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 3baa2617 2022-02-16 op .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 3baa2617 2022-02-16 op .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 3baa2617 2022-02-16 op .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 3baa2617 2022-02-16 op .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 3baa2617 2022-02-16 op .\"
15 b0d2a966 2022-05-19 op .Dd May 19, 2022
16 3baa2617 2022-02-16 op .Dt AMUSED 1
17 3baa2617 2022-02-16 op .Os
18 3baa2617 2022-02-16 op .Sh NAME
19 3baa2617 2022-02-16 op .Nm amused
20 3baa2617 2022-02-16 op .Nd music player
21 3baa2617 2022-02-16 op .Sh SYNOPSIS
22 3baa2617 2022-02-16 op .Nm
23 3baa2617 2022-02-16 op .Op Fl dv
24 3baa2617 2022-02-16 op .Op Fl s Ar socket
25 1d673950 2022-03-03 op .Oo
26 3baa2617 2022-02-16 op .Ar command
27 3baa2617 2022-02-16 op .Op Ar argument ...
28 1d673950 2022-03-03 op .Oc
29 3baa2617 2022-02-16 op .Sh DESCRIPTION
30 3baa2617 2022-02-16 op .Nm
31 a6d90fb2 2022-05-10 op is a music player daemon and command-line utility to plays music.
32 a6d90fb2 2022-05-10 op The server is started automatically in the background on demand.
33 3baa2617 2022-02-16 op .Pp
34 3baa2617 2022-02-16 op The following options are available:
35 f474712b 2022-05-09 op .Bl -tag -width Ds
36 3baa2617 2022-02-16 op .It Fl d
37 b0d2a966 2022-05-19 op Do not daemonize:
38 3baa2617 2022-02-16 op .Nm
39 161abbe5 2022-03-03 op will run in the foreground and log to standard error.
40 1d673950 2022-03-03 op It's ignored if any commands are given on the command line or if the
41 a6d90fb2 2022-05-10 op server is already running.
42 3baa2617 2022-02-16 op .It Fl v
43 3baa2617 2022-02-16 op Produce more verbose output.
44 3baa2617 2022-02-16 op .It Fl s Ar socket
45 3baa2617 2022-02-16 op Use
46 3baa2617 2022-02-16 op .Ar socket
47 3baa2617 2022-02-16 op instead of the default
48 3baa2617 2022-02-16 op .Pa /tmp/amused-$UID
49 3baa2617 2022-02-16 op to communicate with the daemon.
50 1d673950 2022-03-03 op .It Ar command Op Ar argument ...
51 1d673950 2022-03-03 op Specify the command to run.
52 18282bc0 2022-03-09 op If no commands are specified,
53 1d673950 2022-03-03 op .Ic status
54 18282bc0 2022-03-09 op is assumed.
55 3baa2617 2022-02-16 op .El
56 3baa2617 2022-02-16 op .Pp
57 3baa2617 2022-02-16 op The following commands are available:
58 26caf091 2022-05-14 op .Bl -tag -width Ds
59 3baa2617 2022-02-16 op .It Cm add Ar
60 3baa2617 2022-02-16 op Enqueue the given files.
61 3baa2617 2022-02-16 op .It Cm flush
62 3baa2617 2022-02-16 op Erase the playlist.
63 40aa47d9 2022-02-19 op .It Cm jump Ar pattern
64 40aa47d9 2022-02-19 op Play the first song in the playing queue that matches
65 40aa47d9 2022-02-19 op .Ar pattern
66 140010c2 2022-03-03 op .Pq a basic case-insensitive regexp .
67 ba7595d8 2022-02-17 op .It Cm load Op Ar file
68 ba7595d8 2022-02-17 op Load a playlist from
69 a1d30eac 2022-03-03 op .Ar file
70 a1d30eac 2022-03-03 op or standard input.
71 a6d90fb2 2022-05-10 op A playlist is a list of paths to music files given one per line
72 a6d90fb2 2022-05-10 op and optionally prefixed by
73 a1d30eac 2022-03-03 op .Sq > \&
74 a1d30eac 2022-03-03 op or two spaces.
75 a1d30eac 2022-03-03 op If the list was generated by
76 a1d30eac 2022-03-03 op .Nm
77 a1d30eac 2022-03-03 op .Ic show Fl p
78 a6d90fb2 2022-05-10 op restores also the position in the playlist, otherwise if already playing
79 a6d90fb2 2022-05-10 op something tries to match the currently playing song in the new list.
80 a6d90fb2 2022-05-10 op Failing that, the playlist will be played from the first track onwards.
81 90122a37 2022-05-14 op .It Cm monitor Op Ar events
82 90122a37 2022-05-14 op Stop indefinitely and print when an event in the comma-separated list of
83 90122a37 2022-05-14 op .Ar events
84 90122a37 2022-05-14 op happen.
85 90122a37 2022-05-14 op By default logs every event.
86 90122a37 2022-05-14 op The
87 90122a37 2022-05-14 op .Ar events
88 90122a37 2022-05-14 op are triggered either by other instances of
89 6b47a39f 2022-02-21 op .Nm
90 a6d90fb2 2022-05-10 op issuing commands or the player itself anvancing through the playing
91 a6d90fb2 2022-05-10 op queue.
92 90122a37 2022-05-14 op The events name take after the command name that generates it, e.g.\&
93 90122a37 2022-05-14 op .Ar play ,
94 90122a37 2022-05-14 op .Ar toggle ,
95 90122a37 2022-05-14 op .Ar ...
96 40aa47d9 2022-02-19 op .It Cm next
97 40aa47d9 2022-02-19 op Play the next song.
98 40aa47d9 2022-02-19 op .It Cm pause
99 40aa47d9 2022-02-19 op Pause the playback.
100 40aa47d9 2022-02-19 op .It Cm play
101 40aa47d9 2022-02-19 op Start or resume the playback.
102 40aa47d9 2022-02-19 op .It Cm prev
103 40aa47d9 2022-02-19 op Play the previous song.
104 3ec4f99d 2022-02-19 op .It Cm repeat one|all on|off
105 a6d90fb2 2022-05-10 op Enable or disable the automatic repetition of the current track
106 3ec4f99d 2022-02-19 op .Pq Cm one
107 a6d90fb2 2022-05-10 op or of the whole playing queue
108 3ec4f99d 2022-02-19 op .Pq Cm all .
109 40aa47d9 2022-02-19 op .It Cm restart
110 40aa47d9 2022-02-19 op Rewind the current song to the beginning.
111 40aa47d9 2022-02-19 op .It Cm show Op Fl p
112 40aa47d9 2022-02-19 op Print the current playlist.
113 40aa47d9 2022-02-19 op With
114 40aa47d9 2022-02-19 op .Fl p
115 40aa47d9 2022-02-19 op it prints a
116 40aa47d9 2022-02-19 op .Dq pretty
117 40aa47d9 2022-02-19 op list with the current playing song prefixed by
118 40aa47d9 2022-02-19 op .Sq > \& .
119 40aa47d9 2022-02-19 op .It Cm status
120 40aa47d9 2022-02-19 op Print playback status and current song.
121 40aa47d9 2022-02-19 op .It Cm stop
122 40aa47d9 2022-02-19 op Stop the music player.
123 40aa47d9 2022-02-19 op .It Cm toggle
124 40aa47d9 2022-02-19 op Play/pause the playback.
125 3baa2617 2022-02-16 op .El
126 cfb00927 2022-02-17 op .Pp
127 494d8ca2 2022-03-03 op Commands can be abbreviated to the smallest unique prefix, for example
128 b25bcbd1 2022-02-19 op .Sq rep
129 cfb00927 2022-02-17 op can be given instead of
130 b25bcbd1 2022-02-19 op .Sq repeat .
131 4d78a5af 2022-06-12 op .Pp
132 4d78a5af 2022-06-12 op .Nm
133 4d78a5af 2022-06-12 op skips non-regular or not supported audio file found in the playing
134 4d78a5af 2022-06-12 op queue implicitly and advances to the next item.
135 3baa2617 2022-02-16 op .Sh FILES
136 3baa2617 2022-02-16 op .Bl -tag -width "/tmp/amused-$UID" -compact
137 3baa2617 2022-02-16 op .It Pa /tmp/amused-$UID
138 bf57ea43 2022-02-22 op .Ux Ns -domain
139 bf57ea43 2022-02-22 op socket used for communication with the daemon.
140 3baa2617 2022-02-16 op .El
141 2c35cd80 2022-02-17 op .Sh EXAMPLES
142 2c35cd80 2022-02-17 op Enqueue all mp3 files in the current directory:
143 2c35cd80 2022-02-17 op .Bd -literal -offset indent
144 2c35cd80 2022-02-17 op $ amused add *.mp3
145 2c35cd80 2022-02-17 op .Ed
146 2c35cd80 2022-02-17 op .Pp
147 2c35cd80 2022-02-17 op Recursively add all opus files:
148 2c35cd80 2022-02-17 op .Bd -literal -offset indent
149 2c35cd80 2022-02-17 op $ find . -type f -iname \\*.opus -exec amused add {} +
150 2c35cd80 2022-02-17 op .Ed
151 2c35cd80 2022-02-17 op .Pp
152 2c35cd80 2022-02-17 op Save the state of the player to the file
153 2c35cd80 2022-02-17 op .Pa state :
154 2c35cd80 2022-02-17 op .Bd -literal -offset indent
155 19dc5a22 2022-03-03 op $ amused show -p > state
156 2c35cd80 2022-02-17 op .Ed
157 2c35cd80 2022-02-17 op .Pp
158 2c35cd80 2022-02-17 op Load a previous state:
159 2c35cd80 2022-02-17 op .Bd -literal -offset indent
160 2c35cd80 2022-02-17 op $ amused load < state
161 2c35cd80 2022-02-17 op .Ed
162 19ae7661 2022-02-17 op .Pp
163 a6d90fb2 2022-05-10 op Shuffle the playlist:
164 19ae7661 2022-02-17 op .Bd -literal -offset indent
165 19ae7661 2022-02-17 op $ amused show | sort -R | amused load
166 19ae7661 2022-02-17 op .Ed
167 19ae7661 2022-02-17 op .Pp
168 19ae7661 2022-02-17 op Remove duplicates:
169 19ae7661 2022-02-17 op .Bd -literal -offset indent
170 19ae7661 2022-02-17 op $ amused show | sort | uniq | amused load
171 19ae7661 2022-02-17 op .Ed
172 99b9b3af 2022-02-17 op .Pp
173 99b9b3af 2022-02-17 op Select a song with
174 99b9b3af 2022-02-17 op .Xr fzf 1
175 99b9b3af 2022-02-17 op .Bd -literal -offset indent
176 99b9b3af 2022-02-17 op $ amused jump "$(amused show | fzf +s)"
177 99b9b3af 2022-02-17 op .Ed
178 3baa2617 2022-02-16 op .Sh AUTHORS
179 3baa2617 2022-02-16 op .An -nosplit
180 3baa2617 2022-02-16 op Then
181 3baa2617 2022-02-16 op .Nm
182 3baa2617 2022-02-16 op utility was written by
183 3baa2617 2022-02-16 op .An Omar Polo Aq Mt op@openbsd.org .