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 f474712b 2022-05-09 op .Dd May 9, 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 cfb00927 2022-02-17 op is a music player daemon and command-line utility that plays music
32 cfb00927 2022-02-17 op in the background.
33 cfb00927 2022-02-17 op The server is automatically started when the user interacts with
34 1d673950 2022-03-03 op it.
35 3baa2617 2022-02-16 op .Pp
36 3baa2617 2022-02-16 op The following options are available:
37 f474712b 2022-05-09 op .Bl -tag -width Ds
38 3baa2617 2022-02-16 op .It Fl d
39 1d673950 2022-03-03 op Do not daemonize if starting the daemon:
40 3baa2617 2022-02-16 op .Nm
41 161abbe5 2022-03-03 op will run in the foreground and log to standard error.
42 1d673950 2022-03-03 op It's ignored if any commands are given on the command line or if the
43 1d673950 2022-03-03 op server was already running.
44 3baa2617 2022-02-16 op .It Fl v
45 3baa2617 2022-02-16 op Produce more verbose output.
46 3baa2617 2022-02-16 op .It Fl s Ar socket
47 3baa2617 2022-02-16 op Use
48 3baa2617 2022-02-16 op .Ar socket
49 3baa2617 2022-02-16 op instead of the default
50 3baa2617 2022-02-16 op .Pa /tmp/amused-$UID
51 3baa2617 2022-02-16 op to communicate with the daemon.
52 1d673950 2022-03-03 op .It Ar command Op Ar argument ...
53 1d673950 2022-03-03 op Specify the command to run.
54 18282bc0 2022-03-09 op If no commands are specified,
55 1d673950 2022-03-03 op .Ic status
56 18282bc0 2022-03-09 op is assumed.
57 3baa2617 2022-02-16 op .El
58 3baa2617 2022-02-16 op .Pp
59 3baa2617 2022-02-16 op The following commands are available:
60 3baa2617 2022-02-16 op .Bl -tag -width 12m
61 3baa2617 2022-02-16 op .It Cm add Ar
62 3baa2617 2022-02-16 op Enqueue the given files.
63 3baa2617 2022-02-16 op .It Cm flush
64 3baa2617 2022-02-16 op Erase the playlist.
65 40aa47d9 2022-02-19 op .It Cm jump Ar pattern
66 40aa47d9 2022-02-19 op Play the first song in the playing queue that matches
67 40aa47d9 2022-02-19 op .Ar pattern
68 140010c2 2022-03-03 op .Pq a basic case-insensitive regexp .
69 ba7595d8 2022-02-17 op .It Cm load Op Ar file
70 ba7595d8 2022-02-17 op Load a playlist from
71 a1d30eac 2022-03-03 op .Ar file
72 a1d30eac 2022-03-03 op or standard input.
73 a1d30eac 2022-03-03 op A playlist is a list of paths to music files one per line optionally
74 a1d30eac 2022-03-03 op prefixed by
75 a1d30eac 2022-03-03 op .Sq > \&
76 a1d30eac 2022-03-03 op or two spaces.
77 a1d30eac 2022-03-03 op If the list was generated by
78 a1d30eac 2022-03-03 op .Nm
79 a1d30eac 2022-03-03 op .Ic show Fl p
80 56b5b3c6 2022-03-10 op restores also the currently played song, otherwise tries to match it in
81 56b5b3c6 2022-03-10 op the new list.
82 6b47a39f 2022-02-21 op .It Cm monitor
83 6b47a39f 2022-02-21 op Stop indefinitely and print the events as happen.
84 6b47a39f 2022-02-21 op Events are print one per line and are triggered either by other
85 6b47a39f 2022-02-21 op instances of
86 6b47a39f 2022-02-21 op .Nm
87 6b47a39f 2022-02-21 op issuing commands or the player itself anvancing the playing queue.
88 40aa47d9 2022-02-19 op .It Cm next
89 40aa47d9 2022-02-19 op Play the next song.
90 40aa47d9 2022-02-19 op .It Cm pause
91 40aa47d9 2022-02-19 op Pause the playback.
92 40aa47d9 2022-02-19 op .It Cm play
93 40aa47d9 2022-02-19 op Start or resume the playback.
94 40aa47d9 2022-02-19 op .It Cm prev
95 40aa47d9 2022-02-19 op Play the previous song.
96 3ec4f99d 2022-02-19 op .It Cm repeat one|all on|off
97 3ec4f99d 2022-02-19 op Enable or disable the repetition of the current track
98 3ec4f99d 2022-02-19 op .Pq Cm one
99 3ec4f99d 2022-02-19 op or of the playing queue
100 3ec4f99d 2022-02-19 op .Pq Cm all .
101 40aa47d9 2022-02-19 op .It Cm restart
102 40aa47d9 2022-02-19 op Rewind the current song to the beginning.
103 40aa47d9 2022-02-19 op .It Cm show Op Fl p
104 40aa47d9 2022-02-19 op Print the current playlist.
105 40aa47d9 2022-02-19 op With
106 40aa47d9 2022-02-19 op .Fl p
107 40aa47d9 2022-02-19 op it prints a
108 40aa47d9 2022-02-19 op .Dq pretty
109 40aa47d9 2022-02-19 op list with the current playing song prefixed by
110 40aa47d9 2022-02-19 op .Sq > \& .
111 40aa47d9 2022-02-19 op .It Cm status
112 40aa47d9 2022-02-19 op Print playback status and current song.
113 40aa47d9 2022-02-19 op .It Cm stop
114 40aa47d9 2022-02-19 op Stop the music player.
115 40aa47d9 2022-02-19 op .It Cm toggle
116 40aa47d9 2022-02-19 op Play/pause the playback.
117 3baa2617 2022-02-16 op .El
118 cfb00927 2022-02-17 op .Pp
119 494d8ca2 2022-03-03 op Commands can be abbreviated to the smallest unique prefix, for example
120 b25bcbd1 2022-02-19 op .Sq rep
121 cfb00927 2022-02-17 op can be given instead of
122 b25bcbd1 2022-02-19 op .Sq repeat .
123 3baa2617 2022-02-16 op .Sh FILES
124 3baa2617 2022-02-16 op .Bl -tag -width "/tmp/amused-$UID" -compact
125 3baa2617 2022-02-16 op .It Pa /tmp/amused-$UID
126 bf57ea43 2022-02-22 op .Ux Ns -domain
127 bf57ea43 2022-02-22 op socket used for communication with the daemon.
128 3baa2617 2022-02-16 op .El
129 2c35cd80 2022-02-17 op .Sh EXAMPLES
130 2c35cd80 2022-02-17 op Enqueue all mp3 files in the current directory:
131 2c35cd80 2022-02-17 op .Bd -literal -offset indent
132 2c35cd80 2022-02-17 op $ amused add *.mp3
133 2c35cd80 2022-02-17 op .Ed
134 2c35cd80 2022-02-17 op .Pp
135 2c35cd80 2022-02-17 op Recursively add all opus files:
136 2c35cd80 2022-02-17 op .Bd -literal -offset indent
137 2c35cd80 2022-02-17 op $ find . -type f -iname \\*.opus -exec amused add {} +
138 2c35cd80 2022-02-17 op .Ed
139 2c35cd80 2022-02-17 op .Pp
140 2c35cd80 2022-02-17 op Save the state of the player to the file
141 2c35cd80 2022-02-17 op .Pa state :
142 2c35cd80 2022-02-17 op .Bd -literal -offset indent
143 19dc5a22 2022-03-03 op $ amused show -p > state
144 2c35cd80 2022-02-17 op .Ed
145 2c35cd80 2022-02-17 op .Pp
146 2c35cd80 2022-02-17 op Load a previous state:
147 2c35cd80 2022-02-17 op .Bd -literal -offset indent
148 2c35cd80 2022-02-17 op $ amused load < state
149 2c35cd80 2022-02-17 op .Ed
150 19ae7661 2022-02-17 op .Pp
151 19ae7661 2022-02-17 op Randomize the current playlist:
152 19ae7661 2022-02-17 op .Bd -literal -offset indent
153 19ae7661 2022-02-17 op $ amused show | sort -R | amused load
154 19ae7661 2022-02-17 op .Ed
155 19ae7661 2022-02-17 op .Pp
156 19ae7661 2022-02-17 op Remove duplicates:
157 19ae7661 2022-02-17 op .Bd -literal -offset indent
158 19ae7661 2022-02-17 op $ amused show | sort | uniq | amused load
159 19ae7661 2022-02-17 op .Ed
160 99b9b3af 2022-02-17 op .Pp
161 99b9b3af 2022-02-17 op Select a song with
162 99b9b3af 2022-02-17 op .Xr fzf 1
163 99b9b3af 2022-02-17 op .Bd -literal -offset indent
164 99b9b3af 2022-02-17 op $ amused jump "$(amused show | fzf +s)"
165 99b9b3af 2022-02-17 op .Ed
166 3baa2617 2022-02-16 op .Sh AUTHORS
167 3baa2617 2022-02-16 op .An -nosplit
168 3baa2617 2022-02-16 op Then
169 3baa2617 2022-02-16 op .Nm
170 3baa2617 2022-02-16 op utility was written by
171 3baa2617 2022-02-16 op .An Omar Polo Aq Mt op@openbsd.org .
172 81a49db1 2022-02-24 op .Sh BUGS
173 81a49db1 2022-02-24 op .Nm
174 81a49db1 2022-02-24 op looks at the file name to determine the file type,
175 81a49db1 2022-02-24 op .Xr magic 5
176 81a49db1 2022-02-24 op should be used instead.