From 5d436ddc76e93158a99d7d53b0280895bb8c83db Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sat, 15 Nov 2014 18:52:48 +0100 Subject: [PATCH] settings: rearrange a few options --- doc/config | 28 +++++++++++++--------------- src/settings.cpp | 14 +++++++------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/doc/config b/doc/config index 7c125553..eedacd42 100644 --- a/doc/config +++ b/doc/config @@ -202,17 +202,6 @@ # #song_library_format = {%n - }{%t}|{%f} # -## -## Note: Below variables are used for sorting songs in browser. -## The sort mode determines how songs are sorted, and can be used -## in combination with a sort format to specify a custom sorting format. -## Available values for browser_sort_mode are "name", "mtime", "format" -## and "noop". -## -# -#browser_sort_mode = name -# -#browser_sort_format = {%a - }{%t}|{%f} {(%l)} # #alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b # @@ -230,9 +219,21 @@ # #modified_item_prefix = $3> $9 # -## Note: attributes are not supported for the following variable. +## +## Note: attributes are not supported for the following variables. ## #song_window_title_format = {%a - }{%t}|{%f} +## +## Note: Below variables are used for sorting songs in browser. +## The sort mode determines how songs are sorted, and can be used +## in combination with a sort format to specify a custom sorting format. +## Available values for browser_sort_mode are "name", "mtime", "format" +## and "noop". +## +# +#browser_sort_mode = name +# +#browser_sort_format = {%a - }{%t}|{%f} {(%l)} # ##### columns settings ##### ## @@ -279,9 +280,6 @@ ## Note: Custom command that will be executed each ## time song changes. Useful for notifications etc. ## -## Attention: It doesn't support song format anymore. -## Use `ncmpcpp --now-playing SONG_FORMAT` instead. -## #execute_on_song_change = "" # #playlist_show_remaining_time = no diff --git a/src/settings.cpp b/src/settings.cpp index 93c6cda4..3bc903ed 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -302,13 +302,6 @@ bool Configuration::read(const std::vector &config_paths) song_library_format, "{%n - }{%t}|{%f}", [](std::string v) { return Format::parse(v); })); - p.add("browser_sort_mode", assign_default( - browser_sort_mode, SortMode::Name - )); - p.add("browser_sort_format", assign_default( - browser_sort_format, "{%a - }{%t}|{%f} {(%l)}", [](std::string v) { - return Format::parse(v, Format::Flags::Tag); - })); p.add("alternative_header_first_line_format", assign_default( new_header_first_line, "$b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b", [](std::string v) { return Format::parse(ToWString(std::move(v)), @@ -347,6 +340,13 @@ bool Configuration::read(const std::vector &config_paths) p.add("modified_item_prefix", buffer( modified_item_prefix, NC::Buffer::init(NC::Color::Green, "> ", NC::Color::End), id_() )); + p.add("browser_sort_mode", assign_default( + browser_sort_mode, SortMode::Name + )); + p.add("browser_sort_format", assign_default( + browser_sort_format, "{%a - }{%t}|{%f} {(%l)}", [](std::string v) { + return Format::parse(v, Format::Flags::Tag); + })); p.add("song_window_title_format", assign_default( song_window_title_format, "{%a - }{%t}|{%f}", [](std::string v) { return Format::parse(v, Format::Flags::Tag);