NAME
amused
—
music player
SYNOPSIS
amused |
[-dv ] [-s
socket] [command
[argument ...]] |
DESCRIPTION
amused
is a simple music player. It
manages a single queue of music files. At the end of every track,
amused
proceeds to the next one in the queue, or
with the first one if it was the last one or if the track wasn't part of the
queue.
amused
automatically skips and removes
from the playing queue non-regular files, or ones with a non-recognized
audio format.
The following options are available:
-d
- Do not daemonize:
amused
will run in the foreground and log to standard error. It's ignored if any commands are given on the command line, or if the server is already running. -s
socket- Use socket instead of the default /tmp/amused-UID to communicate with the daemon.
-v
- Produce more verbose output.
- command [argument ...]
- Specify the command to run. If no commands are specified,
status
is assumed. Commands may be abbreviated to a unique prefix, for example ‘rep’ can be given instead ofrepeat
.
The following commands are available:
add
file ...- Enqueue the given files at the end of the playing queue.
consume
[on
|off
]- Enable or disable the consume mode. When consume mode is enabled the tracks are removed from the playing queue once played completely. Without arguments toggle the current status.
flush
- Erase the playlist.
jump
substring- Play the first song in the playing queue that contains the given case-insensitive substring.
load
[file]- Load a playlist from file or standard input. A
playlist is a list of paths to music files given one per line and
optionally prefixed by ‘> ’ or two spaces. If the list
was generated by
amused
show
-p
, restore also the position in the playing queue. Otherwise, if already playing something, try to match the currently played song in the new queue. monitor
[events]- Stop indefinitely and print when an event in the comma-separated list of
events happened, or all if not given. The available
events are:
- add
- Added a song to the playlist.
- jump
- Jumped to a different song in the playlist.
- load
- Loaded a new playlist.
- mode
- Mode changed (repeat or consume).
- next
- Advanced to next song.
- pause
- Paused.
- play
- Playing or resuming a song.
- previous
- Gone back to previous song.
- seek
- Seeked in the current track.
- stop
- Stopped.
next
- Play the next song.
pause
- Pause the playback.
play
- Start or resume the playback.
previous
- Play the previous song.
repeat one
|all
[on
|off
]- Enable or disable the automatic repetition of the current track
(
one
) or of the whole playing queue (all
). Without arguments toggle the given repeat mode. restart
- Play the current song from the beginning. It's a shorthand for
amused
seek
0. seek
[+-]time[%]- Seek by the specified amount of time into the
current song. If the argument is prefixed by either ‘+’ or
‘-’ then the seek is relative to the current position,
otherwise is absolute. With a trailing ‘%’, the
time is interpreted as a percentage of the length of
the track.
The time can also be expressed as [[hours:]minutes:]seconds, but in this case no trailing ‘%’ is allowed.
show
[-p
]- Show the playlist. With
-p
it prints a “pretty” list with the current playing song prefixed by ‘> ’. shuffle
[-a
]- Shuffle the playing queue after the currently playing track until the end.
If
-a
is given, all the tracks in the playing queue are shuffled, with the currently playing one moved at the top. status
[-f
format]- Print playback status and current song. The format
is a comma-separated list of words that select the information to print,
in order. It defaults to
AMUSED_STATUS_FORMAT
or to “status,time:oneline,mode:oneline” if not defined. The formats available are:- path
- Path of the current song
- mode:oneline
- Mode status in a single line.
- mode
- Repeat all, one and consume, one per line.
- status
- Playback status by the path to the current song.
- time:oneline
- Position and duration in a single line.
- time:percentage
- Percentage of the current position.
- time:raw
- Current position and duration in seconds.
- time
- Current position and duration in a human-readable format.
stop
- Stop the playback.
toggle
- Play/pause the playback.
ENVIRONMENT
AMUSED_STATUS_FORMAT
- The default format used by
amused
status
. TEMPDIR
- Path to the directory where the control socket is created. Defaults to /tmp.
FILES
- /tmp/amused-UID
- UNIX-domain socket used for communication with the daemon.
EXAMPLES
Load every file under the current directory recursively:
$ find . | amused load
Enqueue all mp3 files in the current directory:
$ amused add *.mp3
Recursively add all opus files:
$ find . -type f -iname \*.opus -exec amused add {} +
Save the state of the player to the file amused.dump:
$ amused show -p > amused.dump
Load a previous state:
$ amused load < amused.dump
Remove duplicates:
$ amused show | sort | uniq | amused load
Select a song with fzf(1)
$ amused jump "$(amused show | fzf +s)"
SEE ALSO
AUTHORS
The amused
utility was written by
Omar Polo
<op@omarpolo.com>.