1
@title CMUS 1 31/01/2010 cmus
2
3
@h1 NAME
4
5
cmus - C\* Music Player
6
7
8
@h1 SYNOPSIS
9
10
cmus [*options*]
11
12
13
@h1 DESCRIPTION
14
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).
18
19
@h1 OPTIONS
20
21
--listen ADDR
22
	Listen to ADDR (UNIX socket) instead of `~/.cmus/socket`.
23
	ADDR is either a UNIX socket or host[:port].
24
25
	*WARNING*: Using host[:port] is insecure even with password!
26
	It might be useful though in LAN if you want multiple local users to
27
	able to control cmus.  Never make cmus listen to the internet.
28
29
	NOTE: Don't use this option to run multiple instances as same user.
30
	That would corrupt the track metadata cache.
31
32
--plugins
33
	List available plugins and exit.
34
35
--show-cursor
36
	Keep cursor always visible.  This is useful for screen readers.
37
38
--help
39
	Display usage information and exit.
40
41
--version
42
	Display version information and exit.
43
44
45
@h1 VIEWS
46
47
There are 7 views in cmus.  Press keys 1-7 to change active view.
48
49
Library view (1)
50
	Display all tracks in so-called *library*. Tracks are sorted
51
	artist/album tree.  Artist sorting is done alphabetically. Albums are
52
	sorted by year.
53
54
Sorted library view (2)
55
	Displays same content as view 1, but as a simple list which is
56
	automatically sorted by user criteria.
57
58
Playlist view (3)
59
	Displays editable playlist with optional sorting.
60
61
Play Queue view (4)
62
	Displays queue of tracks which are played next. These tracks are
63
	played before anything else (i.e. the playlist or library).
64
65
Browser (5)
66
	Directory browser.  In this view, music can be added to either the
67
	library, playlist or queue from the filesystem.
68
69
Filters view (6)
70
	Lists user defined filters.
71
72
Settings view (7)
73
	Lists keybindings, unbound commands and options.  Remove bindings with
74
	*D* or *del*, change bindings and variables with *enter* and toggle
75
	variables with *space*.
76
77
@h1 COMMAND LINE
78
79
Everything in cmus is implemented as commands which can be typed at command
80
line or bound to a key.  To enter command mode type *:*.  To execute a command
81
press *ENTER* or to cancel press *ESC*.  Use up/down arrows to browse command
82
history.  Use *TAB* to complete commands and parameters, you can tab complete
83
almost anything.  You don't need to type full command names if the command is
84
unambiguous (no other commands starting with the same characters).
85
86
Examples:
87
88
	@pre
89
	# add files, short for ':add ~/music'
90
	:a ~/music
91
92
	# change output plugin
93
	:set output_plugin=oss
94
95
	# start playing
96
	# you could just press 'x' which is the default
97
	# binding for this command
98
	:player-play
99
100
	# clear current view (library, playlist or play queue)
101
	:clear
102
	@endpre
103
104
105
@h1 SEARCHING
106
107
Search mode works like the command mode, to enter search mode press */* and
108
then type the search words and press *ENTER*.  Press *n* to search next or *N*
109
to search previous match using the same search words.  Type *?* to search
110
backwards.
111
112
In views 1-4 words are compared to artist, album and title tags. Type
113
*//WORDS* or *??WORDS* to search only artists/albums in view 1 or titles in
114
views 2-4. If the file doesn't have tags words are compared to filename
115
without path.
116
117
Searching works in views 5-7 too and its logic should be pretty obvious.
118
119
120
@h1 PLAYLIST EDITING
121
122
@h2 Selecting Tracks
123
124
Editing commands affect the currently marked tracks or if there are no marked
125
tracks the currently selected track (or selected artist/album in view 1).
126
127
Mark selected track by pressing *SPACE*.  Marked tracks appear with a gray
128
background.  You can only mark tracks in the list views (2-4).
129
130
@h2 Copying Tracks Between Views
131
132
You can copy marked or selected tracks from views 1-5.
133
134
@li *a*
135
copy tracks to the library (1-2)
136
137
@li *y*
138
copy tracks to the playlist (3)
139
140
@li *e*
141
append tracks to the play queue (4)
142
143
@li *E*
144
prepend tracks to the play queue (4)
145
146
@h2 Moving Tracks
147
148
In views 2-4 you can move tracks withing the list. Note that moving is
149
disabled if the view is auto-sorted (see *lib_sort* and *pl_sort* options).
150
151
Pressing *p* moves marked tracks to the position immediately after the
152
selected track.  *P* moves them to the position immediately before the
153
selected track.  If there are no marked tracks then the selected track is
154
moved down (*p*) or up (*P*).
155
156
NOTE: Changing active filters reloads view 2 so it isn't a good idea to
157
manually order tracks in the view.
158
159
@h2 Removing Tracks
160
161
Press *D* or *delete* to remove marked or selected tracks in the current view
162
(1-4).  The tracks will be removed immediately from the view without asking
163
for confirmation.  In the browser and filters views the same keys are used to
164
remove a file or filter (will ask for confirmation).
165
166
167
@h1 STATUS LINE
168
169
Right hand side of the status line (second row from the bottom, black text on
170
a grey background) consists of the following fields:
171
172
@pre
173
aaa_mode & play_sorted & play_library | continue repeat shuffle
174
@endpre
175
176
NOTE: *aaa_mode* and *play_sorted* will be displayed only if *play_library* is
177
*true* because these are meaningless when playing the playlist (view 3).
178
179
Pressing *m*, *o*, *M*, *C*, *r* and *s* keys should make it easier to
180
understand what all those fields mean.
181
182
See CONFIGURATION OPTIONS section for more information about these options.
183
184
185
@h1 KEYBINDINGS
186
187
Here's list of default keybindings.  See *unbind* and *bind* commands in the
188
COMMANDS section.
189
190
191
@h2 Common Context
192
@pre
193
q              quit -i
194
^C             echo Type :quit<enter> to exit cmus.
195
I              echo {}
196
b              player-next
197
c              player-pause
198
x              player-play
199
z              player-prev
200
v              player-stop
201
^L             refresh
202
n              search-next
203
N              search-prev
204
.              seek +1m
205
l, right       seek +5
206
,              seek -1m
207
h, left        seek -5
208
m              toggle aaa_mode
209
C              toggle continue
210
M              toggle play_library
211
o              toggle play_sorted
212
r              toggle repeat
213
^R             toggle repeat_current
214
t              toggle show_remaining_time
215
s              toggle shuffle
216
F              push filter<space>
217
L              push live-filter<space>
218
u              update-cache
219
1              view tree
220
2              view sorted
221
3              view playlist
222
4              view queue
223
5              view browser
224
6              view filters
225
7              view settings
226
!              push shell<space>
227
]              vol +0 +1
228
[              vol +1 +0
229
+, =           vol +10%
230
}              vol -0 -1
231
{              vol -1 -0
232
-              vol -10%
233
enter          win-activate
234
E              win-add-Q
235
a              win-add-l
236
y              win-add-p
237
e              win-add-q
238
G, end         win-bottom
239
down, j        win-down
240
p              win-mv-after
241
P              win-mv-before
242
tab            win-next
243
^F, page_down  win-page-down
244
^B, page_up    win-page-up
245
D, delete      win-remove
246
i              win-sel-cur
247
space          win-toggle
248
g, home        win-top
249
k, up          win-up
250
@endpre
251
252
@h2 Browser Context
253
@pre
254
space          win-activate
255
backspace      browser-up
256
i              toggle show_hidden
257
u              win-update
258
@endpre
259
260
261
@h1 LIBRARY VIEW SORTING
262
263
The library view (the tree-like one; not the sorted library view, for which
264
the sorting is controlled by the user by setting lib_sort - see `CONFIGURATION
265
OPTIONS`), is sorted automatically by cmus using the information found in the
266
tagging information provided by the audio files.
267
268
Generally, in the library view cmus uses three levels of sorting: the first
269
level would be the artist name, the second one the album and finally the
270
actual track.
271
272
At first, cmus checks if the "filename" looks like an URL, if it does, the
273
item is given the special artist and album name *<Stream>*.
274
275
If it is a file, it is checked if the artist and album tags are set. If not,
276
cmus assigns the special name *<No Name>* for the unset tag.
277
278
As the first level, cmus sorts alphanumerically by the value of the artist
279
tag. (<Stream> and <No Name> will be used as if they where normal names.)
280
If a special sorting tag is available, it's value will be used instead.
281
282
For album names, alphanumerical sorting is not the primary method, though.
283
To decide, how the second level should be sorted, cmus looks at the date of
284
the first track of each album. Sorting is done from young to old. Of course,
285
if one artist happens to have more then one album from one year,
286
alphanumerical sorting will be used after sorting by date.
287
288
If the date header is not set, the album will be placed on top of the list (in
289
fact, the internal integer value for unset album tags is -1).
290
291
The method for third sorting level (the track) is very similar to album
292
sorting. First two numerical values are checked (discnumber and tracknumber).
293
If sorting is still ambiguous, sorting will be done alphanumerically by the
294
value of the track's `filename` (not track name!).
295
296
For simple albums, that is it. There is a special case, though. Albums, that
297
feature various artists, also known as samplers or compilations.
298
299
If a track belongs to a compilation is again decided by the existence and
300
value of special tagging information. First, it is checked if cmus should use
301
a special artist name (e.g.: `'Fatboy Slim'` for a DJ set). If so, that one
302
will be used instead of the real artist name.
303
304
If that special name tag is not set, cmus checks if another tag is
305
set. If that is the case, the album will be given the special artist
306
name *<Various Artists>*. Albums filed under *<Various Artists>* are sorted
307
alphanumerically by album name instead of by date.
308
309
That way, you do not end up with compilation tracks scattered around your
310
library view.
311
312
The problem with compilation tagging is, that there is no generic tag or
313
method, that can be regarded as a standard across all different formats,
314
supported by cmus.
315
316
For mp3, the special-name tag would be the id3v2 *TPE2* frame. The
317
mark-as-compilation tag is the *TCMP* frame (which is a user defined id3v2.3
318
frame, used at least by amarok and apple's iTunes[tm]).
319
320
For vorbis style tags (for example in ogg vorbis and flac files), the
321
special-name tag is *ALBUMARTIST* and the mark-as-compilation tag is
322
*COMPILATION*. Vorbis tags names are case insensitive.
323
324
325
@h1 COMMANDS
326
327
This section describes cmus' commands.  You can bind a key to any of these
328
commands, put these commands to configuration files and execute them in
329
command mode.  Also cmus-remote uses these commands in its protocol.
330
331
Optional parameters are in brackets, obligatory parameters in angle brackets
332
and default key bindings in parenthesis.
333
334
add [-l] [-p] [-q] [-Q] <file|dir|url|playlist>
335
	Add file/dir/url/playlist to the specified view or the current view.
336
337
	@li -l
338
	add to library
339
340
	@li -p
341
	add to playlist
342
343
	@li -q
344
	add play queue
345
346
	@li -Q
347
	prepend to play queue
348
349
	URL is a Shoutcast stream (http://...) or a CDDA URL (cdda://...)
350
	(see *PLAYING AUDIO DISCS*).
351
352
	Supported playlist: plain, .m3u, .pls.
353
354
bind [-f] <context> <key> <command>
355
	Add a key binding.
356
357
	@li -f
358
	overwrite existing binding
359
360
	Use tab to expand contexts, keys and commands.  Command is any command
361
	listed in this section.
362
363
	Valid key contexts
364
		common, library (1-2), playlist (3), queue (4), browser (5),
365
		filters (6)
366
367
	There's one context for each view.  Common is a special context on
368
	which bound keys work in every view.
369
370
	You can override specific keys in common context for a view.  For
371
	example *i* selects the current track in views 1-3 but in browser it
372
	is overridden to toggle showing of hidden files.
373
374
browser-up (*backspace*)
375
	Change to parent directory in browser view (5). This command only
376
	makes sense to be bound to the *browser* key context although it's
377
	possible to use this even if browser view is not active.
378
379
cd [directory]
380
	Changes the current working directory.  Changes the directory
381
	displayed in browser view too.
382
383
clear [-l] [-p] [-q]
384
	Remove all tracks from the specified view or the current view.
385
386
	@li -l
387
	clear library
388
389
	@li -p
390
	clear playlist
391
392
	@li -q
393
	clear play queue
394
395
colorscheme <name>
396
	Change color scheme.  Color schemes are found in `/usr/share/cmus/` or
397
	`~/.cmus/` and have .theme filename extension.
398
399
echo <arg>...
400
	Display arguments on the command line.
401
402
	If the arguments contain *{}* it is replaced with file name of the
403
	first selected track.
404
405
	NOTE: unlike with *run* the *{}* is replaced with only the first
406
	selected filename.
407
408
	Default bindings:
409
410
		@pre
411
		common  I   echo {}
412
		common  ^C  echo Type :quit<enter> to exit cmus.
413
		@endpre
414
415
factivate <user-defined-filter>...
416
	Select and activate the given user defined filters (displayed in the
417
	filters view).  Filter names are separated by spaces.  This command is
418
	mostly useful when bound to a key, to change active filters very
419
	quickly.  If no arguments given then all filters are unactivated.
420
421
	If you prefix a filter name with "!" then the filter value is negated
422
	before activation.
423
424
filter <filter-expression>
425
	Use this command when you want to temporarily filter contents of the
426
	library views without having separately define (fset) and activate the
427
	filter.  The filter is not saved.
428
429
fset <name>=<filter-expression>
430
	Define (or replace existing) filter and add it to filters view (6).
431
432
invert
433
	Invert the marking of tracks in playlist and queue views. See *mark*
434
	and *unmark*.
435
436
live-filter <simple-filter-expression|short-filter-expression>
437
	Use this command when you want to temporarily filter contents of the
438
	library views without having separately define (fset) and activate the
439
	filter.  The filter is not saved.
440
441
load [-l] [-p] <playlist>
442
	Load a playlist to the specified view or to the current view.
443
444
	@li -l
445
	load to library views
446
447
	@li -p
448
	load to playlist view
449
450
lqueue [NUM]
451
	Queue NUM (default 1) random albums from the library. See also
452
	*tqueue*.
453
454
mark <filter-expression>
455
	Mark tracks in playlist and queue view by using a filter expression.
456
457
player-next (*b*)
458
	Skip to the next track.
459
460
player-pause (*c*)
461
	Toggle pause.
462
463
player-play [filename] (*x*)
464
	Play the given track, or, if none is specified, [re]play the current
465
	track from the beginning.
466
467
player-prev (*z*)
468
	Skip to the previous track.
469
470
player-stop (*v*)
471
	Stop playback.
472
473
prev-view
474
	Go to previously used view.
475
476
push <text>
477
	Enter command mode with the command line pre-set to text. Example:
478
479
		bind common w push filter artist=
480
481
	Text can contain spaces and even trailing spaces will be honored.
482
	This command can only be bound to a key but not used in the command
483
	line directly.
484
485
quit [-i] (*q*, *:wq*)
486
	Exit cmus.
487
488
	@li -i
489
	ask before exiting
490
491
refresh (*^L*)
492
	Redraw the terminal window.
493
494
run <command>
495
	Run command for the marked tracks OR the selected one if none marked.
496
497
	By default file names are appended to the command.  If the command
498
	contains *{}* it is replaced with list of filenames.
499
500
	NOTE: In view 1 you can run a command for all files in the selected
501
	album or artist.
502
503
save [-e]  [-l] [-L] [-p] [-q]  [file]  (*:w*)
504
	Save the specified view's or the current view's contents to a playlist
505
	file. In extended mode (-e), also save metadata.
506
507
	@li -l
508
	save library views
509
510
	@li -L
511
	save filtered library views
512
513
	@li -p
514
	save playlist view
515
516
	@li -q
517
	save queue view
518
519
	If no filename given the old filename is used. "-" outputs to stdout
520
	(works only remotely).
521
522
search-next (*n*)
523
	If a search pattern has been entered before, search forward for the
524
	next match in the current view.  See *SEARCHING* above.
525
526
search-prev (*N*)
527
	If a search pattern has been entered before, search backwards for the
528
	previous match in the current view.  See *SEARCHING* above.
529
530
seek [+-](<num>[mh] | [HH:]MM:SS)
531
	Seek to absolute or relative position.  Position can be given in
532
	seconds, minutes (m), hours (h) or HH:MM:SS format where HH: is
533
	optional.
534
535
	Seek 1 minute backward
536
		:seek -1m
537
538
	Seek 5 seconds forward
539
		:seek +5
540
541
	Seek to absolute position 1h
542
		:seek 1h
543
544
	Seek 90 seconds forward
545
		:seek +1:30
546
547
	Default bindings:
548
549
		@pre
550
		common  ,      :seek -1m
551
		common  .      :seek +1m
552
		common  l      :seek +5
553
		common  h      :seek -5
554
		common  right  :seek +5
555
		common  left   :seek -5
556
		@endpre
557
558
set <option>=<value>
559
	Set value of an option. See *OPTIONS*.
560
561
set <option>
562
	Display option value.  Vim compatible *set <option>?* is also
563
	supported.
564
565
shell <command>
566
	Execute a command via /bin/sh.
567
568
showbind <context> <key>
569
	Show key binding.
570
571
shuffle
572
	Reshuffle the shuffle lists for both library and playlist views.
573
574
source <filename>
575
	Read and execute commands from <filename>.
576
577
toggle <option>
578
	Toggle value of a toggle-able option (all booleans and tristate
579
	*aaa_mode*).
580
581
tqueue [NUM]
582
	Queue NUM (default 1) random tracks from the library. See also
583
	*lqueue*.
584
585
unbind [-f] <context> <key>
586
	Remove a key binding. Use tab to cycle through bound keys.
587
588
	-f
589
		Don't throw an error if the binding is not known
590
591
unmark
592
	Unmark all tracks (see *mark*).
593
594
update-cache [-f]
595
	Update track metadata cache (~/.cmus/cache). Only files with changed
596
	modification time or removed files are considered.
597
598
	-f
599
		Update all files. Same as quit, rm -f ~/.cmus/cache, start cmus.
600
601
view <name or 1-7>
602
	Switches active view.
603
604
vol [+-]NUM[%] [[+-]NUM[%]]
605
	Set, increase or decrease volume.
606
607
	If you give *vol* just one argument it changes both channels.  Two
608
	values make it possible to change the left and right channel
609
	independently.
610
611
	To increase or decrease volume prefix the value with *-* or *+*,
612
	otherwise value is treated as absolute volume.
613
614
	Both absolute and relative values can be given as percentage units
615
	(suffixed with *%*) or as internal values (hardware may have volume in
616
	range 0-31 for example).
617
618
	Default bindings:
619
620
		@pre
621
		common  =  :vol +10%
622
		common  +  :vol +10%
623
		common  -  :vol -10%
624
		common  [  :vol +1% +0%
625
		common  ]  :vol +0% +1%
626
		common  {  :vol -1% -0%
627
		common  }  :vol -0% -1%
628
		@endpre
629
630
win-activate (*enter*)
631
	In views 1-3 start playing the selected track.  In view 5 start
632
	playing the selected track or change to the selected directory.  In
633
	view 6 activate the selected filters.  In settings view (7) change
634
	binding or variable.
635
636
win-add-l (*a*)
637
	Add the currently marked or selected track(s) (views 3-4), or the
638
	currently selected file or directory (view 5) to the library.
639
640
	Analogous to *:add -l*
641
642
win-add-p (*y*)
643
	Add the currently marked or selected track(s) (views 1-2, 4), or the
644
	currently selected file or directory (view 5) to the playlist.
645
646
	Analogous to *:add -p*
647
648
win-add-Q (*E*)
649
	Prepend the currently marked or selected track(s) (views 1-3), or the
650
	currently selected file or directory (view 5) to the play queue.
651
652
	Analogous to *:add -Q*
653
654
win-add-q (*e*)
655
	Add the currently marked or selected track(s) (views 1-3), or the
656
	currently selected file or directory (view 5) to the play queue.
657
658
	Analogous to *:add -q*
659
660
win-bottom (*G*, *end*)
661
	Goto bottom of the current window.
662
663
win-down (*j*, *down*)
664
	Goto down one row in the current window.
665
666
win-mv-after (*p*)
667
	If no tracks are marked, move the selected track down one row. If any
668
	tracks are marked, move the marked tracks after the currently selected
669
	track.  This command works in unsorted playlist and play queue view.
670
671
win-mv-before (*P*)
672
	If no tracks are marked, move the selected track up one row. If any
673
	tracks are marked, move the marked tracks before the currently
674
	selected track.  This command works in unsorted playlist and play
675
	queue view.
676
677
win-next (*tab*)
678
	Activate next window.  Only relevant in view 1.
679
680
win-page-down (*^F*, *page_down*)
681
	Goto down one page in the current window.
682
683
win-page-up (*^B*, *page_up*)
684
	Goto up one page in the current window.
685
686
win-remove (*D*, *delete*)
687
	Remove the selected entry.  For tracks no confirmations are made.  For
688
	files (view 5), filters (view 6) and bindings (view 7) user has to
689
	confirm the action.
690
691
win-sel-cur (*i*)
692
	Select the current track (position in library or playlist, not
693
	necessarily same as the currently playing track).  Works only in views
694
	1-3, does nothing in other views.
695
696
win-toggle (*space*)
697
	Expand albums in library view (1), mark tracks in views 2-4, toggle
698
	selection of a filter in view 6, toggle variable value in view 7.
699
700
win-top (*g*, *home*)
701
	Goto top of the current window.
702
703
win-up (*k*, *up*)
704
	Goto up one row in the current window.
705
706
win-update (*u*)
707
	Checks the modification time of the files in the library, and updates
708
	metadata for changed files.  Removes non-existent files from the
709
	library.
710
711
	Reloads contents of directory in the browser view.
712
713
	Only works in views 1-2 and 5, does nothing in other views.
714
715
win-update-cache [-f]
716
	Same as *update-cache*, but only for marked / selected tracks.
717
	Only works in views 1-2, does nothing in other views.
718
719
720
@h1 CONFIGURATION OPTIONS
721
722
This section describes cmus' options that can be altered with the *set* and
723
*toggle* commands. Default values are in parenthesis, possible values in
724
brackets.
725
726
auto_reshuffle (true)
727
	Reshuffle playlist when end of shuffle list is reached.
728
729
aaa_mode (all) [all, artist, album]
730
	Defines what tracks should be played in the library view.  Not used in
731
	the other views. For example if set to *artist* the player behaves
732
	like there were only the files of the currently playing artist in the
733
	library.
734
735
altformat_current [`Format String`]
736
	Alternative format string for the line displaying currently playing
737
	track.
738
739
altformat_playlist [`Format String`]
740
	Alternative format string for the list views (2-4).
741
742
altformat_title [`Format String`]
743
	Alternative format string for terminal title.  NOTE: not all
744
	terminals support changing window title.
745
746
altformat_trackwin [`Format String`]
747
	Alternative format string for the tree view's (1) track window.
748
749
buffer_seconds (10) [1-300]
750
	Size of player buffer in seconds.
751
752
color_cmdline_bg (default) [`Color`]
753
	Command line background color.
754
755
color_cmdline_fg (default) [`Color`]
756
	Command line foreground color.
757
758
color_error (lightred) [`Color`]
759
	Color of error messages displayed on the command line.
760
761
color_info (lightyellow) [`Color`]
762
	Color of informational messages displayed on the command line.
763
764
color_separator (blue) [`Color`]
765
	Color of the separator line between windows in view (1).
766
767
color_statusline_bg (gray) [`Color`]
768
	Status line background color.
769
770
color_statusline_fg (black) [`Color`]
771
	Status line foreground color.
772
773
color_titleline_bg (blue) [`Color`]
774
	Background color of the line displaying currently playing track.
775
776
color_titleline_fg (white) [`Color`]
777
	Foreground color of the line displaying currently playing track.
778
779
color_win_bg (default) [`Color`]
780
	Window background color.
781
782
color_win_cur (lightyellow) [`Color`]
783
	Color of currently playing track.
784
785
color_win_cur_sel_bg (blue) [`Color`]
786
	Background color of the selected row which is also the currently
787
	playing track in active window.
788
789
color_win_cur_sel_fg (lightyellow) [`Color`]
790
	Foreground color of the selected row which is also the currently
791
	playing track in active window.
792
793
color_win_dir (lightblue) [`Color`]
794
	Color of directories in browser.
795
796
color_win_fg (default) [`Color`]
797
	Window foreground color.
798
799
color_win_inactive_cur_sel_bg (gray) [`Color`]
800
	Background color of the selected row which is also the currently
801
	playing track in inactive window.
802
803
color_win_inactive_cur_sel_fg (lightyellow) [`Color`]
804
	Foreground color of the selected row which is also the currently
805
	playing track in inactive window.
806
807
color_win_inactive_sel_bg (gray) [`Color`]
808
	Background color of selected row in inactive window.
809
810
color_win_inactive_sel_fg (black) [`Color`]
811
	Foreground color of selected row in inactive window.
812
813
color_win_sel_bg (blue) [`Color`]
814
	Background color of selected row in active window.
815
816
color_win_sel_fg (white) [`Color`]
817
	Foreground color of selected row in active window.
818
819
color_win_title_bg (blue) [`Color`]
820
	Background color of window titles (topmost line of the screen).
821
822
color_win_title_fg (white) [`Color`]
823
	Foreground color of window titles (topmost line of the screen).
824
825
confirm_run (true)
826
	Ask for confirmation before executing *:run*
827
828
continue (true)
829
	Continue playing after current track finishes.
830
831
device (/dev/cdrom)
832
	CDDA device file.
833
834
display_artist_sort_name (false)
835
	If enabled, always displays artist names used for sorting instead of
836
	regular ones in tree view (e.g. "Artist, The" instead of "The Artist"),
837
	so that artists column looks alphabetically sorted.
838
839
format_current [`Format String`]
840
	Format string for the line displaying currently playing track.
841
842
format_playlist [`Format String`]
843
	Format string for the list views (2-4).
844
845
format_playlist_va [`Format String`]
846
	Format string for the list views (2-4), if a track is assumed to be a
847
	part of compilation (see `LIBRARY VIEW SORTING` for details).
848
849
format_title [`Format String`]
850
	Format string for terminal title.
851
852
	NOTE: not all terminals support changing window title.
853
854
format_trackwin [`Format String`]
855
	Format string for the tree view's (1) track window.
856
857
format_trackwin_va [`Format String`]
858
	Format string for the tree view's (1) track window, if a track
859
	is assumed to be a part of compilation (see `LIBRARY VIEW SORTING`
860
	for details).
861
862
smart_artist_sort (true)
863
	If enabled, makes tree view sorting ignore "The" in front of artist
864
	names, preventing artists starting with "The" from clumping together.
865
	Real `artistsort` tags override this option, when present.
866
867
id3_default_charset (ISO-8859-1)
868
	Default character set to use for ID3v1 and broken ID3v2 tags.
869
870
	NOTE:  This is used only if the tag is not valid UTF-8.
871
872
lib_sort (artist album discnumber tracknumber title filename) [`Sort Keys`]
873
	Sort keys for the sorted library view (2).
874
875
output_plugin [roar, pulse, alsa, arts, oss, sun]
876
	Name of output plugin.
877
878
pl_sort () [`Sort Keys`]
879
	Sort keys for the playlist view (3).  Empty value disables sorting and
880
	enables manually moving tracks.
881
882
play_library (true)
883
	Play tracks from the library instead of playlist.
884
885
play_sorted (false)
886
	Play tracks from the library in the sorted view (2) order instead of
887
	tree view (1) order.  Used only when play_library is true.
888
889
repeat (false)
890
	Repeat after all tracks played.
891
892
repeat_current (false)
893
	Repeat current track forever.
894
895
replaygain (disabled)
896
	Enable Replay Gain. Default is "disabled".
897
	Set to "track", "album", "track-preferred" or "album-preferred".
898
899
replaygain_limit (true)
900
	Use replay gain limiting when clipping.
901
902
replaygain_preamp (6.0)
903
	Replay gain preamplification in decibels.
904
905
resume (false)
906
	Resume playback on startup.
907
908
show_hidden (false)
909
	Display hidden files in browser.
910
911
show_current_bitrate (false)
912
	Display current bitrate in the status lines.
913
914
show_remaining_time (false)
915
	Display remaining time instead of elapsed time.
916
917
shuffle (false)
918
	Play in shuffled order.  Shuffle works in the library views (1-2) and
919
	playlist view (3).
920
921
softvol (false)
922
	Use software volume control.
923
924
	NOTE: You should probably set this to false when using *ao* as
925
	*output_plugin* to output to wav files.
926
927
softvol_state (100 100)
928
	Used to save left and right channel values for software volume
929
	control.  Two integers in range 0..100 separated by a space.  This
930
	option is not usually changed directly since *vol* command does same
931
	thing if *softvol* is true.
932
933
status_display_program () [command]
934
	This command, if not empty, is run every time cmus' status changes.
935
	It can be used to display currently playing track on desktop
936
	background or panel for example.  See
937
	`/usr/share/doc/cmus/examples/cmus-status-display`.
938
939
wrap_search (true)
940
	Controls whether the search wraps around the end.
941
942
@h2 Colors
943
944
Color is integer in range -1..255.
945
946
The following color names are recognized:
947
948
Terminal's default color, -1
949
	default
950
951
Fg & bg, 0..7
952
	black, red, green, yellow, blue, magenta, cyan, gray
953
954
Fg, 8..15
955
	darkgray, lightred, lightgreen, lightyellow, lightblue, lightmagenta,
956
	lightcyan, white
957
958
@h2 Format Strings
959
960
Format strings control display of tracks in library, playlist and play queue
961
views.
962
963
NOTE: *altformat_\** options are used when there are no tags available.
964
965
Special Keys:
966
967
	%a  %{artist}		@br
968
	%A  %{albumartist}	@br
969
	%l  %{album}		@br
970
	%D  %{discnumber}	@br
971
	%n  %{tracknumber}	@br
972
	%t  %{title}		@br
973
	%g  %{genre}		@br
974
	%c  %{comment}		@br
975
	%y  %{date}		@br
976
	%d  %{duration}		@br
977
	%f  %{path}		@br
978
	%F  %{filename}		@br
979
	    %{originaldate}	@br
980
	    %{bitrate}		@br
981
	    %{codec}		@br
982
	    %{codec_profile}	@br
983
	    %{rg_track_gain}	@br
984
	    %{rg_track_peak}	@br
985
	    %{rg_album_gain}	@br
986
	    %{rg_album_peak}	@br
987
	    %{arranger}		@br
988
	    %{composer}		@br
989
	    %{conductor}	@br
990
	    %{lyricist}		@br
991
	    %{performer}	@br
992
	    %{remixer}		@br
993
	    %{label}		@br
994
	    %{publisher}	@br
995
	    %{work}		@br
996
	    %{opus}		@br
997
	    %{partnumber}	@br
998
	    %{part}		@br
999
	    %{subtitle}		@br
1000
	    %{media}		@br
1001
	%=
1002
		start align right (use at most once)
1003
	%%
1004
		literal *%*
1005
1006
You can use printf style formatting (width, alignment, padding). As an
1007
extension, the width can have a %-suffix, to specify a percentage of the
1008
terminal width. @br
1009
To see current value of an option type *:set option=<TAB>*.
1010
1011
Note: With %{bitrate}, you'll have to append the unit yourself, as mentioned
1012
in the example below.
1013
1014
Examples:
1015
1016
	@pre
1017
	:set format_trackwin= %02n. %t (%y)%= %d
1018
	:set format_current= %n. %-30t %40F (%y)%= %d
1019
	:set format_current= %a - %l - %02n. %t%= %{bitrate}Kbps %g %y
1020
	:set format_playlist= %f%= %6{rg_track_gain} dB  %8{rg_track_peak}
1021
	:set format_playlist= %-25%a %-15%l %3n. %t%= %y %d
1022
	@endpre
1023
1024
@h2 Sort Keys
1025
1026
Sort option (lib_sort, pl_sort) value is space separated list of the following
1027
sort keys:
1028
1029
	artist, album, title, tracknumber, discnumber, date, originaldate,
1030
	genre, comment, albumartist, filename, filemtime, bitrate, codec,
1031
	media, codec_profile, rg_track_gain, rg_track_peak, rg_album_gain,
1032
	rg_album_peak
1033
1034
1035
@h1 PLUGIN OPTIONS
1036
1037
dsp.alsa.device
1038
	PCM device for ALSA plugin, usually "default".
1039
1040
mixer.alsa.channel
1041
	Mixer channel for ALSA Plugin, usually "pcm", "master" or "headphone".
1042
	To see all possible values run "alsamixer" or "amixer".
1043
1044
mixer.alsa.device
1045
	Mixer device for ALSA plugin, usually "default".
1046
1047
mixer.pulse.restore_volume
1048
	Restore the volume at startup using PulseAudio. Otherwise, cmus sets
1049
	the volume to 100%, which does not mix well with "flat volumes"
1050
	feature of PA. Defaults to "1"; set to "0" to turn off.
1051
1052
dsp.ao.buffer_size
1053
	Buffer size, default is 16kB (but you may want to try bigger values if
1054
	you experience buffer under-runs).
1055
1056
dsp.ao.driver
1057
	Output driver for libao plugin.  Example values: "alsa09", "esd",
1058
	"irix", "oss", "sun", "aixs", "wav".
1059
1060
	NOTE: of the file output drivers only "wav" is supported.
1061
1062
dsp.ao.wav_counter
1063
	Counter used for making filename.  Used only if *dsp.ao.driver* is
1064
	"wav".  For example if this is 1 and *dsp.ao.wav_dir* is "/home/user"
1065
	then PCM data is outputted to "/home/user/01.wav".  This counter is
1066
	incremented every time playback is stopped.
1067
1068
	NOTE: you probably want to set *continue* to *false* (press *C*),
1069
	otherwise playback is not stopped between tracks and all PCM data is
1070
	outputted to one wav file (useful if you want to join files).  Also
1071
	unsetting shuffle and repeat might be good idea.
1072
1073
dsp.ao.wav_dir
1074
	Output directory for libao plugin, default is your home directory.
1075
	Used only if *dsp.ao.driver* is "wav".
1076
1077
input.cdio.cddb_url
1078
	CDDB URL (default: freedb.freedb.org:8880). Use HTTP protocol if prefixed
1079
	with "http://" (e.g.: http://freedb.musicbrainz.org:80/~cddb/cddb.cgi).
1080
	Set to an empty string to disable CDDB lookup completely.
1081
1082
dsp.oss.device
1083
	PCM device for OSS plugin, usually /dev/dsp.
1084
1085
mixer.oss.channel
1086
	Mixer channel for OSS Plugin, "pcm" or "master".
1087
1088
mixer.oss.device
1089
	Mixer device for OSS plugin, usually /dev/mixer.
1090
1091
dsp.roar.server
1092
	Address of RoarAudio server. Defaults to internal defaults.
1093
	Can be UNIX, TCP/IP or DECnet address.
1094
1095
dsp.roar.role [music, background_music, ...]
1096
	Role for stream. May be used by the server to apply additional
1097
	defaults.
1098
1099
dsp.sun.device
1100
	PCM device for Sun plugin, usually /dev/audio.
1101
1102
mixer.sun.channel
1103
	Mixer channel for Sun Plugin, usually "master".
1104
1105
mixer.sun.device
1106
	Mixer device for Sun plugin, usually /dev/mixer.
1107
1108
@h1 PLAYING AUDIO DISCS
1109
1110
With the cdio input plugin enabled, it is possible to play Audio CDs and CD
1111
images. Just set the *device* option to either a device file (e.g. /dev/cdrom)
1112
or an image file (e.g. ~/cd.cue). Then add a new track using the CDDA URL
1113
scheme, e.g.:
1114
1115
	:add cdda://2
1116
1117
To add the whole disc, use cdda:// (without track number). This is currently
1118
only working for audio discs, not images. Adding track ranges is also possible
1119
(cdda://1-3). To add images without changing the device option, it is possible
1120
to include the image path in the URL, e.g.:
1121
1122
	:add cdda:///path/to/cd.cue/2-5
1123
1124
The metadata will be read from CD-Text, and if not available, looked up from
1125
a CDDB server (see *input.cdio.cddb_url*).
1126
1127
1128
@h1 FILTERS
1129
1130
Filters are used mostly for filtering contents of library views (1 & 2).
1131
Filters do not change the actual library content, i.e. *:save* command will
1132
still save all tracks to playlist file whether they are visible or not.
1133
1134
@h2 Types
1135
1136
There are three types of filter expressions, each offering more
1137
expressiveness:
1138
1139
	@li *simple*
1140
	`e.g.` beatles
1141
1142
	@li *short*
1143
	`e.g.` ~a beatles (!~y1960-1965 | ~d>600)
1144
1145
	@li *long*
1146
	`e.g.` artist="\*beatles\*"&album="R\*"
1147
1148
Simple expressions are only available using *live-filter*. For other
1149
filter commands the type is auto-detected, so both short and long
1150
expressions can be used.
1151
1152
Long expressions are lists of built-in filters or user defined filters
1153
separated with *&* (and) or *|* (or).  Parenthesis can be used group
1154
subexpressions and *!* negates result of the expression following it.
1155
Same is true for short expressions, but they can only be made of
1156
built-in filters. Also (and)-grouping is done implicitly.
1157
1158
@h2 Strings
1159
1160
@li long
1161
*filename*, *artist*, *albumartist*, *album*, *title*, *genre*, *comment*,
1162
*codec*, *codec_profile*, *media*
1163
@br
1164
Comparators: *=* and *!=* (not equal)
1165
1166
@li short
1167
*~f*, *~a*, *~A*, *~l*, *~t*, *~g*, *~c*
1168
@br
1169
Comparators: none
1170
1171
@h2 Integers
1172
1173
@li long
1174
*discnumber*, *tracknumber*, *date* (year), *originaldate* (year), *duration*
1175
(seconds), *bitrate*
1176
@br
1177
Comparators: *<*, *<=*, *=*, *>=*, *>*, *!=*
1178
1179
@li short
1180
*~D*, *~n*, *~y*, *~d*
1181
@br
1182
Comparators: *<*, *>*
1183
@br
1184
Ranges: *a-b* (>=a&<=b), *-b* (<=b), *a-* (>=a)
1185
1186
@h2 Booleans
1187
1188
*tag* (true if track has tags), *stream* (true if track is a stream)
1189
@br
1190
For short expressions: *~T* and *~s*
1191
1192
@h2 Defining Filters
1193
1194
Filters can be defined with *fset* command.  User defined filters appear in
1195
the filters view (6).
1196
1197
Create a new filter which name is *ogg* and value *filename="\*.ogg"*
1198
	:fset ogg=filename="\*.ogg"
1199
1200
Filter ogg and mp3 files from the 90s. Note the use of user defined filter
1201
*ogg*
1202
	:fset 90s-ogg-mp3=date>=1990&date<2000&(ogg|filename="\*.mp3")
1203
1204
@h2 Activating Filters
1205
1206
*factivate* changes visible contents of the library (views 1-2).
1207
1208
Activate user defined filters *ogg* and *missing-tags*
1209
	:factivate ogg missing-tags
1210
1211
Like above but negate value of *ogg* filter.
1212
	:factivate !ogg missing-tags
1213
1214
Alternatively you can select the filters by pressing *space* in view 6 and
1215
then activate the selected filters by pressing *enter*.
1216
1217
@h2 Throw-away Filters
1218
1219
*live-filter* and *filter* commands are useful when you want to use a filter only
1220
once and not save it.  It changes visible contents of the library (views 1-2).
1221
*filter* unactivates all filters in the filters view, while *live-filter* is
1222
applied in addition to all currently activated filters.
1223
1224
Filter all rock (anything with *rock* in genre tag) music from 80s-
1225
	:filter date>=1980&genre="\*rock\*"
1226
	@br
1227
	:filter ~y1980-~grock
1228
1229
Filter all artists/albums/titles containing "sleepwalking"
1230
	:live-filter sleepwalking
1231
1232
@h2 Selecting Tracks Matching a Filter
1233
1234
Mark (select) all tracks with duration less than 2 minutes
1235
	:mark duration<120
1236
1237
This command works in views 2-4.
1238
1239
1240
@h1 FILES
1241
1242
cmus reads its configuration from 3 different places.
1243
1244
`~/.cmus/autosave`
1245
	This is the first file cmus loads.  cmus saves its state on exit to
1246
	this file so you shouldn't edit it.
1247
1248
`/usr/share/cmus/rc`
1249
	If the autosave file didn't exist, this file is read instead.
1250
1251
`~/.cmus/rc`
1252
	Static config file. This file is read immediately after the autosave
1253
	file, and is never modified by cmus.  You can override auto-saved
1254
	settings in this file.  This file is not limited to options, it can
1255
	contain other commands too.
1256
1257
@h2 Color Schemes
1258
1259
There are some color schemes (\*.theme) in `/usr/share/cmus`.  You can switch
1260
them using the *:colorscheme* command.  You can put your own color schemes to
1261
~/.cmus.
1262
1263
@h2 Examples
1264
1265
Example status display script (See *status_display_program* option) can be
1266
found in `/usr/share/doc/cmus/examples`.
1267
1268
1269
@h1 ENVIRONMENT
1270
1271
CMUS_CHARSET
1272
	Override cmus character set (default: \`locale charmap\`).
1273
1274
CMUS_HOME
1275
	Override cmus config directory (default: *$HOME*/.cmus).
1276
1277
HOME
1278
	Full path of the user's home directory.
1279
1280
http_proxy
1281
	URI of the proxy to use for HTTP requests.
1282
1283
USER
1284
	Name of the user running cmus.
1285
1286
USERNAME
1287
	Fallback for *USER*.
1288
1289
1290
@h1 BUGS
1291
1292
After a crash last lines of `~/cmus-debug.txt` might
1293
contain useful information.  The file exists only if you configured cmus with
1294
maximum debug level (*./configure DEBUG=2*).
1295
1296
Feature requests and bug reports should go to the cmus-devel mailing list:
1297
	http://lists.sourceforge.net/lists/listinfo/cmus-devel
1298
1299
1300
@h1 SEE ALSO
1301
1302
*cmus-tutorial*(7), *cmus-remote*(1)
1303
1304
1305
@h1 AUTHORS
1306
1307
cmus was mainly written by Timo Hirvonen <tihirvon\@gmail.com>.  Other
1308
contributers are listed in the `AUTHORS` file.
1309
1310
This man page was written by Frank Terbeck <ft\@bewatermyfriend.org>,
1311
Timo Hirvonen <tihirvon\@gmail.com>, and Clay Barnes <clay.barnes\@gmail.com>.