1 @title CMUS 1 05/11/2006 cmus
5 cmus - C\* Music Player
15 cmus is a small ncurses based music player. It supports various output
16 methods by output-plugins. It has got completely configurable keybindings and
17 it can be controlled from the outside via *cmus-remote*(1).
22 Listen to ADDR (UNIX socket) instead of `/tmp/cmus-$USER`.
24 NOTE: Don't use this option to run multiple instances as same user.
25 That would corrupt track metadata cache.
28 List available plugins and exit.
31 Display usage information and exit.
34 Display version information and exit.
39 There are 7 views in cmus. Press keys 1-7 to change active view.
42 Display all tracks in so-called *library*. Tracks are sorted
43 artist/album tree. Artist sorting is done alphabetically. Albums are
46 Sorted library view (2)
47 Displays same content as view 1, but as a simple list which is
48 automatically sorted by user criteria.
51 Displays editable playlist with optional sorting.
54 Displays queue of tracks which are played next. These tracks are
55 played before anything else (i.e. the playlist or library).
58 Directory browser. In this view, music can be added to either the
59 library, playlist or queue from the filesystem.
62 Lists user defined filters.
65 Lists keybindings, unbound commands and options.
69 Everything in cmus is implemented as commands which can be typed at command
70 line or bound to a key. To enter command mode type *:*. To execute a command
71 press *ENTER* or to cancel press *ESC*. Use up/down arrows to browse command
72 history. Use *TAB* to complete commands and parameters, you can tab complete
73 almost anything. You don't need to type full command names if the command is
74 unambiguous (no other commands starting with the same characters).
79 # add files, short for ':add ~/music'
82 # change output plugin
83 :set output_plugin=oss
86 # you could just press 'x' which is the default
87 # binding for this command
90 # clear current view (library, playlist or play queue)
97 Search mode works like the command mode, to enter search mode press */* and
98 then type the search words and press *ENTER*. Press *n* to search next or *N*
99 to search previous match using the same search words. Type *?* to search
102 In views 1-4 words are compared to artist, album and title tags. Type
103 *//WORDS* or *??WORDS* to search only artists/albums in view 1 or titles in
104 views 2-4. If the file doesn't have tags words are compared to filename
107 Searching works in views 5-7 too and its logic should be pretty obvious.
113 Editing commands affect the currently marked tracks or if there are no marked
114 tracks the currently selected track (or selected artist/album in view 1).
116 Mark selected track by pressing *SPACE*. Marked tracks appear with a gray
117 background. You can only mark tracks in the list views (2-4).
119 @h2 Copying Tracks Between Views
121 You can copy marked or selected tracks from views 1-5.
124 copy tracks to the library (1-2)
127 copy tracks to the playlist (3)
130 append tracks to the play queue (4)
133 prepend tracks to the play queue (4)
137 In views 2-4 you can move tracks withing the list. Note that moving is
138 disabled if the view is auto-sorted (see *lib_sort* and *pl_sort* options).
140 Pressing *p* moves marked tracks to the position immediately after the
141 selected track. *P* moves them to the position immediately before the
142 selected track. If there are no marked tracks then the selected track is
143 moved down (*p*) or up (*P*).
145 NOTE: Changing active filters reloads view 2 so it isn't a good idea to
146 manually order tracks in the view.
150 Press *D* or *delete* to remove marked or selected tracks in the current view
151 (1-4). The tracks will be removed immediately from the view without asking
152 for confirmation. In the browser and filters views the same keys are used to
153 remove a file or filter (will ask for confirmation).
158 Right hand side of the status line (second row from the bottom, black text on
159 a grey background) consists of the following fields:
162 aaa_mode & play_sorted & play_library | continue repeat shuffle
165 NOTE: *aaa_mode* and *play_sorted* will be displayed only if *play_library* is
166 *true* because these are meaningless when playing the playlist (view 3).
168 Pressing *m*, *o*, *M*, *C*, *r* and *s* keys should make it easier to
169 understand what all those fields mean.
171 See CONFIGURATION OPTIONS section for more information about these options.
176 Here's list of default keybindings. See *unbind* and *bind* commands in the
182 ^C echo Type :quit<enter> to exit cmus.
198 M toggle play_library
201 t toggle show_remaining_time
226 ^F, page_down win-page-down
227 ^B, page_up win-page-up
244 This section describes cmus' commands. You can bind a key to any of these
245 commands, put these commands to configuration files and execute them in
246 command mode. Also cmus-remote uses these commands in its protocol.
248 Optional parameters are in brackets, obligatory parameters in angle brackets
249 and default key bindings in parenthesis.
251 add [-l] [-p] [-q] [-Q] <file|dir|url|playlist>
252 Add file/dir/url/playlist to the specified view or the current view.
264 prepend to play queue
266 URL is a Shoutcast stream (http://...).
268 Supported playlist: plain, .m3u, .pls.
270 bind [-f] <context> <key> <command>
274 overwrite existing binding
276 Use tab to expand contexts, keys and commands. Command is any command
277 listed in this section.
280 common, library (1-2), playlist (3), queue (4), browser (5),
283 There's one context for each view. Common is a special context on
284 which bound keys work in every view.
286 You can override specific keys in common context for a view. For
287 example *i* selects the current track in views 1-3 but in browser it
288 is overridden to toggle showing of hidden files.
290 browser-up (*backspace*)
291 Change to parent directory in browser view (5). This command only
292 makes sense to be bound to the *browser* key context although it's
293 possible to use this even if browser view is not active.
296 Changes the current working directory. Changes the directory
297 displayed in browser view too.
300 Remove all tracks from the specified view or the current view.
312 Change color scheme. Color schemes are found in `/usr/share/cmus/` or
313 `~/.cmus/` and have .theme filename extension.
316 Display arguments on the command line.
318 If the arguments contain *{}* it is replaced with file name of the
319 first selected track.
321 NOTE: unlike with *run* the *{}* is replaced with only the first
328 common ^C echo Type :quit<enter> to exit cmus.
331 factivate <user-defined-filter>...
332 Select and activate the given user defined filters (displayed in the
333 filters view). Filter names are separated by spaces. This command is
334 mostly useful when bound to a key, to change active filters very
335 quickly. If no arguments given then all filters are unactivated.
337 If you prefix a filter name with "!" then the filter value is negated
340 filter <filter-expression>
341 Use this command when you want to temporarily filter contents of the
342 library views without having separately define (fset) and activate the
343 filter. The filter is not saved.
345 fset <name>=<filter-expression>
346 Define (or replace existing) filter and add it to filters view (6).
349 Invert the marking of tracks in playlist and queue views. See *mark*
352 load [-l] [-p] <playlist>
353 Load a playlist to the specified view or to the current view.
356 load to library views
359 load to playlist view
361 mark <filter-expression>
362 Mark tracks in playlist and queue view by using a filter expression.
365 Skip to the next track.
371 If stopped, start playing the current song; if already playing seek to
372 beginning of the current song.
375 Skip to the previous track.
384 Redraw the terminal window.
387 Run command for the marked tracks OR the selected one if none marked.
389 By default file names are appended to the command. If the command
390 contains *{}* it is replaced with list of filenames.
392 NOTE: In view 1 you can run a command for all files in the selected
395 save [-l] [-p] [file]
396 Save the specified view's or the current view's contents to a playlist
405 If no filename given the old filename is used.
408 If a search pattern has been entered before, search forward for the
409 next match in the current view. See *SEARCHING* above.
412 If a search pattern has been entered before, search backwards for the
413 previous match in the current view. See *SEARCHING* above.
415 seek [+-](<num>[mh] | [HH:]MM:SS)
416 Seek to absolute or relative position. Position can be given in
417 seconds, minutes (m), hours (h) or HH:MM:SS format where HH: is
420 Seek 1 minute backward
423 Seek 5 seconds forward
426 Seek to absolute position 1h
429 Seek 90 seconds forward
439 common right :seek +5
444 Set value of an option. See *OPTIONS*.
447 Display option value. Vim compatible *set <option>?* is also
450 showbind <context> <key>
454 Reshuffle the shuffle lists for both library and playlist views.
457 Read and execute commands from <filename>.
460 Toggle value of a toggle-able option (all booleans and tristate
463 unbind [-f] <context> <key>
464 Remove a key binding. Use tab to cycle through bound keys.
467 Don't throw an error if the binding is not known
470 Unmark all tracks (see *mark*).
473 Switches active view.
475 vol [+-]NUM[%] [[+-]NUM[%]]
476 Set, increase or decrease volume.
478 If you give *vol* just one argument it changes both channels. Two
479 values make it possible to change the left and right channel
482 To increase or decrease volume prefix the value with *-* or *+*,
483 otherwise value is treated as absolute volume.
485 Both absolute and relative values can be given as percentage units
486 (suffixed with *%*) or as internal values (hardware may have volume in
487 range 0-31 for example).
501 win-activate (*enter*)
502 In views 1-3 start playing the selected track. In view 5 start
503 playing the selected track or change to the selected directory. In
504 view 6 activate the selected filters.
507 Add the currently marked or selected track(s) (views 3-4), or the
508 currently selected file or directory (view 5) to the library.
510 Analogous to *:add -l*
513 Add the currently marked or selected track(s) (views 1-2, 4), or the
514 currently selected file or directory (view 5) to the playlist.
516 Analogous to *:add -p*
519 Prepend the currently marked or selected track(s) (views 1-3), or the
520 currently selected file or directory (view 5) to the play queue.
522 Analogous to *:add -Q*
525 Add the currently marked or selected track(s) (views 1-3), or the
526 currently selected file or directory (view 5) to the play queue.
528 Analogous to *:add -q*
530 win-bottom (*g*, *end*)
531 Goto bottom of the current window.
533 win-down (*j*, *down*)
534 Goto down one row in the current window.
537 If no tracks are marked, move the selected track down one row. If any
538 tracks are marked, move the marked tracks after the currently selected
539 track. This command works in unsorted playlist and play queue view.
542 If no tracks are marked, move the selected track up one row. If any
543 tracks are marked, move the marked tracks before the currently
544 selected track. This command works in unsorted playlist and play
548 Activate next window. Only relevant in view 1.
550 win-page-down (*^F*, *page_down*)
551 Goto down one page in the current window.
553 win-page-up (*^B*, *page_up*)
554 Goto up one page in the current window.
556 win-remove (*D*, *delete*)
557 Remove the selected entry. For tracks no confirmations are made. For
558 files (view 5) and filters (view 6) user has to confirm the action.
561 Select the current track (position in library or playlist, not
562 necessarily same as the currently playing track). Works only in views
563 1-3, does nothing in other views.
566 Expand albums in library view (1), mark tracks in views (2-4), toggle
567 selection of a filter in view 6.
569 win-top (*g*, *home*)
570 Goto top of the current window.
573 Goto up one row in the current window.
576 Checks the modification time of the files in the library, and updates
577 metadata for changed files. Removes non-existent files from the
580 Reloads contents of directory in the browser view.
582 Only works in views 1-2 and 5, does nothing in other views.
585 @h1 CONFIGURATION OPTIONS
587 This section describes cmus' options that can be altered with the *set* and
588 *toggle* commands. Default values are in parenthesis, possible values in
591 auto_reshuffle (false)
592 Reshuffle playlist when end of shuffle list is reached.
594 aaa_mode (all) [all, artist, album]
595 Defines what tracks should be played in the library view. Not used in
596 the other views. For example if set to *artist* the player behaves
597 like there were only the files of the currently playing artist in the
600 altformat_current [`Format String`]
601 Alternative format string for the line displaying currently playing
604 altformat_playlist [`Format String`]
605 Alternative format string for the list views (2-4).
607 altformat_title [`Format String`]
608 Alternative format string for terminal tittle. NOTE: not all
609 terminals support changing window title.
611 altformat_trackwin [`Format String`]
612 Alternative format string for the tree view's (1) track window.
614 buffer_seconds (10) [1-20]
615 Size of player buffer in seconds.
617 color_cmdline_bg (default) [`Color`]
618 Command line background color.
620 color_cmdline_fg (default) [`Color`]
621 Command line foreground color.
623 color_error (lightred) [`Color`]
624 Color of error messages displayed on the command line.
626 color_info (lightyellow) [`Color`]
627 Color of informational messages displayed on the command line.
629 color_separator (blue) [`Color`]
630 Color of the separator line between windows in view (1).
632 color_statusline_bg (gray) [`Color`]
633 Status line background color.
635 color_statusline_fg (black) [`Color`]
636 Status line foreground color.
638 color_titleline_bg (blue) [`Color`]
639 Background color of the line displaying currently playing track.
641 color_titleline_fg (white) [`Color`]
642 Foreground color of the line displaying currently playing track.
644 color_win_bg (default) [`Color`]
645 Window background color.
647 color_win_cur (lightyellow) [`Color`]
648 Color of currently playing track.
650 color_win_cur_sel_bg (blue) [`Color`]
651 Background color of the selected row which is also the currently
652 playing track in active window.
654 color_win_cur_sel_fg (lightyellow) [`Color`]
655 Foreground color of the selected row which is also the currently
656 playing track in active window.
658 color_win_dir (lightblue) [`Color`]
659 Color of directories in browser.
661 color_win_fg (default) [`Color`]
662 Window foreground color.
664 color_win_inactive_cur_sel_bg (gray) [`Color`]
665 Background color of the selected row which is also the currently
666 playing track in inactive window.
668 color_win_inactive_cur_sel_fg (lightyellow) [`Color`]
669 Foreground color of the selected row which is also the currently
670 playing track in inactive window.
672 color_win_inactive_sel_bg (gray) [`Color`]
673 Background color of selected row in inactive window.
675 color_win_inactive_sel_fg (black) [`Color`]
676 Foreground color of selected row in inactive window.
678 color_win_sel_bg (blue) [`Color`]
679 Background color of selected row in active window.
681 color_win_sel_fg (white) [`Color`]
682 Foreground color of selected row in active window.
684 color_win_title_bg (blue) [`Color`]
685 Background color of window titles (topmost line of the screen).
687 color_win_title_fg (white) [`Color`]
688 Foreground color of window titles (topmost line of the screen).
691 Ask for confirmation before executing *:run*
694 Continue playing after current track finishes.
696 format_current [`Format String`]
697 Format string for the line displaying currently playing track.
699 format_playlist [`Format String`]
700 Format string for the list views (2-4).
702 format_title [`Format String`]
703 Format string for terminal tittle.
705 NOTE: not all terminals support changing window title.
707 format_trackwin [`Format String`]
708 Format string for the tree view's (1) track window.
710 id3_default_charset (ISO-8859-1)
711 Default character set to use for ID3v1 and broken ID3v2 tags.
713 NOTE: This is used only if the tag is not valid UTF-8.
715 lib_sort (artist album discnumber tracknumber title filename) [`Sort Keys`]
716 Sort keys for the sorted library view (2).
718 output_plugin [alsa, arts, oss, sun]
719 Name of output plugin.
721 pl_sort () [`Sort Keys`]
722 Sort keys for the playlist view (3). Empty value disables sorting and
723 enables manually moving tracks.
726 Play tracks from the library instead of playlist.
729 Play tracks from the library in the sorted view (2) order instead of
730 tree view (1) order. Used only when play_library is true.
733 Repeat after all tracks played.
736 Display hidden files in browser.
738 show_remaining_time (false)
739 Display remaining time instead of elapsed time.
742 Play in shuffled order. Shuffle works in the library views (1-2) and
746 Use software volume control.
748 NOTE: You should probably set this to false when using *ao* as
749 *output_plugin* to output to wav files.
751 softvol_state (100 100)
752 Used to save left and right channel values for software volume
753 control. Two integers in range 0..100 separated by a space. This
754 option is not usually changed directly since *vol* command does same
755 thing if *softvol* is true.
757 status_display_program () [command]
758 This command, if not empty, is run every time cmus' status changes.
759 It can be used to display currently playing track on desktop
760 background or panel for example. See
761 `/usr/share/doc/cmus/examples/cmus-status-display`.
765 Color is integer in range -1..255.
767 The following color names are recognized:
769 Terminal's default color, -1
773 black, red, green, yellow, blue, magenta, cyan, gray
776 darkgray, lightred, lightgreen, lightyellow, lightblue, lightmagenta,
781 Format strings control display of tracks in library, playlist and play queue
784 NOTE: *altformat_\** options are used when there are no tags available.
809 start align right (use at most once)
813 You can use printf style formatting (width, alignment, padding). To see
814 current value of an option type *:set option=<TAB>*.
819 :set format_trackwin= %02n. %t (%y)%= %d
820 :set format_current= %n. %-30t %40F (%y)%= %d
825 Sort option (lib_sort, pl_sort) value is space separated list of the following
828 artist, album, title, tracknumber, discnumber, date, genre, filename
834 PCM device for ALSA plugin, usually "default".
837 Mixer channel for ALSA Plugin, usually "pcm", "master" or "headphone".
838 To see all possible values run "alsamixer" or "amixer".
841 Mixer device for ALSA plugin, usually "default".
844 Buffer size, default is 8192 but you may want to try bigger values if
845 you experience buffer under-runs.
848 Output driver for libao plugin. Example values: "alsa09", "esd",
849 "irix", "oss", "sun", "aixs", "wav".
851 NOTE: of the file output drivers only "wav" is supported.
854 Counter used for making filename. Used only if *dsp.ao.driver* is
855 "wav". For example if this is 1 and *dsp.ao.wav_dir* is "/home/user"
856 then PCM data is outputted to "/home/user/01.wav". This counter is
857 incremented every time playback is stopped.
859 NOTE: you probably want to set *continue* to *false* (press *C*),
860 otherwise playback is not stopped between tracks and all PCM data is
861 outputted to one wav file (useful if you want to join files). Also
862 unsetting shuffle and repeat might be good idea.
865 Output directory for libao plugin, default is your home directory.
866 Used only if *dsp.ao.driver* is "wav".
869 PCM device for OSS plugin, usually /dev/dsp.
872 Mixer channel for OSS Plugin, "pcm" or "master".
875 Mixer device for OSS plugin, usually /dev/mixer.
878 PCM device for Sun plugin, usually /dev/audio.
881 Mixer channel for Sun Plugin, usually "master".
884 Mixer device for Sun plugin, usually /dev/mixer.
889 Filters are used mostly for filtering contents of library views (1 & 2).
890 Filters do not change the actual library content, i.e. *:save* command will
891 still save all tracks to playlist file whether they are visible or not.
895 Filter expression is list of built-in filters or user defined filters
896 separated with *&* (and) or *|* (or). Parenthesis can be used group
897 subexpressions and *!* negates result of the expression following it.
901 *filename*, *artist*, *album*, *title*, *genre*
903 Comparators: *=* and *!=* (not equal)
907 *discnumber*, *tracknumber*, *date* (year), *duration* (seconds)
909 Comparators: *<*, *<=*, *=*, *>=*, *>*, *!=*
913 *tag* (true if track has tags), *stream* (true if track is a stream)
917 Filters can be defined with *fset* command. User defined filters appear in
918 the filters view (6).
920 Create a new filter which name is *ogg* and value *filename="\*.ogg"*
921 :fset ogg=filename="\*.ogg"
923 Filter ogg and mp3 files from the 90s. Note the use of user defined filter
925 :fset 90s-ogg-mp3=date>=1990&date<2000&(ogg|filename="\*.mp3")
927 @h2 Activating Filters
929 *factivate* changes visible contents of the library (views 1-2).
931 Activate user defined filters *ogg* and *missing-tags*
932 :factivate ogg missing-tags
934 Like above but negate value of *ogg* filter.
935 :factivate !ogg missing-tags
937 Alternatively you can select the filters by pressing *space* in view 6 and
938 then activate the selected filters by pressing *enter*.
940 @h2 Throw-away Filters
942 *filter* command is useful when you want to use a filter only once and not
943 save it. It changes visible contents of the library (views 1-2) and
944 unactivates all filters in the filters view.
946 Filter all rock (anything with *rock* in genre tag) music from 80s-
947 :filter date>=1980&genre="\*rock\*"
949 @h2 Selecting Tracks Matching a Filter
951 Mark (select) all tracks with duration less than 2 minutes
954 This command works in views 2-4.
959 cmus reads its configuration from 3 different places.
962 This is the first file cmus loads. cmus saves its state on exit to
963 this file so you shouldn't edit it.
966 If the autosave file didn't exist, this file is read instead.
969 Static config file. This file is read immediately after the autosave
970 file, and is never modified by cmus. You can override auto-saved
971 settings in this file. This file is not limited to options, it can
972 contain other commands too.
976 There are some color schemes (\*.theme) in `/usr/share/cmus`. You can switch
977 them using the *:colorscheme* command. You can put your own color schemes to
982 Example status display script (See *status_display_program* option) can be
983 found in `/usr/share/doc/cmus/examples`.
988 After a crash last lines of `/tmp/cmus-debug` (or $TMPDIR/cmus-debug) might
989 contain useful information. The file exists only if you configured cmus with
990 maximum debug level (*./configure DEBUG=2*).
992 Feature requests and bug reports should go to the cmus-devel mailing list:
993 http://lists.sourceforge.net/lists/listinfo/cmus-devel
1003 cmus was mainly written by Timo Hirvonen <tihirvon\@gmail.com>. Other
1004 contributers are listed in the `AUTHORS` file.
1006 This man page was written by Frank Terbeck <ft\@bewatermyfriend.de>,
1007 Timo Hirvonen <tihirvon\@gmail.com>, and Clay Barnes <clay.barnes\@gmail.com>.