diff --git a/NEWS b/NEWS index 10f1a104..a5944a0b 100644 --- a/NEWS +++ b/NEWS @@ -14,10 +14,13 @@ ncmpcpp-0.7 (????-??-??) * Support for PDCurses has been removed due to the library being unmaintained and buggy. * Random album artists can now be added to the playlist. -ncmpcpp-0.6.3 (????-??-??) +ncmpcpp-0.6.3 (2015-03-02) * Fix floating point exception when adding a specific number of random items. * Passwords are no longer added to the input history. +* It is now possible to put more than one specific flag consecutively in formats. +* Bash completion file was removed as it no longer works. +* Description of available configuration options in man page was updated. ncmpcpp-0.6.2 (2014-12-13) diff --git a/doc/ncmpcpp-completion.bash b/doc/ncmpcpp-completion.bash deleted file mode 100644 index 49222c4b..00000000 --- a/doc/ncmpcpp-completion.bash +++ /dev/null @@ -1,34 +0,0 @@ -# Installation: -# - If you have system bash completion, place this in /etc/bash_completion.d or -# source it from $HOME/.bash_completion -# - If you don't have system bash completion, source this from your .bashrc - - _ncmpcpp () -{ - local cur prev cmds opts - - cur="$2" - prev="$3" - cmds=`ncmpcpp --help 2>&1 | awk '/^ [a-z]+ /{print $1}'`; - opts="`ncmpcpp --help 2>&1 | awk '/^ -.+,/{print $1 "\n" $2}' | sed -e 's/,//;$a--now-playing'`" - - case "$prev" in - ncmpcpp) - COMPREPLY=($(compgen -W '$opts $cmds' -- "$cur")) - ;; - --port|-p|--host|-h) - COMPREPLY=() - ;; - --help|-?|--version|-v|--now-playing) - return - ;; - next|pause|play|prev|stop|toggle|volume) - opts="`echo $opts | sed -e 's/--port//;s/--host//;s/-p//;s/-h//'`" - COMPREPLY=($(compgen -W '$opts' -- "$cur")) - ;; - *) - COMPREPLY=($(compgen -W '$opts $cmds' -- "$cur")) - ;; - esac -} -complete -F _ncmpcpp ncmpcpp diff --git a/doc/ncmpcpp.1 b/doc/ncmpcpp.1 index 3baed4b1..effeddb2 100644 --- a/doc/ncmpcpp.1 +++ b/doc/ncmpcpp.1 @@ -42,37 +42,37 @@ Therefore the rule of thumb is: if you need whitespaces at the beginning or at t Note: COLOR has to be the name (not a number) of one of colors 1-8 from SONG FORMAT section. Supported configuration options: -.TP +.TP .B ncmpcpp_directory = PATH 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. -.TP +.TP .B lyrics_directory = PATH Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other MPD clients (eg. ncmpc) also use that location. -.TP +.TP .B mpd_host = HOST Connect to MPD running on specified host/unix socket. When HOST starts with a '/', it is assumed to be a unix socket. -.TP -.B mpd_music_dir = PATH -Search for files in specified directory. This is needed for tag editor to work. -.TP +.TP .B mpd_port = PORT Connect to MPD on the specified port. -.TP +.TP +.B mpd_music_dir = PATH +Search for files in specified directory. This is needed for tag editor to work. +.TP .B mpd_connection_timeout = SECONDS Set connection timeout to MPD to given value. -.TP +.TP .B mpd_crossfade_time = SECONDS Default number of seconds to crossfade, if enabled by ncmpcpp. .TP -.B visualizer_in_stereo = yes/no -Should be set to 'yes', if fifo output's format was set to 44100:16:2. -.TP .B visualizer_fifo_path = PATH 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) .TP .B visualizer_output_name = NAME Name of output that provides data for visualizer. Needed to keep sound and visualization in sync. .TP +.B visualizer_in_stereo = yes/no +Should be set to 'yes', if fifo output's format was set to 44100:16:2. +.TP .B visualizer_sample_multiplier = NUMBER Multiply received samples by given value. Very useful for proper visualization of quiet music. .TP @@ -87,151 +87,146 @@ Defines visualizer's look (string has to be exactly 2 characters long: first one .TP .B visualizer_color = COLORS Comma separated list of colors to be used in music visualization. -.TP +.TP .B system_encoding = ENCODING If you use encoding other than utf8, set it in order to handle utf8 encoded strings properly. .TP -.B seek_time = SECONDS -Base seek time to begin with. -.TP -.B volume_change_step = NUMBER -Number of percents volume has to be increased/decreased by in volume_up/volume_down. -.TP .B playlist_disable_highlight_delay = SECONDS Delay for highlighting playlist since the last key was pressed. If set to 0, highlighting never fades away. -.TP +.TP .B message_delay_time = SECONDS Delay for displayed messages to remain visible. .TP .B song_list_format Format for songs' list. .TP -.B song_columns_list_format -Format for songs' list displayed in columns. -.TP .B song_status_format Song's format for statusbar. .TP .B song_library_format -Format for songs in Media library. -.TP -.B song_window_title_format -Song format for window title. -.TP -.B browser_sort_mode -Determines sort mode for browser. Possible values are "name", "mtime", "format" and "noop". -.TP -.B browser_sort_format -Format to use for sorting songs in browser. For this option to be effective, browser_sort_mode must be set to "format". -.TP -.B external_editor = PATH -Path to external editor used to edit lyrics. +.B alternative_header_first_line_format = TEXT +Now playing song format for the first line in alternative user interface header window. .TP -.B browser_playlist_prefix = TEXT -Prefix for playlists in Browser. +.B alternative_header_second_line_format = TEXT +Now playing song format for the second line in alternative user interface header window. .TP -.B default_tag_editor_pattern = TEXT -Default pattern used by Tag editor's parser. -.TP .B now_playing_prefix = TEXT Prefix for currently playing song. -.TP +.TP .B now_playing_suffix = TEXT Suffix for currently playing song. -.TP +.TP +.B browser_playlist_prefix = TEXT +Prefix for playlists in Browser. +.TP .B selected_item_prefix = TEXT Prefix for selected items. -.TP +.TP .B selected_item_suffix = TEXT Suffix for selected items. -.TP +.TP .B modified_item_prefix = TEXT Prefix for modified item (tag editor). -.TP -.B alternative_header_first_line_format = TEXT -Now playing song format for the first line in alternative user interface header window. -.TP -.B alternative_header_second_line_format = TEXT -Now playing song format for the second line in alternative user interface header window. -.TP -.B color1 = COLOR -One of colors used in Song info, Tiny tag editor and Search engine. -.TP -.B color2 = COLOR -One of colors used in Song info, Tiny tag editor and Search engine. -.TP -.B colors_enabled = yes/no -No need to describe it, huh? -.TP -.B header_text_scrolling = yes/no -If enabled, text in header window will scroll if its length is longer then actual screen width, otherwise it won't. -.TP -.B cyclic_scrolling = yes/no -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) -.TP -.B mouse_list_scroll_whole_page = yes/no -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. -.TP -.B lines_scrolled = NUMBER -Number of lines that are scrolled with mouse wheel. -.TP -.B search_engine_default_search_mode = MODE_NUMBER -Number of default mode used in search engine. -.TP +.TP +.B browser_sort_mode +Determines sort mode for browser. Possible values are "name", "mtime", "format" and "noop". +.TP +.B browser_sort_format +Format to use for sorting songs in browser. For this option to be effective, browser_sort_mode must be set to "format". +.TP +.B song_window_title_format +Song format for window title. +.TP +.B song_columns_list_format +Format for songs' list displayed in columns. +.TP +.B execute_on_song_change = COMMAND +Shell command to execute on song change. +.TP .B playlist_show_remaining_time = yes/no If enabled, time remaining to end of playlist will be shown after playlist's statistics. -.TP +.TP .B playlist_shorten_total_times = yes/no 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). -.TP +.TP .B playlist_separate_albums = yes/no If enabled, separators will be placed between albums. -.TP +.TP .B playlist_display_mode = classic/columns Default display mode for Playlist. -.TP +.TP .B browser_display_mode = classic/columns Default display mode for Browser. -.TP +.TP .B search_engine_display_mode = classic/columns Default display mode for Search engine. -.TP +.TP .B playlist_editor_display_mode = classic/columns Default display mode for Playlist editor. -.TP +.TP .B discard_colors_if_item_is_selected = yes/no Indicates whether custom colors of tags have to be discarded if item is selected or not. -.TP -.B header_visibility = yes/no -If enabled, header window will be displayed, otherwise hidden. -.TP -.B statusbar_visibility = yes/no -If enabled, statusbar will be displayed, otherwise hidden. -.TP -.B titles_visibility = yes/no -If enabled, column titles will be displayed, otherwise hidden. -.TP +.TP +.B incremental_seeking = yes/no +If enabled, seek time will increment by one each second of seeking. +.TP +.B seek_time = SECONDS +Base seek time to begin with. +.TP +.B volume_change_step = NUMBER +Number of percents volume has to be increased/decreased by in volume_up/volume_down. +.TP .B autocenter_mode = yes/no Default state for autocenter mode at start. -.TP +.TP .B centered_cursor = yes/no If enabled, currently highlighted position in the list will be always centered. -.TP +.TP .B progressbar_look = TEXT This variable defines the look of progressbar. Note that it has to be exactly two or three characters long. -.TP +.TP .B progressbar_boldness = yes/no This variable defines whether progressbar should be displayed in bold or not. -.TP +.TP +.B default_place_to_search_in = database/playlist +If set to "playlist", Search engine will perform searching in current MPD playlist rather than in music database. +.TP +.B user_interface = classic/alternative +Default user interface used by ncmpcpp at start. +.TP +.B data_fetching_delay = yes/no +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. +.TP +.B media_library_primary_tag = artist/date/genre/composer/performer +Default tag type for leftmost column in media library. +.TP .B default_find_mode = wrapped/normal 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. -.TP +.TP .B default_space_mode = select/add If set to "select", space will select items instead of adding them to playlist (although selecting by space is default and the only one action for space in Playlist). -.TP -.B incremental_seeking = yes/no -If enabled, seek time will increment by one each second of seeking. -.TP +.TP +.B default_tag_editor_pattern = TEXT +Default pattern used by Tag editor's parser. +.TP +.B header_visibility = yes/no +If enabled, header window will be displayed, otherwise hidden. +.TP +.B statusbar_visibility = yes/no +If enabled, statusbar will be displayed, otherwise hidden. +.TP +.B titles_visibility = yes/no +If enabled, column titles will be displayed, otherwise hidden. +.TP +.B header_text_scrolling = yes/no +If enabled, text in header window will scroll if its length is longer then actual screen width, otherwise it won't. +.TP +.B cyclic_scrolling = yes/no +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) +.TP +.B lines_scrolled = NUMBER +Number of lines that are scrolled with mouse wheel. +.TP .B follow_now_playing_lyrics = yes/no 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). .TP @@ -252,124 +247,133 @@ If set, ncmpcpp will try to get info from last.fm in language you set and if it .TP .B space_add_mode = add_remove/always_add If set to add_remove, pressing space on item which is already in playlist will remove it, otherwise add it again. -.TP +.TP .B show_hidden_files_in_local_browser = yes/no Trigger for displaying in local browser files and directories that begin with '.' -.TP -.B default_place_to_search_in = database/playlist -If set to "playlist", Search engine will perform searching in current MPD playlist rather than in music database. -.TP -.B display_screens_numbers_on_start = yes/no -If enabled, screens' names and their keybindings will be shown in header window until key is pressed, otherwise they won't be displayed at all. -.TP +.TP .B screen_switcher_mode = SWITCHER_MODE 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. -.TP +.TP .B startup_screen = SCREEN_NAME Screen that has to be displayed at start (playlist by default). -.TP +.TP .B startup_slave_screen = SCREEN_NAME Slave screen that has to be displayed at start (nothing by default). -.TP +.TP .B locked_screen_width_part = 20-80 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. -.TP +.TP .B ask_for_locked_screen_width_part = yes/no 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. -.TP +.TP .B jump_to_now_playing_song_at_start = yes/no If enabled, ncmpcpp will jump at start to now playing song if mpd is playing or paused. -.TP +.TP .B ask_before_clearing_playlists = yes/no If enabled, user will be asked if he really wants to clear the playlist after pressing key responsible for that. -.TP +.TP .B clock_display_seconds = yes/no If enabled, clock will display time in format hh:mm:ss, otherwise hh:mm. -.TP +.TP .B display_volume_level = yes/no If enabled, volume level will be displayed in statusbar, otherwise not. -.TP +.TP .B display_bitrate = yes/no If enabled, bitrate of currently playing song will be displayed in statusbar. -.TP +.TP .B display_remaining_time = yes/no If enabled, remaining time of currently playing song will be be displayed in statusbar instead of elapsed time. -.TP +.TP +.B regular_expressions = basic/extended +Type of currently used regular expressions. +.TP .B ignore_leading_the = yes/no If enabled, word "the" at the beginning of tags/filenames/sort format will be ignored while sorting items. -.TP -.B use_console_editor = yes/no -If your external editor is console application, you need to enable it. -.TP +.TP .B block_search_constraints_change_if_items_found = yes/no If enabled, fields in Search engine above "Reset" button will be blocked after successful searching, otherwise they won't. -.TP -.B mouse_support = yes/no -Self-descriptive, isn't it? -.TP -.B tag_editor_extended_numeration = yes/no -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. .TP -.B enable_window_title = yes/no -If enabled, ncmpcpp will override current window title with its own one. +.B mouse_support = yes/no +If set to yes, mouse support will be enabled. .TP -.B regular_expressions = basic/extended -Type of currently used regular expressions. -.TP -.B user_interface = classic/alternative -Default user interface used by ncmpcpp at start. -.TP -.B data_fetching_delay = yes/no -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. +.B mouse_list_scroll_whole_page = yes/no +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. .TP -.B media_library_primary_tag = artist/date/genre/composer/performer -Default tag type for leftmost column in media library. -.TP .B empty_tag_marker = TEXT Text that will be displayed, if requested tag is not set. -.TP +.TP .B tags_separator = TEXT Separator that is placed between tags. Also interpreted by tag editor which splits input string into separate tags using it. -.TP +.TP +.B tag_editor_extended_numeration = yes/no +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. +.TP +.B media_library_sort_by_mtime = yes/no +If enabled, media library will be sorted by modification time. Otherwise lexicographic sorting is used. +.TP +.B enable_window_title = yes/no +If enabled, ncmpcpp will override current window title with its own one. +.TP +.B search_engine_default_search_mode = MODE_NUMBER +Number of default mode used in search engine. +.TP +.B external_editor = PATH +Path to external editor used to edit lyrics. +.TP +.B use_console_editor = yes/no +If your external editor is console application, you need to enable it. +.TP +.B colors_enabled = yes/no +No need to describe it, huh? +.TP .B empty_tag_color = COLOR Color of empty tag marker. -.TP +.TP .B header_window_color = COLOR Color of header window. -.TP +.TP .B volume_color = COLOR Color of volume state. -.TP +.TP .B state_line_color = COLOR Color of lines separating header and statusbar from main window. -.TP +.TP .B state_flags_color = COLOR Color of MPD status flags. -.TP +.TP .B main_window_color = COLOR Color of main window. -.TP +.TP +.B color1 = COLOR +One of colors used in Song info, Tiny tag editor and Search engine. +.TP +.B color2 = COLOR +One of colors used in Song info, Tiny tag editor and Search engine. +.TP .B main_window_highlight_color = COLOR Color of main window's highlight. -.TP +.TP .B progressbar_color = COLOR Color of progressbar. -.TP +.TP .B progressbar_elapsed_color = COLOR Color of part of progressbar that represents elapsed time. -.TP +.TP .B statusbar_color = COLOR Color of statusbar. -.TP +.TP .B alternative_ui_separator_color = COLOR Color of separators used in alternative user interface. -.TP +.TP .B active_column_color = COLOR Color of active column's highlight. -.TP +.TP +.B window_border_color = BORDER +Border color of pop-up windows. If set to 'none', no border will be shown. +.TP .B active_window_border = COLOR Color of active window's border. -.TP +.TP .SH "BINDINGS" When ncmpcpp starts, it tries to read user's bindings from ~/.ncmpcpp/bindings file. 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). diff --git a/src/strbuffer.h b/src/strbuffer.h index 06046373..fbfb1ade 100644 --- a/src/strbuffer.h +++ b/src/strbuffer.h @@ -88,7 +88,7 @@ template class BasicBuffer public: typedef std::basic_string StringType; - typedef std::set Properties; + typedef std::multiset Properties; const StringType &str() const { return m_string; } const Properties &properties() const { return m_properties; }