
This is a basic crash course on running audacious headless. This isn’t particularly interesting to an everyday user, but to a power user or programmer it’s good inspiration for making an entirely textmode player with all the power that is Audacious. I wonder if I could ever hope to build something as cool as cplay was.
This post is accurate for Audacious 1.5.1
Start audacious headless. Note that if you run the Audacious with the Status Icon plugin, you’ll be able to see the icon. Also make sure Audacious isn’t already running.
. audacious -H &
.
Check the previously-used playlist, if you’ve already configured it to show one.
audtool playlist-display
.
Nuke the playlist and add one song. Does not work with wildcards, uses the first match.
audtool playlist-addurl-to-new-playlist 1.mp3
.
Play controls:
audtool playback-play audtool playback-pause audtool playback-stop
.
Append one song to the playlist. Does not work with wildcards, uses the first match.
audtool playlist-addurl 2.mp3
.
Append a list of songs with something like this.
find -exec audtool playlist-addurl {} \;
find -L . -name '*.mp3' -type f -exec audtool playlist-addurl {} \;
.
Next/previous item (stops working at the end/start of the playlist)
audtool playlist-advance audtool playlist-reverse
.
Exit
audtool shutdown
.
The complete list of commands:
audtool help
.
| Vital information: | |
| current-song | returns current song title |
| current-song-filename | returns current song filename |
| current-song-length | returns current song length |
| current-song-length-seconds | returns current song length in seconds |
| current-song-length-frames | returns current song length in frames |
| current-song-output-length | returns current song output length |
| current-song-output-length-seconds | returns current song output length in seconds |
| current-song-output-length-frames | returns current song output length in frames |
| current-song-bitrate | returns current song bitrate in bits per second |
| current-song-bitrate-kbps | returns current song bitrate in kilobits per second |
| current-song-frequency | returns current song frequency in hertz |
| current-song-frequency-khz | returns current song frequency in kilohertz |
| current-song-channels | returns current song channels |
| current-song-tuple-data | returns the value of a tuple field for the current song |
| current-song-info | returns current song bitrate, frequency and channels |
| Playlist manipulation: | |
| playlist-advance | go to the next song in the playlist |
| playlist-reverse | go to the previous song in the playlist |
| playlist-addurl | adds a url to the playlist |
| playlist-insurl | inserts a url at specified position in the playlist |
| playlist-addurl-to-new-playlist | adds a url to the newly created playlist |
| playlist-delete | deletes a song from the playlist |
| playlist-length | returns the total length of the playlist |
| playlist-song | returns the title of a song in the playlist |
| playlist-song-filename | returns the filename of a song in the playlist |
| playlist-song-length | returns the length of a song in the playlist |
| playlist-song-length-seconds | returns the length of a song in the playlist in seconds |
| playlist-song-length-frames | returns the length of a song in the playlist in frames |
| playlist-display | returns the entire playlist |
| playlist-position | returns the position in the playlist |
| playlist-jump | jumps to a position in the playlist |
| playlist-clear | clears the playlist |
| playlist-repeat-status | returns the status of playlist repeat |
| playlist-repeat-toggle | toggles playlist repeat |
| playlist-shuffle-status | returns the status of playlist shuffle |
| playlist-shuffle-toggle | toggles playlist shuffle |
| playlist-tuple-data | returns the value of a tuple field for a song in the playlist |
| Playqueue manipulation: | |
| playqueue-add | adds a song to the playqueue |
| playqueue-remove | removes a song from the playqueue |
| playqueue-is-queued | returns OK if a song is queued |
| playqueue-get-queue-position | returns the playqueue position of a song in the given poition in the playlist |
| playqueue-get-list-position | returns the playlist position of a song in the given position in the playqueue |
| playqueue-length | returns the length of the playqueue |
| playqueue-display | returns a list of currently-queued songs |
| playqueue-clear | clears the playqueue |
| Playback manipulation: | |
| playback-play | starts/unpauses song playback |
| playback-pause | (un)pauses song playback |
| playback-playpause | plays/(un)pauses song playback |
| playback-stop | stops song playback |
| playback-playing | returns OK if audacious is playing |
| playback-paused | returns OK if audacious is paused |
| playback-stopped | returns OK if audacious is stopped |
| playback-status | returns the playback status |
| playback-seek | performs an absolute seek |
| playback-seek-relative | performs a seek relative to the current position |
| Volume control: | |
| get-volume | returns the current volume level in percent |
| set-volume | sets the current volume level in percent |
| Equalizer manipulation: | |
| equalizer-activate | activates/deactivates the equalizer |
| equalizer-get | gets the equalizer settings |
| equalizer-set | sets the equalizer settings |
| equalizer-get-preamp | gets the equalizer pre-amplification |
| equalizer-set-preamp | sets the equalizer pre-amplification |
| equalizer-get-band | gets the equalizer value in specified band |
| equalizer-set-band | sets the equalizer value in the specified band |
| Miscellaneous: | |
| mainwin-show | shows/hides the main window |
| playlist-show | shows/hides the playlist window |
| equalizer-show | shows/hides the equalizer window |
| filebrowser-show | shows/hides the filebrowser |
| jumptofile-show | shows/hides the jump to file window |
| preferences-show | shows/hides the preferences window |
| about-show | shows/hides the about window |
| activate | activates and raises audacious |
| always-on-top | on/off always on top |
| get-skin | gets skin |
| set-skin | sets skin |
| version | shows audaciuos version |
| shutdown | shuts down audacious |
| Help system: | |
| list-handlers | shows handlers list |
| help | shows handlers list |
| Handlers may be prefixed with `–’ (GNU-style long-options) or not, your choice. | |
