diff --git a/doc/config b/doc/config index 8a490183..22842af6 100644 --- a/doc/config +++ b/doc/config @@ -314,6 +314,8 @@ # #clock_display_seconds = "no" # +#display_volume_level = "yes" +# #display_bitrate = "no" # #display_remaining_time = "no" diff --git a/doc/ncmpcpp.1 b/doc/ncmpcpp.1 index aee42acd..2b95f4c8 100644 --- a/doc/ncmpcpp.1 +++ b/doc/ncmpcpp.1 @@ -240,6 +240,9 @@ If enabled, user will be asked if he really wants to clear the main playlist aft .B clock_display_seconds = yes/no If enabled, clock will display time in format hh:mm:ss, otherwise hh:mm. .TP +.B display_volume_level = yes/no +If enabled, volume level will be displayed in statusbar, otherwise not. +.TP .B display_bitrate = yes/no If enabled, bitrate of currently playing song will be displayed in statusbar. .TP diff --git a/src/settings.cpp b/src/settings.cpp index 3c95a42f..9845b1fd 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -357,6 +357,7 @@ void NcmpcppConfig::SetDefaults() display_screens_numbers_on_start = true; jump_to_now_playing_song_at_start = true; clock_display_seconds = false; + display_volume_level = true; display_bitrate = false; display_remaining_time = false; ignore_leading_the = false; @@ -907,6 +908,10 @@ void NcmpcppConfig::Read() { clock_display_seconds = v == "yes"; } + else if (cl.find("display_volume_level") != std::string::npos) + { + display_volume_level = v == "yes"; + } else if (cl.find("display_bitrate") != std::string::npos) { display_bitrate = v == "yes"; diff --git a/src/settings.h b/src/settings.h index aea3e10b..ac5c96bd 100644 --- a/src/settings.h +++ b/src/settings.h @@ -210,6 +210,7 @@ struct NcmpcppConfig bool display_screens_numbers_on_start; bool jump_to_now_playing_song_at_start; bool clock_display_seconds; + bool display_volume_level; bool display_bitrate; bool display_remaining_time; bool ignore_leading_the; diff --git a/src/status.cpp b/src/status.cpp index 72f0fc7b..d4bb74e5 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -600,7 +600,7 @@ void NcmpcppStatusChanged(MPD::Connection *, MPD::StatusChanges changed, void *) refresh(); } } - if (changed.Volume && (Config.header_visibility || Config.new_design)) + if (changed.Volume && Config.display_volume_level && (Config.header_visibility || Config.new_design)) { VolumeState = Config.new_design ? " Vol: " : " Volume: "; int volume = Mpd.GetVolume();