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 2b907c6d 2022-02-17 op .Dd February 17, 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 3baa2617 2022-02-16 op .Ar command
26 3baa2617 2022-02-16 op .Op Ar argument ...
27 3baa2617 2022-02-16 op .Sh DESCRIPTION
28 3baa2617 2022-02-16 op .Nm
29 3baa2617 2022-02-16 op is a music player daemon and command-line utility.
30 3baa2617 2022-02-16 op .Pp
31 3baa2617 2022-02-16 op If called without any sub-
32 3baa2617 2022-02-16 op .Ar command
33 3baa2617 2022-02-16 op it forks in the background and starts the daemon.
34 3baa2617 2022-02-16 op Once the daemon is running, music files can be enqueued and the reproduction
35 3baa2617 2022-02-16 op controlled.
36 3baa2617 2022-02-16 op .Pp
37 3baa2617 2022-02-16 op The following options are available:
38 3baa2617 2022-02-16 op .Bl -tag -width 12m
39 3baa2617 2022-02-16 op .It Fl d
40 3baa2617 2022-02-16 op Do not daemonize.
41 3baa2617 2022-02-16 op if this option is specified,
42 3baa2617 2022-02-16 op .Nm
43 3baa2617 2022-02-16 op will run in the foreground and log to
44 3baa2617 2022-02-16 op .Em stderr .
45 3baa2617 2022-02-16 op .It Fl v
46 3baa2617 2022-02-16 op Produce more verbose output.
47 3baa2617 2022-02-16 op .It Fl s Ar socket
48 3baa2617 2022-02-16 op Use
49 3baa2617 2022-02-16 op .Ar socket
50 3baa2617 2022-02-16 op instead of the default
51 3baa2617 2022-02-16 op .Pa /tmp/amused-$UID
52 3baa2617 2022-02-16 op to communicate with the daemon.
53 3baa2617 2022-02-16 op .El
54 3baa2617 2022-02-16 op .Pp
55 3baa2617 2022-02-16 op The following commands are available:
56 3baa2617 2022-02-16 op .Bl -tag -width 12m
57 3baa2617 2022-02-16 op .It Cm play
58 fe69a8fc 2022-02-16 op Start or resume playing the playlist.
59 3baa2617 2022-02-16 op .It Cm pause
60 fe69a8fc 2022-02-16 op Pause the playback.
61 3baa2617 2022-02-16 op .It Cm toggle
62 fe69a8fc 2022-02-16 op Play/pause the playback.
63 3baa2617 2022-02-16 op .It Cm stop
64 3baa2617 2022-02-16 op Stop the music player.
65 3baa2617 2022-02-16 op .It Cm restart
66 fe69a8fc 2022-02-16 op Rewind the current song from the beginning.
67 3baa2617 2022-02-16 op .It Cm add Ar
68 3baa2617 2022-02-16 op Enqueue the given files.
69 3baa2617 2022-02-16 op .It Cm flush
70 3baa2617 2022-02-16 op Erase the playlist.
71 8e916714 2022-02-17 op .It Cm show Op Fl p
72 fe69a8fc 2022-02-16 op Print the current playlist.
73 8e916714 2022-02-17 op With
74 8e916714 2022-02-17 op .Fl p
75 8e916714 2022-02-17 op it prints a
76 8e916714 2022-02-17 op .Dq pretty
77 8e916714 2022-02-17 op list with the current playing song prefixed by
78 8e916714 2022-02-17 op .Sq > \&
79 fe69a8fc 2022-02-16 op .It Cm status
80 fe69a8fc 2022-02-16 op Print playback status and current song.
81 60697f73 2022-02-17 op .It Cm next
82 60697f73 2022-02-17 op Play the next song.
83 60697f73 2022-02-17 op .It Cm prev
84 60697f73 2022-02-17 op Play the previous song.
85 ba7595d8 2022-02-17 op .It Cm load Op Ar file
86 ba7595d8 2022-02-17 op Load a playlist from
87 ba7595d8 2022-02-17 op .Ar file ,
88 ba7595d8 2022-02-17 op which has one song per line.
89 ba7595d8 2022-02-17 op If not specified, reads from
90 ba7595d8 2022-02-17 op .Em stdin .
91 3baa2617 2022-02-16 op .El
92 3baa2617 2022-02-16 op .Sh FILES
93 3baa2617 2022-02-16 op .Bl -tag -width "/tmp/amused-$UID" -compact
94 3baa2617 2022-02-16 op .It Pa /tmp/amused-$UID
95 3baa2617 2022-02-16 op UNIX-domain socket used for communication with the daemon.
96 3baa2617 2022-02-16 op .El
97 2c35cd80 2022-02-17 op .Sh EXAMPLES
98 2c35cd80 2022-02-17 op Enqueue all mp3 files in the current directory:
99 2c35cd80 2022-02-17 op .Bd -literal -offset indent
100 2c35cd80 2022-02-17 op $ amused add *.mp3
101 2c35cd80 2022-02-17 op .Ed
102 2c35cd80 2022-02-17 op .Pp
103 2c35cd80 2022-02-17 op Recursively add all opus files:
104 2c35cd80 2022-02-17 op .Bd -literal -offset indent
105 2c35cd80 2022-02-17 op $ find . -type f -iname \\*.opus -exec amused add {} +
106 2c35cd80 2022-02-17 op .Ed
107 2c35cd80 2022-02-17 op .Pp
108 2c35cd80 2022-02-17 op Save the state of the player to the file
109 2c35cd80 2022-02-17 op .Pa state :
110 2c35cd80 2022-02-17 op .Bd -literal -offset indent
111 2c35cd80 2022-02-17 op $ amused show > state
112 2c35cd80 2022-02-17 op .Ed
113 2c35cd80 2022-02-17 op .Pp
114 2c35cd80 2022-02-17 op Load a previous state:
115 2c35cd80 2022-02-17 op .Bd -literal -offset indent
116 2c35cd80 2022-02-17 op $ amused load < state
117 2c35cd80 2022-02-17 op .Ed
118 19ae7661 2022-02-17 op .Pp
119 19ae7661 2022-02-17 op Randomize the current playlist:
120 19ae7661 2022-02-17 op .Bd -literal -offset indent
121 19ae7661 2022-02-17 op $ amused show | sort -R | amused load
122 19ae7661 2022-02-17 op .Ed
123 19ae7661 2022-02-17 op .Pp
124 19ae7661 2022-02-17 op Remove duplicates:
125 19ae7661 2022-02-17 op .Bd -literal -offset indent
126 19ae7661 2022-02-17 op $ amused show | sort | uniq | amused load
127 19ae7661 2022-02-17 op .Ed
128 3baa2617 2022-02-16 op .Sh AUTHORS
129 3baa2617 2022-02-16 op .An -nosplit
130 3baa2617 2022-02-16 op Then
131 3baa2617 2022-02-16 op .Nm
132 3baa2617 2022-02-16 op utility was written by
133 3baa2617 2022-02-16 op .An Omar Polo Aq Mt op@openbsd.org .