Restore curses after running external command
[ncmpcpp.git] / doc / ncmpcpp.1
blobaeedd1bd8e4edd5c7e4d13c065d95b922fc9962b
1 .TH "ncmpcpp" "1"
2 .SH "NAME"
3 ncmpcpp \- An ncurses Music Player Daemon (MPD) client.
4 .SH "SYNOPSIS"
5 .B ncmpcpp
6 [options]
7 .SH "DESCRIPTION"
8 ncmpcpp is an ncurses client for MPD (Music Player Daemon), inspired by ncmpc.
10 Read more about MPD at http://www.musicpd.org
11 .SH "OPTIONS"
12 Mandatory arguments to long options are mandatory for short options too.
13 .TP
14 \fB\-h\fR, \fB\-\-host\fR=\fIHOST\fR
15 Connect to server at host [localhost]
16 .TP
17 \fB\-p\fR, \fB\-\-port\fR=\fIPORT\fR
18 Connect to server at port [6600]
19 .TP
20 \fB\-\-current-song\fR[=\fIFORMAT\fR]
21 Print current song using given format and exit
22 .TP
23 \fB\-c\fR, \fB\-\-config\fR=\fIFILE\fR
24 Specify configuration file(s)
25 .TP
26 \fB\-\-ignore-config-errors\fR
27 Ignore unknown and invalid options in configuration files
28 .TP
29 \fB\-c\fR, \fB\-\-bindings\fR=\fIFILE\fR
30 Specify bindings file(s)
31 .TP
32 \fB\-s\fR, \fB\-\-screen <name>\fR
33 Specify the startup screen (<name> may be: help, playlist, browser, search_engine, media_library, playlist_editor, tag_editor, outputs, visualizer, clock)
34 .TP
35 \fB\-S\fR, \fB\-\-slave-screen <name>\fR
36 Specify the startup slave screen (<name> may be: help, playlist, browser, search_engine, media_library, playlist_editor, tag_editor, outputs, visualizer, clock)
37 .TP
38 \fB\-q\fR, \fB\-\-quiet\fR
39 Suppress logs and excess output
40 .TP
41 \fB\-?\fR, \fB\-\-help\fR
42 Display help.
43 .TP
44 \fB\-v\fR, \fB\-\-version\fR
45 Display version information.
47 .SH "CONFIGURATION"
48 When ncmpcpp starts, it tries to read user's settings from $HOME/.ncmpcpp/config and $XDG_CONFIG_HOME/ncmpcpp/config files. If no configuration is found, ncmpcpp uses its default configuration. An example configuration file containing all default values is provided with ncmpcpp and can be usually found in /usr/share/doc/ncmpcpp (exact location may depend on used distribution or configure prefix).
50 Note: Configuration option values can either be enclosed in quotation marks or not.
51  - If they are enclosed, the leftmost and the rightmost quotation marks are treated as delimiters, therefore it is not necessary to escape quotation marks you use within the value itself.
52  - If they are not, any whitespace characters between = and the first printable character of the value, as well as whitespace characters after the last printable character of the value are trimmed.
54 Therefore the rule of thumb is: if you need whitespaces at the beginning or at the end of the value, enclose it in quotation marks. Otherwise, don't.
56 Note: COLOR has to be the name (not a number) of one of colors 1-8 from SONG FORMAT section.
58 Supported configuration options:
59 .TP
60 .B ncmpcpp_directory = PATH
61 Directory for storing ncmpcpp related files. Changing it is useful if you want to store everything somewhere else and provide command line setting for alternative location to config file which defines that while launching ncmpcpp.
62 .TP
63 .B lyrics_directory = PATH
64 Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other MPD clients (eg. ncmpc) also use that location.
65 .TP
66 .B mpd_host = HOST
67 Connect to MPD running on specified host/unix socket. When HOST starts with a '/', it is assumed to be a unix socket. Note: MPD_HOST environment variable overrides this setting.
68 .TP
69 .B mpd_port = PORT
70 Connect to MPD on the specified port. Note: MPD_PORT environment variable overrides this setting.
71 .TP
72 .B mpd_music_dir = PATH
73 Search for files in specified directory. This is needed for tag editor to work.
74 .TP
75 .B mpd_connection_timeout = SECONDS
76 Set connection timeout to MPD to given value.
77 .TP
78 .B mpd_crossfade_time = SECONDS
79 Default number of seconds to crossfade, if enabled by ncmpcpp.
80 .TP
81 .B visualizer_fifo_path = PATH
82 Path to mpd fifo output. This is needed to make music visualizer work (note that output sound format of this fifo has to be either 44100:16:1 or 44100:16:2, depending on whether you want mono or stereo visualization)
83 .TP
84 .B visualizer_output_name = NAME
85 Name of output that provides data for visualizer. Needed to keep sound and visualization in sync.
86 .TP
87 .B visualizer_in_stereo = yes/no
88 Should be set to 'yes', if fifo output's format was set to 44100:16:2.
89 .TP
90 .B visualizer_sync_interval = SECONDS
91 Defines interval between syncing visualizer and audio outputs.
92 .TP
93 .B visualizer_type = spectrum/wave/wave_filled/ellipse
94 Defines default visualizer type (spectrum is available only if ncmpcpp was compiled with fftw support).
95 .TP
96 .B visualizer_look = STRING
97 Defines visualizer's look (string has to be exactly 2 characters long: first one is for wave whereas second for frequency spectrum).
98 .TP
99 .B visualizer_color = COLORS
100 Comma separated list of colors to be used in music visualization.
102 .B system_encoding = ENCODING
103 If you use encoding other than utf8, set it in order to handle utf8 encoded strings properly.
105 .B playlist_disable_highlight_delay = SECONDS
106 Delay for highlighting playlist since the last key was pressed. If set to 0, highlighting never fades away.
108 .B message_delay_time = SECONDS
109 Delay for displayed messages to remain visible.
111 .B song_list_format
112 Song format for lists of songs.
114 .B song_status_format
115 Song format for statusbar.
117 .B song_library_format
118 Song format for media library.
120 .B alternative_header_first_line_format = TEXT
121 Now playing song format for the first line in alternative user interface header window.
123 .B alternative_header_second_line_format = TEXT
124 Now playing song format for the second line in alternative user interface header window.
126 .B current_item_prefix = TEXT
127 Prefix for currently selected item.
129 .B current_item_suffix = TEXT
130 Suffix for currently selected item.
132 .B current_item_inactive_column_prefix = TEXT
133 Prefix for currently selected item in the inactive column.
135 .B current_item_inactive_column_suffix = TEXT
136 Suffix for currently selected item in the inactive column.
138 .B now_playing_prefix = TEXT
139 Prefix for currently playing song.
141 .B now_playing_suffix = TEXT
142 Suffix for currently playing song.
144 .B browser_playlist_prefix = TEXT
145 Prefix for playlists in Browser.
147 .B selected_item_prefix = TEXT
148 Prefix for selected items.
150 .B selected_item_suffix = TEXT
151 Suffix for selected items.
153 .B modified_item_prefix = TEXT
154 Prefix for modified item (tag editor).
156 .B browser_sort_mode
157 Determines sort mode for browser. Possible values are "name", "mtime", "format" and "noop".
159 .B browser_sort_format
160 Format to use for sorting songs in browser. For this option to be effective, browser_sort_mode must be set to "format".
162 .B song_window_title_format
163 Song format for window title.
165 .B song_columns_list_format
166 Format for songs' list displayed in columns.
168 .B execute_on_song_change = COMMAND
169 Shell command to execute on song change.
171 .B execute_on_player_state_change = COMMAND
172 Shell command to execute on player state change. The environment variable
173 .B MPD_PLAYER_STATE
174 is set to the current state (either unknown, play, pause, or stop) for its duration.
176 .B playlist_show_mpd_host = yes/no
177 If enabled, current MPD host will be shown in playlist.
179 .B playlist_show_remaining_time = yes/no
180 If enabled, time remaining to end of playlist will be shown after playlist statistics.
182 .B playlist_shorten_total_times = yes/no
183 If enabled, total/remaining playlist time displayed in statusbar will be shown using shortened units' names (d:h:m:s instead of days:hours:minutes:seconds).
185 .B playlist_separate_albums = yes/no
186 If enabled, separators will be placed between albums.
188 .B playlist_display_mode = classic/columns
189 Default display mode for Playlist.
191 .B browser_display_mode = classic/columns
192 Default display mode for Browser.
194 .B search_engine_display_mode = classic/columns
195 Default display mode for Search engine.
197 .B playlist_editor_display_mode = classic/columns
198 Default display mode for Playlist editor.
200 .B discard_colors_if_item_is_selected = yes/no
201 Indicates whether custom colors of tags have to be discarded if item is selected or not.
203 .B show_duplicate_tags = yes/no
204 Indicates whether ncmpcpp should display multiple tags as-is or remove duplicates.
206 .B incremental_seeking = yes/no
207 If enabled, seek time will increment by one each second of seeking.
209 .B seek_time = SECONDS
210 Base seek time to begin with.
212 .B volume_change_step = NUMBER
213 Number of percents volume has to be increased/decreased by in volume_up/volume_down.
215 .B autocenter_mode = yes/no
216 Default state for autocenter mode at start.
218 .B centered_cursor = yes/no
219 If enabled, currently highlighted position in the list will be always centered.
221 .B progressbar_look = TEXT
222 This variable defines the look of progressbar. Note that it has to be exactly two or three characters long.
224 .B default_place_to_search_in = database/playlist
225 If set to "playlist", Search engine will perform searching in current MPD playlist rather than in music database.
227 .B user_interface = classic/alternative
228 Default user interface used by ncmpcpp at start.
230 .B data_fetching_delay = yes/no
231 If enabled, there will be a 250ms delay between refreshing position in media library or playlist editor and fetching appropriate data from MPD. This limits data fetched from the server and is particularly useful if ncmpcpp is connected to a remote host.
233 .B media_library_primary_tag = artist/album_artist/date/genre/composer/performer
234 Default tag type for leftmost column in media library.
236 .B media_library_albums_split_by_date = yes/no
237 Determines whether albums in media library should be split by date.
239 .B default_find_mode = wrapped/normal
240 If set to "wrapped", going from last found position to next will take you to the first one (same goes for the first position and going to previous one), otherwise no actions will be performed.
242 .B default_tag_editor_pattern = TEXT
243 Default pattern used by Tag editor's parser.
245 .B header_visibility = yes/no
246 If enabled, header window will be displayed, otherwise hidden.
248 .B statusbar_visibility = yes/no
249 If enabled, statusbar will be displayed, otherwise hidden.
251 .B titles_visibility = yes/no
252 If enabled, column titles will be displayed, otherwise hidden.
254 .B header_text_scrolling = yes/no
255 If enabled, text in header window will scroll if its length is longer then actual screen width, otherwise it won't.
257 .B cyclic_scrolling = yes/no
258 If enabled, cyclic scrolling is used (e.g. if you press down arrow being at the end of list, it'll take you to the beginning)
260 .B lines_scrolled = NUMBER
261 Number of lines that are scrolled with mouse wheel.
263 .B lyrics_fetchers = FETCHERS
264 Comma separated list of lyrics fetchers.
266 .B follow_now_playing_lyrics = yes/no
267 If enabled, lyrics will be switched at song's change to currently playing one's (Note: this works only if you are viewing lyrics of item from Playlist).
269 .B fetch_lyrics_for_current_song_in_background = yes/no
270 If enabled, each time song changes lyrics fetcher will be automatically run in background in attempt to download lyrics for currently playing song.
272 .B store_lyrics_in_song_dir = yes/no
273 If enabled, lyrics will be saved in song's directory, otherwise in ~/.lyrics. Note that it needs properly set mpd_music_dir.
275 .B generate_win32_compatible_filenames = yes/no
276 If set to yes, filenames generated by ncmpcpp (with tag editor, for lyrics, artists etc.) will not contain the following characters: \\?*:|\"<> - otherwise only slash (/) will not be used.
278 .B allow_for_physical_item_deletion = yes/no
279 If set to yes, it will be possible to physically delete files and directories from the disk in the browser.
281 .B lastfm_preferred_language = ISO 639 alpha-2 language code
282 If set, ncmpcpp will try to get info from last.fm in language you set and if it fails, it will fall back to English. Otherwise it will use English the first time.
284 .B space_add_mode = add_remove/always_add
285 If set to add_remove, attempting to add files that are already in playlist will remove them. Otherwise they can be added multiple times.
287 .B show_hidden_files_in_local_browser = yes/no
288 Trigger for displaying in local browser files and directories that begin with '.'
290 .B screen_switcher_mode = SWITCHER_MODE
291 If set to "previous", key_screen_switcher will switch between current and last used screen. If set to "screen1,...screenN" (a list of screens) it will switch between them in a sequence. Syntax clarification can be found in example config file.
293 .B startup_screen = SCREEN_NAME
294 Screen that has to be displayed at start (playlist by default).
296 .B startup_slave_screen = SCREEN_NAME
297 Slave screen that has to be displayed at start (nothing by default).
299 .B startup_slave_screen_focus = yes/no
300 If set to yes, slave screen will be the active one after startup. Otherwise master screen will be.
301 .TP 
302 .B locked_screen_width_part = 20-80
303 If you want to lock a screen, ncmpcpp asks for % of locked screen's width to be reserved before that and provides a default value, which is the one you can set here.
305 .B ask_for_locked_screen_width_part = yes/no
306 If enabled, ncmpcpp will ask for % of locked screen's width each time you want to lock a screen. If you disable that, it'll silently attempt to use default value.
308 .B jump_to_now_playing_song_at_start = yes/no
309 If enabled, ncmpcpp will jump at start to now playing song if mpd is playing or paused.
311 .B ask_before_clearing_playlists = yes/no
312 If enabled, user will be asked if he really wants to clear the playlist after pressing key responsible for that.
314 .B clock_display_seconds = yes/no
315 If enabled, clock will display time in format hh:mm:ss, otherwise hh:mm.
317 .B display_volume_level = yes/no
318 If enabled, volume level will be displayed in statusbar, otherwise not.
320 .B display_bitrate = yes/no
321 If enabled, bitrate of currently playing song will be displayed in statusbar.
323 .B display_remaining_time = yes/no
324 If enabled, remaining time of currently playing song will be be displayed in statusbar instead of elapsed time.
326 .B regular_expressions = none/basic/extended/perl
327 Type of currently used regular expressions.
329 .B ignore_leading_the = yes/no
330 If enabled, word "the" at the beginning of tags/filenames/sort format will be ignored while sorting items.
332 .B ignore_diacritics = yes/no
333 If enabled, diacritics in strings will be ignored while searching and filtering lists.
335 .B block_search_constraints_change_if_items_found = yes/no
336 If enabled, fields in Search engine above "Reset" button will be blocked after successful searching, otherwise they won't.
338 .B mouse_support = yes/no
339 If set to yes, mouse support will be enabled.
341 .B mouse_list_scroll_whole_page = yes/no
342 If enabled, mouse wheel will scroll the whole page of item list at a time, otherwise the number of lines specified by lines_scrolled variable.
344 .B empty_tag_marker = TEXT
345 Text that will be displayed, if requested tag is not set.
347 .B tags_separator = TEXT
348 Separator that is placed between tags. Also interpreted by tag editor which splits input string into separate tags using it.
350 .B tag_editor_extended_numeration = yes/no
351 If enabled, tag editor will number tracks using format xx/yy (where xx is the current track and yy is total amount of all numbered tracks), not plain xx.
353 .B media_library_sort_by_mtime = yes/no
354 If enabled, media library will be sorted by modification time. Otherwise lexicographic sorting is used.
356 .B enable_window_title = yes/no
357 If enabled, ncmpcpp will override current window title with its own one.
359 .B search_engine_default_search_mode = MODE_NUMBER
360 Number of default mode used in search engine.
362 .B external_editor = PATH
363 Path to external editor used to edit lyrics.
365 .B use_console_editor = yes/no
366 If your external editor is console application, you need to enable it.
368 .B colors_enabled = yes/no
369 No need to describe it, huh?
371 .B empty_tag_color = COLOR
372 Color of empty tag marker.
374 .B header_window_color = COLOR
375 Color of header window.
377 .B volume_color = COLOR
378 Color of volume state.
380 .B state_line_color = COLOR
381 Color of lines separating header and statusbar from main window.
383 .B state_flags_color = COLOR
384 Color of MPD status flags.
386 .B main_window_color = COLOR
387 Color of main window.
389 .B color1 = COLOR
390 One of colors used in Song info, Tiny tag editor and Search engine.
392 .B color2 = COLOR
393 One of colors used in Song info, Tiny tag editor and Search engine.
395 .B progressbar_color = COLOR
396 Color of progressbar.
398 .B progressbar_elapsed_color = COLOR
399 Color of part of progressbar that represents elapsed time.
401 .B statusbar_color = COLOR
402 Color of statusbar.
404 .B statusbar_time_color = COLOR
405 Color of current track time shown in statusbar.
407 .B player_state_color = COLOR
408 Color of player state shown in statusbar.
410 .B alternative_ui_separator_color = COLOR
411 Color of separators used in alternative user interface.
413 .B window_border_color = BORDER
414 Border color of pop-up windows. If set to 'none', no border will be shown.
416 .B active_window_border = COLOR
417 Color of active window's border.
419 .SH "BINDINGS"
420 When ncmpcpp starts, it tries to read user's bindings from ~/.ncmpcpp/bindings and $XDG_CONFIG_HOME/ncmpcpp/bindings files. If no bindings file is found, ncmpcpp uses the defaults. An example bindings file with the default values can be found usually in /usr/share/doc/ncmpcpp (exact location may depend on used distribution or configure prefix).
422 You can view current keybindings by pressing F1.
423 .SH "SONG FORMAT"
425 For song format you can use:
427  %l - length
428  %f - filename
429  %D - directory
430  %a - artist
431  %A - album artist
432  %t - title
433  %b - album
434  %y - date
435  %n - track number (01/12 -> 01)
436  %N - full track info (01/12 -> 01/12)
437  %g - genre
438  %c - composer
439  %p - performer
440  %d - disc
441  %C - comment
442  %P - priority
443  $R - begin right alignment
445 You can also put them in { } and then they will be displayed only if all requested values are available and/or define alternate value with { }|{ } e.g. {%a - %t}|{%f} will check if artist and title tags are available and if they are, display them. Otherwise it'll display filename.
447 \fBNote\fR: If you want to set limit on maximal length of a tag, just put the appropriate number between % and character that defines tag type, e.g. to make album take max. 20 terminal cells, use '%20b'.
449 \fBNote\fR: Format that is similar to "%a - %t" (i.e. without any additional braces) is equal to "{%a - %t}", so if one of the tags is missing, you'll get nothing.
451 Text can have different color than the main window, e.g. if you want length to be green, write $3%l$9.
453 Available values for colors:
455  - 0 - default window color (discards all other colors)
456  - 1 - black
457  - 2 - red
458  - 3 - green
459  - 4 - yellow
460  - 5 - blue
461  - 6 - magenta
462  - 7 - cyan
463  - 8 - white
464  - 9 - end of current color
466 \fBNote\fR: colors can be nested, so if you write $2some$5text$9, it'll disable only usage of blue color and make red the current one.
468 .SH "BUGS"
469 Report bugs on https://github.com/arybczak/ncmpcpp/issues
470 .SH "NOTE"
471 Since MPD uses UTF\-8, ncmpcpp needs to convert characters to the charset used by the local system. If you get character conversion errors while you are running ncmpcpp, you probably need to set up your locale. This is done by setting LANG and LC_ALL/LC_CTYPE environment variables (LC_CTYPE only affects character handling).
472 .SH "HOMEPAGE"
473 -> http://rybczak.net/ncmpcpp
475 .SH "SEE ALSO"
476 mpc(1), mpd(1)