new config option: jump_to_now_playing_song_at_start (enabled by default)
This commit is contained in:
@@ -201,6 +201,8 @@
|
||||
#
|
||||
#display_screens_numbers_on_start = "yes"
|
||||
#
|
||||
#jump_to_now_playing_song_at_start = "yes"
|
||||
#
|
||||
#ask_before_clearing_main_playlist = "no"
|
||||
#
|
||||
#clock_display_seconds = "no"
|
||||
|
||||
@@ -186,6 +186,9 @@ If set to "playlist", Search engine will perform searching in current MPD playli
|
||||
.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
|
||||
.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
|
||||
.B ask_before_clearing_main_playlist = yes/no
|
||||
If enabled, user will be asked if he really wants to clear the main playlist after pressing key responsible for that.
|
||||
.TP
|
||||
|
||||
@@ -167,6 +167,13 @@ int main(int argc, char *argv[])
|
||||
if (Config.mouse_support)
|
||||
mousemask(ALL_MOUSE_EVENTS, 0);
|
||||
|
||||
if (Config.jump_to_now_playing_song_at_start)
|
||||
{
|
||||
TraceMpdStatus();
|
||||
if (myPlaylist->isPlaying())
|
||||
myPlaylist->Main()->Highlight(myPlaylist->NowPlaying);
|
||||
}
|
||||
|
||||
while (!main_exit)
|
||||
{
|
||||
if (!Mpd.Connected())
|
||||
|
||||
@@ -289,6 +289,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
|
||||
conf.local_browser_show_hidden_files = false;
|
||||
conf.search_in_db = true;
|
||||
conf.display_screens_numbers_on_start = true;
|
||||
conf.jump_to_now_playing_song_at_start = true;
|
||||
conf.clock_display_seconds = false;
|
||||
conf.display_bitrate = false;
|
||||
conf.ignore_leading_the = false;
|
||||
@@ -730,6 +731,10 @@ void ReadConfiguration(ncmpcpp_config &conf)
|
||||
{
|
||||
conf.display_screens_numbers_on_start = v == "yes";
|
||||
}
|
||||
else if (cl.find("jump_to_now_playing_song_at_start") != std::string::npos)
|
||||
{
|
||||
conf.jump_to_now_playing_song_at_start = v == "yes";
|
||||
}
|
||||
else if (cl.find("clock_display_seconds") != std::string::npos)
|
||||
{
|
||||
conf.clock_display_seconds = v == "yes";
|
||||
|
||||
@@ -187,6 +187,7 @@ struct ncmpcpp_config
|
||||
bool local_browser_show_hidden_files;
|
||||
bool search_in_db;
|
||||
bool display_screens_numbers_on_start;
|
||||
bool jump_to_now_playing_song_at_start;
|
||||
bool clock_display_seconds;
|
||||
bool display_bitrate;
|
||||
bool ignore_leading_the;
|
||||
|
||||
Reference in New Issue
Block a user