From: Philippe SWARTVAGHER Date: Wed, 13 Jul 2022 18:40:37 +0000 (+0100) Subject: Import cmus_2.10.0.orig.tar.gz X-Git-Tag: archive/raspbian/2.10.0-1+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=328a7cce6da091f424008afbca994610dba47670;p=cmus.git Import cmus_2.10.0.orig.tar.gz [dgit import orig cmus_2.10.0.orig.tar.gz] --- 328a7cce6da091f424008afbca994610dba47670 diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..1af835f --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,17 @@ + +--- + +1) `uname -a`: +``` +(paste output here) +``` + +2) `cmus --version`: +``` +(paste output here) +``` + +3) `cmus --plugins`: +``` +(paste output here) +``` diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d2382f5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,53 @@ +name: Build +on: [push, pull_request] + +jobs: + build: + name: Build + strategy: + matrix: + os: [ubuntu-20.04, macos-10.15] + cc: [gcc, clang] + exclude: + - os: macos-10.15 + cc: gcc + runs-on: ${{matrix.os}} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Dependencies (Homebrew) + if: startswith(matrix.os, 'macos-') + run: | + brew install \ + libao ffmpeg libcddb libcdio libcue libdiscid faad2 flac jack mad \ + libmodplug mp4v2 musepack opusfile libsamplerate libvorbis wavpack \ + pkg-config + - name: Dependencies (apt) + if: startswith(matrix.os, 'ubuntu-') + run: | + sudo apt-get update -qyy + sudo apt-get install -qyy \ + bash-completion libao-dev libasound2-dev libavcodec-dev \ + libavformat-dev libswresample-dev libcddb2-dev libcdio-cdda-dev \ + libcue-dev libdiscid-dev libfaad-dev libflac-dev libjack-dev \ + libmad0-dev libmodplug-dev libmpcdec-dev libncursesw5-dev \ + libopusfile-dev libpulse-dev libroar-dev libsamplerate0-dev \ + libsndio-dev libvorbis-dev libwavpack-dev libsystemd-dev pkg-config + - name: Build + run: | + ./configure CC="${{matrix.cc}}" + make + - name: Run + run: | + CMUS_LIB_DIR="${PWD}" ./cmus --version + CMUS_LIB_DIR="${PWD}" ./cmus --plugins + - name: Archive + run: | + mkdir tmp + make install DESTDIR=${PWD}/tmp + XZ_OPT=-9 tar -cJf cmus.tar.xz -C "${PWD}/tmp" . + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: cmus (${{matrix.os}}, ${{matrix.cc}}) + path: cmus.tar.xz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..31e4bfa --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# normal ignores +.* +*~ +*.[ao] +*.lo +*.so +tags +cscope.out +!.gitignore +!.travis.yml +!.github + +# top-level ignores +/*.spec +/config +/config.mk +/cmus +/cmus-remote + +# Cygwin stuff +*.exe +/cmus.base +/cmus.def +/cmus.exp diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..875047b --- /dev/null +++ b/AUTHORS @@ -0,0 +1,69 @@ +Maintainers +----------- +Gregory Petrosyan +Jason Woofenden + +Original Author +--------------- +Timo Hirvonen + +NOTE: This list is not complete. Especially small changes/bug fixes may + not be listed here. See the git repository for full list of + contributors. + +Credits +------- +original help window code and mad.charset option by Sergey Kuleshov + + +artist/album mode idea and "display artist/album as a tree instead of two +windows" idea from divxero + +play queue idea and other misc ideas from Martin Stubenschrott + + +original RPM spec file by Eugene Vlasov + +Claes Nästen + :seek command + --volume option for cmus-remote + +Frank Terbeck + dynamic keybindings patch + +alex + Sun output plugin + Tremor support for vorbis plugin + NetBSD and OpenBSD port + Various bug fixes + +Chun-Yu Shei + mpc plugin + gapless MP3 playback + +Johannes Weißl + ao plugin + +Gregory Petrosyan + PulseAudio output plugin + +Philipp 'ph3-der-loewe' Schafft + RoarAudio output plugin + +Jason Woofenden + Tutorial + cmus-unofficial patch-commiter + +Niko Efthymiou + Jack plugin + +Tuncer Ayaz + Opus input plugin + +Boris Timofeev + vtx plugin + +Yue Wang + CoreAudio plugin + +Google Inc. diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program 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 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/Doc/.gitignore b/Doc/.gitignore new file mode 100644 index 0000000..9b1572a --- /dev/null +++ b/Doc/.gitignore @@ -0,0 +1,4 @@ +.* +*.1 +*.7 +ttman diff --git a/Doc/cmus-remote.txt b/Doc/cmus-remote.txt new file mode 100644 index 0000000..e41d0d9 --- /dev/null +++ b/Doc/cmus-remote.txt @@ -0,0 +1,156 @@ +@title CMUS-REMOTE 1 05/11/2006 cmus + +@h1 NAME + +cmus-remote - control cmus + + +@h1 SYNOPSIS + +cmus-remote [*OPTION*]... [`FILE`|`DIR`|`PLAYLIST`]...@br +cmus-remote *-C* `COMMAND`...@br +cmus-remote + + +@h1 DESCRIPTION + +Add `FILE/DIR/PLAYLIST` to playlist, library (*-l*) or play queue (*-q*). + +If no arguments are given cmus-remote reads raw commands from stdin (one +command per line). Raw commands are cmus' command mode commands. These same +commands are used in configuration files and key bindings. *cmus*(1) contains +full list of commands. For consistency also searching is supported: +*-C /text*. + +If *-C* is given, all command line arguments are treated as raw commands. + +@h1 OPTIONS + +--server SOCKET + Connect using socket *SOCKET* instead of `$XDG_RUNTIME_DIR/cmus-socket`. + +--passwd PASSWD + password to use for TCP/IP connection + +--help + Display usage information and exit. + +--version + Display version information and exit. + +-p, --play + Start playing. + +-u, --pause + Toggle pause. + +-U, --pause-playback + Pause if currently playing. + +-s, --stop + Stop playing. + +-n, --next + Skip forward in playlist. + +-r, --prev + Skip backward in playlist. + +-R, --repeat + Toggle repeat. + +-S, --shuffle + Toggle shuffle. + +-v, --volume VOL + Change volume. See *vol* command in *cmus*(1). + +-k, --seek SEEK + Seek. See *seek* command in *cmus*(1). + +-f, --file FILE + Play from file. + +-Q + Get player status information. Same as *-C status*. Note that + *status* is a special command only available to cmus-remote. + +-l, --library + Modify library instead of playlist. + +-P, --playlist + Modify playlist (default). + +-q, --queue + Modify play queue instead of playlist. + +-c, --clear + Clear playlist, library (*-l*) or play queue (*-q*). + +-C, --raw + Treat arguments (instead of stdin) as raw commands. + +@h1 REMOTE COMMANDS + +Special commands only available to cmus-remote. + +status + Print information about currently playing track. + +format_print + Print arguments as `Format Strings`. Each argument starts a new line. + +@h1 EXAMPLES + +Add playlists/files/directories/URLs to library view (1 & 2): + + @pre + $ cmus-remote -l music.m3u \\ + http://live.urn1350.net:8080/urn_high.ogg + @endpre + +Load (clear and add) playlist to playlist view (3): + + @pre + $ cmus-remote -c music.m3u + @endpre + +Three different ways to toggle repeat: + + @pre + $ cmus-remote -R + $ cmus-remote -C "toggle repeat" + $ cmus-remote + toggle repeat + ^D + @endpre + +Query settings or key bindings: + + @pre + $ cmus-remote -C "set repeat?" + setting: 'repeat=false' + $ cmus-remote -C "showbind common a" + bind common a win-add-l + @endpre + +Dump the playlist to stdout: + + @pre + $ cmus-remote -C "save -p -" + [...] + @endpre + +Search works too: + + @pre + $ cmus-remote -C /beatles + @endpre + +@h1 SEE ALSO + +*cmus*(1) + +@h1 AUTHOR + +Written by Timo Hirvonen diff --git a/Doc/cmus-tutorial.txt b/Doc/cmus-tutorial.txt new file mode 100644 index 0000000..9a3ed70 --- /dev/null +++ b/Doc/cmus-tutorial.txt @@ -0,0 +1,264 @@ +@title cmus-tutorial 7 14/02/2010 cmus + + +@h1 NAME + +cmus - C\* Music Player tutorial + + +@h1 CONTENTS + +Step 1: Starting Cmus + +Step 2: Adding Music + +Step 3: Playing Tracks From The Library + +Step 4: Managing The Queue + +Step 5: The Playlists + +Step 6: Find that track + +Step 7: Customization + +Step 8: Quit + +Step 9: Further Reading + + +@h1 Step 1: Starting Cmus + +When you first launch cmus (just type `cmus` in a terminal and press Enter) it +will open to the album/artist view, which looks something like this: + +@pre ++---------------------------------------------------------------------+ +| Artist / Album Track Library | +| | | +| | | +| | | +| | | +| | | +| | | +| | | +| | +| . 00:00 - 00:00 vol: 100 all from library | C | +| | ++---------------------------------------------------------------------+ +@endpre + +This is the view where your artists and albums will be displayed. + + +@h1 Step 2: Adding Music + +Press *5* to switch to the file-browser view so we can add some music. You +should see something like this: + +@pre ++---------------------------------------------------------------------+ +| Browser - /home/jasonwoof | +| ../ | +| Desktop/ | +| MySqueak/ | +| audio-projects/ | +| audio/ | +| bin/ | +| config/ | +| | +| . 00:00 - 00:00 vol: 100 all from library | C | +| | ++---------------------------------------------------------------------+ +@endpre + +Now, use the arrow keys, Enter and Backspace to navigate to where you have +audio files stored. To add music to your cmus library, use the arrow keys to +highlight a file or folder, and press *a*. When you press *a* cmus will move you +to the next line down (so that it is easy to add a bunch of files/folders in a +row) and start adding the file/folder you pressed *a* on to your library. This +can take a while if you added a folder with a lot in it. As files are added, +you will see the second time in the bottom right go up. This is the total +duration of all the music in the cmus library. + +Note: cmus does not move, duplicate or change your files. It just remembers +where they are and caches the metadata (duration, artist, etc.) + +Just to be on the safe side, let's save. Type *:save* and press Enter. + +Note: Cmus automatically saves your settings and library and everything when +you quit, so you probably won't use the save command much. + + +@h1 Step 3: Playing Tracks From The Library + +Press *2* to go to the simple library view. You should see something like +this: + +@pre ++---------------------------------------------------------------------+ +| Library ~/.config/cmus/lib.pl - 31 tracks sorted by artist album di | +| Flying Lizards . Money (That's What I Want) 02:31 | +| Jason Woofenden . VoR Theme 2009 01:20 | +| Keali'i Reichel 06. Wanting Memories 1994 04:28 | +| Molly Lewis . Tom Cruise Crazy 03:13 | +| NonMemory . pista1 2009 03:18 | +| NonMemory 01. pista1 2009-04-21 04:13 | +| Ray Charles 06. Halleluja I Love Her So 02:33 | +| | +| . 00:00 - 2:16:25 vol: 100 all from library | C | +| | ++---------------------------------------------------------------------+ +@endpre + +Use the up and down arrow keys to select a track you'd like to hear, and press +Enter to play it. Here are some keys to control playback: + +Press *c* to pause/unpause +Press right/left to seek by 10 seconds +Press *<*/*>* seek by one minute +Press *z* to play the previous track and *b* to play the next track + +cmus has some great options to control what plays next (if anything) when the +track ends. The state of these settings is shown in the bottom right corner. +The first of these shows what collection of tracks (currently "all from +library") we are playing. Press *m* to cycle through the different options for +this setting. To the right of that (past the "|") cmus shows the state of four +toggles. Only toggles which are "on" are shown, so now we only see the *C*. +Here are the toggles: + +[C]ontinue + + If this is off, cmus will always stop at the end of the track. You can +toggle this setting by pressing *shift-C*. + +[R]epeat + + If this is on (and continue is on), when cmus reaches the end of the group +of tracks you're playing (selected with the *m* key) it will start again from +the beginning. Press *r* to toggle this setting. + +[S]huffle + + If this is on, cmus will choose a random order to play all the tracks +once. Press *s* to toggle this option. + +[F]ollow + + If this is on, cmus will select the currently playing track on track change. +Press *f* to toggle this option. + + +@h1 Step 4: Managing The Queue + +Lets say you're listening to a song, and you want to select which song will +play next, without interrupting the currently playing song. No problem! Just go +to the song you want to hear next (in any of the views) and press *e*. The +queue is FIFO, meaning if you queue up another track, it will play after the +one you already had queued up. + +Note: The queue is not affected by the "shuffle" option described above. + +Press *4* to view/edit the queue. This view works and looks a lot like the +simple library view. The main difference is that you can change the order of +the tracks with the *p* and *P* keys. You can press *shift-D* to remove a track +from the queue. + +When cmus is ready to play another track (it's reached the end of a track and +the "continue" setting is on) it will remove the top entry from the queue and +start playing it. + + +@h1 Step 5: The Playlists + +The playlists work like another set of libraries (like view *2*) except that +(like the queue) you manually set the order of the tracks. This can be quite +useful if you want to create a mix of specific tracks or if you want to +listen to an audio book without having the chapters play when you're playing +"all from library". + +The playlists are on view *3*. But before we go there, let's add some tracks. +Press *2* to go to the simple library view, go to a track you want and press +*y* to add it to a playlist. The only visual feedback you'll get that anything +happened is that the highlight will move down one row. Add a few more so you +have something to work with. + +Now press *3* to go to the playlist. You should see something like this: + +@pre ++---------------------------------------------------------------------+ +| Playlist Track 11:32 | +| * default | Flying Lizards . Money (Th... 02:31 | +| | Jason Woofenden . VoR T... 2009 01:20 | +| | Keali'i Reichel 06. Wanti... 1994 04:28 | +| | Molly Lewis . Tom Cruis... 03:13 | +| | | +| | | +| | | +| | +| . 00:00 - 00:00 vol: 100 all from library | C | +| | ++---------------------------------------------------------------------+ +@endpre + +Just like the queue, you can use the *p*, *P* and *D* keys to move and delete +tracks from the playlist. + +Note: Changing the view (e.g. by pressing *3*) does not affect what cmus will +play next. To put cmus into "play from the playlist" mode, press Enter on one +of the tracks in the playlist. To switch modes without interrupting the +currently-playing song, you can press *shift-M*. + + +@h1 Step 6: Find that track + +This step shows various ways you can find track(s) you're looking for. + +Search: Press *2* to be sure you're on the simple library view, then press */* +to start a search. Type a word or two from the track you're looking for. cmus +will search for tracks that have all those words in them. Press enter to get +the keyboard out of the search command, and *n* to find the next match. + +Tree View: Press *1* to select the tree view. Scroll to the artist, press +*space* to show their albums, scroll to the album you want, then press tab so +the keyboard controls the right column. Press tab again to get back to the left +column. + +Filters: See the reference manual (see Further Reading below) for a detailed +description on how to quickly (and temporarily) hide most of your music. + + +@h1 Step 7: Customization + +Cmus has some very cool settings you can tweak, like changing the way tracks +are displayed (e.g. to display disk numbers), enabling replaygain support or +changing the keybindings. + +Press *7* for a quick overview of the current keybindings and settings. + +To change a setting or keybind, just select it (up/down keys) and press enter. +This will put the command for the current setting in the command line (bottom +left of your screen), which you can edit to put in a new value/key. + +Please see the reference manual (see Further Reading below) for a detailed +description of all the commands and settings available. + + +@h1 Step 8: Quit + +When you're done, type *:q* and press Enter to quit. This will save your +settings, library, playlist and queue. + + +@h1 Step 9: Further Reading + +Cmus comes with a great reference manual. Now that you've got the basics down +it should be intelligible. Try *man cmus* in a terminal. If that's not +installed, try opening up `cmus.txt` from the `Doc` directory, or read the latest +version online: + +`https://github.com/cmus/cmus/blob/master/Doc/cmus.txt` + +There are more commands and features not covered here like loading and saving +playlists, controlling cmus remotely with `cmus-remote`, etc. + diff --git a/Doc/cmus.txt b/Doc/cmus.txt new file mode 100644 index 0000000..d4eba05 --- /dev/null +++ b/Doc/cmus.txt @@ -0,0 +1,1711 @@ +@title CMUS 1 31/01/2010 cmus + +@h1 NAME + +cmus - C\* Music Player + + +@h1 SYNOPSIS + +cmus [*options*] + + +@h1 DESCRIPTION + +cmus is a lightweight ncurses music player. It supports various output methods +by using dynamically-loaded output plugins. cmus has configurable keybindings +and can be controlled externally using *cmus-remote*(1). + +@h1 OPTIONS + +--listen ADDR + Listen on ADDR (UNIX socket) instead of `$CMUS_SOCKET` or + `$XDG_RUNTIME_DIR/cmus-socket`. ADDR must be a UNIX socket or + host[:port]. + + *WARNING*: Using host[:port] is insecure even with a password! It may be + on a LAN if you want multiple users to be able to control cmus. Never + expose cmus to the internet. + + NOTE: Don't use this option to run multiple instances as the same user. + Doing so would corrupt the track metadata cache. + +--passwd PASSWD + Set the password for TCP/IP connections. Required if listening on + host[:port]. Used in conjunction with --listen. + +--plugins + List available plugins and exit. + +--show-cursor + Always display the cursor. This is useful for screen readers. + +--help + Display usage information and exit. + +--version + Display version information and exit. + + +@h1 VIEWS + +There are 7 views in cmus. Press keys 1-7 to change active view. + +Library view (1) + Displays all tracks in the *library*. Tracks are sorted and displayed in + a tree grouped by artist/album. Artist sorting is done alphabetically. + Albums are sorted by year. + +Sorted library view (2) + Displays the same content as view 1, but as a simple list automatically + sorted by user criteria. + +Playlist view (3) + Displays editable playlists with optional sorting. + +Play Queue view (4) + Displays upcoming tracks. These tracks are played before anything else + (i.e. the playlist or library). Once the queue is empty, playback will + resume from the last position in the library. + +Browser (5) + Displays the directory browser. In this view, music from the filesystem + can be added to the library, active playlist, or queue. + +Filters view (6) + Lists user-defined filters. + +Settings view (7) + Lists keybindings, unbound commands and options. Remove bindings with + *D* or *del*, change bindings and variables with *enter*, and toggle + variables with *space*. + +@h1 COMMAND LINE + +Everything in cmus is implemented as commands which can be typed at the command line +or bound to a key. To enter command mode type *:*. To execute a command, press +*ENTER*, and to cancel, press *ESC* or *CTRL-C*. Use up/down arrows to browse +the command history. Use *TAB* to complete commands and parameters. You don't +need to type the full command name if it is unambiguous (no other commands starting +with the same characters). + +Examples: + + @pre + # add files, short for ':add ~/music' + :a ~/music + + # change output plugin + :set output_plugin=oss + + # start playing + # you could just press 'x' which is the default + # binding for this command + :player-play + + # clear current view (library, playlist or play queue) + :clear + @endpre + + +@h1 SEARCHING + +Search mode works like the command mode. To enter search mode, press */* and +type the query then press *ENTER*. Press *n* to move to the next result or *N* +for the previous one. Type *?* to search backwards. + +In views 1-4 the query is matched against the artist, album and title tags. Type +*//WORDS* or *??WORDS* to search only artists/albums in view 1 and only titles +in views 2-4. If the file doesn't have tags, words are compared to the filename +excluding the path. + +Searching also works in views 5-7. + + +@h1 PLAYLIST EDITING + +@h2 Selecting Tracks + +Editing commands affect the currently marked tracks. If there are no marked +tracks, the currently selected track (or selected artist/album in view 1) is +used. + +To mark the selected track, press *SPACE*. Marked tracks appear with a gray +background. You can only mark tracks in the list views (2-4). + +@h2 Copying Tracks Between Views + +You can copy marked or selected tracks in views 1-5. + +@li *a* +copy tracks to the library (1-2) + +@li *y* +copy tracks to the marked playlist (3) + +@li *e* +append tracks to the play queue (4) + +@li *E* +prepend tracks to the play queue (4) + +@h2 Moving Tracks + +In views 2-4, tracks can be moved within the list. Note that moving is disabled +if the view is auto-sorted (see *lib_sort* and *pl_sort* options). + +Pressing *p* moves marked tracks to the position immediately after the selected +track. *P* moves them to the position immediately before the selected track. If +there are no marked tracks, the selected track is moved down (*p*) or up (*P*). + +Note that changing active filters in view 2 reloads it, losing any changes made +to the track order. + +@h2 Removing Tracks + +Press *D* or *delete* to remove the marked or selected tracks in the current +view (1-4). The tracks will be removed immediately from the view without asking +for confirmation. In the browser and filters views, the same keys are used to +remove a file or filter after asking for confirmation. + + +@h1 STATUS LINE + +The right hand side of the status line (second row from the bottom, black text +on a grey background) consists of the following fields: + +@pre +aaa_mode & play_sorted & play_library | continue follow repeat shuffle +@endpre + +NOTE: *aaa_mode* and *play_sorted* will be only displayed if *play_library* is +*true* because these are meaningless when playing the playlists (view 3). + +Pressing *m*, *o*, *M*, *C*, *r* and *s* should make it easier to understand +what these fields mean. + +See the CONFIGURATION OPTIONS section for more information about these options. + + +@h1 KEYBINDINGS + +Here's list of default keybindings. To change them, see the *unbind* and *bind* +commands in the COMMANDS section. + + +@h2 Common: Playback +@pre +b player-next +c player-pause +x player-play +z player-prev +v player-stop + +B player-next-album +Z player-prev-album + +] vol +0 +1% +[ vol +1% +0 ++ vol +10% += vol +10% +} vol -0 -1% +{ vol -1% -0 +- vol -10% + +, seek -1m +. seek +1m + +h seek -5 +l seek +5 + +left seek -5 +right seek +5 + +mlb_click_bar player-pause +mouse_scroll_up_bar seek +5 +mouse_scroll_down_bar seek -5 +@endpre + +@h2 Common: Setting Toggles +@pre +m toggle aaa_mode +C toggle continue +M toggle play_library +o toggle play_sorted +r toggle repeat +^R toggle repeat_current +t toggle show_remaining_time +s toggle shuffle +f toggle follow +@endpre + +@h2 Common: Commands +@pre +q quit -i +^C echo Type :quit to exit cmus. +I echo {} + +! push shell +@endpre + +@h2 Common: View/Window Navigation +@pre +1 view tree +2 view sorted +3 view playlist +4 view queue +5 view browser +6 view filters +7 view settings + +mouse_scroll_up_title left-view +mouse_scroll_down_title right-view + +tab win-next + +^L refresh +@endpre + +@h2 Common: Navigation +@pre +^Y win-scroll-up +^E win-scroll-down +^B win-page-up +^F win-page-down +^U win-half-page-up +^D win-half-page-down + +k win-up +j win-down +g win-top +G win-bottom + +up win-up +down win-down +home win-top +end win-bottom +page_up win-page-up +page_down win-page-down + +mouse_scroll_up win-up +mouse_scroll_down win-down +@endpre + +@h2 Common: Selection +@pre +i win-sel-cur +enter win-activate +mlb_click_selected win-activate + +space win-toggle +D win-remove +delete win-remove +p win-mv-after +P win-mv-before + +E win-add-Q +a win-add-l +y win-add-p +e win-add-q + +u update-cache +U win-update-cache +@endpre + +@h2 Common: Filters +@pre +/ search-start +? search-b-start +n search-next +N search-prev + +F push filter +L push live-filter +@endpre + +@h2 File Browser +@pre +space win-activate +backspace browser-up +i toggle show_hidden +u win-update +@endpre + + +@h1 LIBRARY VIEW SORTING + +The library view (the tree-like one; not the sorted library view, which is +configured with lib_sort - see `CONFIGURATION OPTIONS`), is sorted automatically +using tags from the audio files. + +Note: Albums which feature various artists (e.g. samplers or compilations) are +treated specially. If an album artist tag or the ID3v2 *TPE2* frame is set, it +will be used instead of the real artist name. Otherwise, cmus determines if the +album is a compilation (if *albumartist* or *artist* are set to *Various +Artists*, *Various*, *VA*, or *V/A*; or if *compilation* or *partofacompilation* +are set to a truthy value; or if the ID3v2 *TCMP* frame is set). If so, the +artist is named **. + +Note: If the filename is a URL, the artist/album tags are set to **. If +it is a file, cmus sets the artist and/or album tags to ** if they are +not already set. These names will be treated the same way as other names for +sorting. + +In general, three levels of sorting are used in the library view: the artist +name, then the album, and finally the track itself. + +First, cmus sorts alphanumerically by the value of the artist tag. If a special +sorting tag is available, its value will be used instead. + +Next, cmus sorts by the album. Tracks are grouped by the album name, and the +groups are sorted by the date of the first track, then alphanumerically by the +name of the album. If the date header is not set, the album will be placed on +top of the list. + +Finally, each album is sorted by the track *discnumber*, *tracknumber*, then +filename (not the track name). + + +@h1 COMMANDS + +This section describes cmus' commands, which can be bound to keys and mouse +events, put in configuration files, executed in command mode, or passed to +cmus-remote. + +Optional parameters are in [brackets], required parameters in +and default key bindings are (parenthesized). + +add [-l] [-p] [-q] [-Q] + Adds file/dir/url/playlist to the specified view or the current view. + + @li -l + add to library + + @li -p + add to playlist + + @li -q + add play queue + + @li -Q + prepend to play queue + + Supported files are based on the loaded input plugins. + + Supported URLs: Shoutcast (`http://`...), CDDA (`cdda://`...). + + Supported playlist types: plain, .m3u, .pls. + +bind [-f] + Adds a key binding. + + @li -f + overwrite existing binding + + Valid contexts: common (i.e. all views), library (1-2), playlist (3), + queue (4), browser (5), filters (6) + + There's one context for each view. Common is a special context on which + bound keys work in every view. + + You can override specific keys in common context for a view. For example + *i* selects the current track in views 1-3 but in browser it is + overridden to toggle showing of hidden files. + + When setting custom bindings in `$XDG_CONFIG_HOME/cmus/rc`, it is + recommended to use the -f option, or else bind may fail due to an + existing binding in the autosave or system-level config files. + + Hint: You can press *tab* from command mode to expand contexts, keys, + and commands. + +browser-up (*backspace*) + Navigates the browser view to the parent directory (5). This command + only makes sense to be bound to the *browser* key context although it's + possible to use this even if browser view is not active. + +cd [directory] + Changes the current working directory. Also changes the directory + displayed in the browser view. + +clear [-l] [-p] [-q] + Removes all tracks from a single view. + + @li -l + clear library + + @li -p + clear playlist + + @li -q + clear play queue + + If a view is not specified, the current view is used. + +colorscheme + Changes the color scheme. Color schemes are found in `/usr/share/cmus/` + or `$XDG_CONFIG_HOME/cmus/` and have the extension *.theme*. + +echo ... + Displays the arguments on the command line. + + *{}* it is replaced with file name of the first selected track. + +factivate ... + Selects and activates the given user defined filters (displayed in the + filters view). Filter names are separated by spaces. This command is + mostly useful when bound to a key to change active filters quickly. If + no arguments are provided, all filters are deactivated. + + Prefix a filter name with *!* to negate it. + +filter + Temporarily filters a library view. The filter is not saved (use *fset* + and *factivate* for that). + +fset = + Defines or replaces an existing filter and adds it to the filters view + (6). + +help + Shows information about help files. + +invert + Inverts the marking of tracks in playlist and queue views. See *mark* + and *unmark*. + +live-filter + Like filter, but uses simple filters and shows a preview as you type. It + persists even after leaving command mode. + +load [-l] [-p] + Loads a playlist to a view. + + @li -l + load to library views + + @li -p + load to playlist view + + If a view is not specified, the current view is used. + +lqueue [NUM] + Queues NUM (default 1) random albums from the library. Also see + *tqueue*. + +mark + Marks tracks in playlist and queue view using a filter expression. + +mute + Toggles mute for the sound output. + +pl-create + Creates a new playlist. + +pl-export + Exports the currently selected playlist. The file will be overwritten if + it exists. + +pl-import [filename] + Imports a playlist into the playlist view. The argument can be omitted in + the file browser view. + +pl-rename + Renames the selected playlist. + +player-next (*b*) + Skips to the next track. + +player-next-album (*B*) + Skips to the next album. If *shuffle*=`tracks` or a playlist is active, + skips to the next track. + +player-pause (*c*) + Toggles pause. + +player-pause-playback + Pauses if currently playing. + +player-play [filename] (*x*) + Plays the given track, or, if none is specified, [re]plays the current + track from the beginning. + +player-prev (*z*) + Skips to the previous track. + +player-prev-album (*Z*) + Skips to the previous album. If *shuffle*=`tracks` or a playlist is active, + skips to the previous track. + +player-stop (*v*) + Stops playback. + +prev-view + Goes to the previously used view. + +left-view + Goes to the to view to the left of current one (e.g. view 4 -> view 3) + +right-view + Goes to view to the right of current one (e.g. view 3 -> view 4). + +push [text] + Enters command mode with the command line pre-set to text. Example: + + bind common w push filter artist= + + Text can contain spaces, which will be used as-is (e.g. trailing spaces + will be preserved). If no text is given, it defaults to a blank command + line. + + This command can only be used from a keybinding. + +pwd + Prints the current working directory. + +quit [-i] (*q*, *:wq*) + Exits cmus. + + @li -i + ask before exiting + +raise-vte + Raises the virtual terminal emulator window. Only works within a X + session. + +rand + Randomizes (shuffles) the tracks in the library, playlist or queue view. + +refresh (*^L*) + Redraws the terminal window. + +reshuffle + Reshuffles the shuffle lists for both library and playlist views. + +run + Runs a command for the marked tracks OR the selected one if none marked. + + By default file names are appended to the command. If the command + contains *{}* it is replaced with list of filenames. + + Note: In view 1 you can run a command for all files in the selected + album or artist. + +save [-e] [-l] [-L] [-p] [-q] [file] (*:w*) + Saves the contents of a view to a playlist file. In extended mode (-e), + also saves track metadata. + + @li -l + save library views + + @li -L + save filtered library views + + @li -p + save playlist view + + @li -q + save queue view + + If no view is specified, the current one is used. + + If no filename given the old filename is used. "-" outputs to stdout + (works only remotely). + +search-b-start + Enters backwards search mode. Cannot be used directly from command mode. + + See *search-start*. + +search-next (*n*) + If there is an active search, goes to the next match in the current + view. See *SEARCHING* above. + +search-prev (*N*) + If there is an active search, goes to the previous match in the current + view. See *SEARCHING* above. + +search-start + Enters search mode. Cannot be used directly from command mode. + + This is similar to live-filter, except it is temporary and only selects + the current match rather than filtering the entire view. + +seek [+-]([mh] | [HH:]MM:SS) + Seeks to an absolute or relative position, which can be given in + seconds, minutes (m), hours (h) or HH:MM:SS format where HH: is + optional. + + Seek 1 minute backward + :seek -1m + + Seek 5 seconds forward + :seek +5 + + Seek to absolute position 1h + :seek 1h + + Seek 90 seconds forward + :seek +1:30 + +set