draai(1)
πΏ draai(1) β the Unix manual page but make it cute πΏ
USER COMMANDS β¨ draai β¨
okay bestie, sit down, hydrate, because this is the manual page for draai and it's genuinely iconic π
πΈ NAME πΈ
draai β manage playlists and play audio files π§
β¨ SYNOPSIS β¨
draai [option [option ...]] command [track [track ...] | tracknumber
[tracknumber ...]]
π¦ DESCRIPTION π¦
So. Draai is a wrapper around mpc, and what it does is make playing music from the command line actually enjoyable, which β no cap β is a whole vibe. mpc is a client for MPD, the Music Player Daemon.
With draai you can play an audiofile (ogg, mp3, flac, whatever your MPD offers), play all files in a predefined playlist, view details on current, past and future playing songs, skip to the next song, etc. Literally all of it. It's giving β¨command-line DJβ¨ and I'm obsessed.
π GETTING STARTED π
Run this first, it sets draai up the way the author likes it:
draai init
Then open another terminal window and run e.g.
$ draai listall | dr_permutate | draai add; draai play
to build a current playlist and start playing it. Other ways of using draai are possible, see below. π
π COMMANDS π
draaiβ Play music: the files given as args and playlists passed via--playlist.watchβ Runwatch(1)ondraai peek.initβ Start a bunch of X terminals setting up some draai jobs:tail,logtail,watch,syslog, ...guestlistβ Reschedule listed tracknumbers as upcoming tracks. Last arguments should be the positions of tracks to be put on the guestlist, not filenames. (yes bestie, the guestlist is real ποΈ)unguestlistβ Reschedule listed tracknumbers to end of playlist. bye babe π«Άinsertβ Add file(s) (given either as args or on stdin) to playlist and schedule it as upcoming track. You probably want to havedraai insertread from a pipe fed bydraai search.moveβ Move tracknumber to tracknumber given as last argument.zapβ Move tracknumber to position one and immediately start playing it. Typically used to deal with radiostations in playlist. β‘searchβ Search for substrings in all song tag types (artist, title, comment, filename, ...). Similar tompc search any <query>. You'll typically want to pipe this command's output to e.g.draai insert.tailβ Print information about track when it starts playing, similar totail -fon a logfile.logtailβ Runtail(1)on system log file.listβ List current playlist.peekβ Show status of current song, and show upcoming$peekFIXME tracks.playβ Play music. βΆοΈsyslogβ Send raw information from tail to syslog. You likely want to rundraai syslogin the background.skipβ Skip this track, start playing the next one now.osjittisstilβ Run this if unwanted silence pops up during a playing session (for now, it runsdraai --sloppy skip). π silence? not on my watchdeleteβ Delete track(s) from current playlist. Last arguments should be positions of tracks to be removed, not filename. If no position is given, deletes upcoming track from playlist.fastforwardβ Seek forward in current track.crescendoβ Play louder. πdiminuendoβ Play softer. π€«shuffleβ Shuffle the playlist. By default, this task is delegated todr_unsort(1). However, if draai runs in "sloppy" or in "native shuffle" mode, then mpc native shuffling is done (by callingmpc shuffle). Draai runs in "sloppy" mode when theDR_SLOPPYenvironment variable is set, or when the--sloppyoption is passed. Draai runs in "native shuffle" mode when theDR_SHUFFLE_NATIVEenvironment variable is set. πlistallβ List all files as served by music database.addβ Add file(s) (given either as args or on stdin) to playlist. You probably want to havedraai addread from a pipe fed by e.g.draai listallordraai search.quitβ quit
π OPTIONS π
--debug(debug),-dβ Be very verbose. π--playlist(with playlistfile),-pβ Playlist file; option can be supplied more than once. To be used with command "draai".--noshuffle(no shuffle),{-S}β Do not shuffle tracks and leave random mode untouched (default is: do shuffle and disable random mode). See also the scriptdr_unsort.--raw(raw),-rβ Print raw stuff, suitable for postprocessing (if combined with tail, peek or list).--sloppy(sloppy),-sβ Do not try hard to make everything sound smooth. If combined with skip: risk a squeak on old hardware. π (yes, a squeak. on purpose. iconic behaviour)--time(with timespec),-tβ If combined with commands quit or draai: time at which to quit or start. β°
π EXAMPLES π
Schedule all tracks containing the string 'delia gone' in title, artist, comment or any other tag for playing, after current song has finished:
draai search 'delia gone' | draai insert.
π§ ENVIRONMENT π§
Wanna know what env vars draai honors? Run
grep DR_ `which draai`
to find out. It honors:
- booleans:
DR_DEBUG,DR_SHUFFLE,DR_SHUFFLE_NATIVE,DR_TIMESTAMP,DR_RAW,DR_SLOPPY,DR_INIT_NCMPCPPandDR_INIT_WATCH - strings:
DR_WATCH - integers:
DR_CROSSFADE,DR_PEEKandDR_SEEKas well asDR_FADEOUT_STEP,DR_FADEOUT_REPEAT, andDR_FADEOUT_SLEEPandDR_VOLUME_STEP - and some more strings:
DR_SYSLOG_FILE,DR_SYSLOG_FACILITYandDR_SYSLOG_LEVEL
For now, see the draai code for what it all means. iykyk π
π FILES, CONFIGURATION π
All configuration variables (see ENVIRONMENT) can be set in ~/.draai/rc. This rc-file is sourced as a shell script. π
If you'd like to set the syslog facility, set syslog_facility (overruled by DR_SYSLOG_FACILITY). If you'd like to set the watch programma, set watch (overruled by DR_WATCH).
πΈ SEE ALSO πΈ
Lots of alternatives for draai exist. One is "herrie", by Ed Schouten and Martijn van den Dungen, see http://freshmeat.net/projects/herrie/.
π COPYRIGHT AND LICENSE π
Draai is (C) 2000-2013 Joost van Baal-IliΔ <joostvb-draai@mdcc.cx>.
Draai is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
β οΈ This program is distributed WITHOUT ANY WARRANTY. (fr fr, no warranty, bestie β read that twice)
You should have received a copy of the GNU General Public License along with draai. If not, see http://www.gnu.org/licenses/.
β AUTHOR β
Joost van Baal-IliΔ <joostvb-draai@mdcc.cx>
okay that's the whole page, you ate that π«Ά this was draai 20201215, dated 15 Π΄Π΅Ρ 2020, and it lives in section 1 of the manual β now go play some music, main character πβ¨ππ¦
π¦ where this page comes from
- debian bookworm: draai 20201215-2
- ubuntu jammy: draai 20201215-2
- ubuntu noble: draai 20201215-2
- Copyright (c) 2020 Joost van Baal-IliΔ <joostvb-draai@mdcc\&.cx>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms