Code

conf: make "hardware-cursor" a macro
[ncmpc.git] / src / options.c
index f7044ccbe24ddd9645b77a2e8f66f61c75291b03..35de128e1e602a4b7aed0d5008120471d10ac1ca 100644 (file)
@@ -53,6 +53,7 @@ options_t options = {
        .lyrics_timeout = DEFAULT_LYRICS_TIMEOUT,
        .lyrics_autosave = false,
        .lyrics_show_plugin = false,
+       .text_editor_ask = true,
 #endif
        .find_wrap = true,
        .scroll_offset = 0,
@@ -60,6 +61,7 @@ options_t options = {
        .audible_bell = true,
        .bell_on_wrap = true,
        .status_message_time = 3,
+       .timeout_ms = DEFAULT_MPD_TIMEOUT,
 #ifndef NCMPC_MINI
        .scroll = DEFAULT_SCROLL,
        .welcome_screen_list = true,
@@ -371,6 +373,9 @@ options_init(void)
 #ifndef NCMPC_MINI
        options.scroll_sep = g_strdup(DEFAULT_SCROLL_SEP);
 #endif
+       if (getenv("MPD_TIMEOUT") != NULL)
+               /* let libmpdclient parse the environment variable */
+               options.timeout_ms = 0;
 }
 
 void
@@ -388,4 +393,7 @@ options_deinit(void)
        g_free(options.xterm_title_format);
        g_free(options.scroll_sep);
 #endif
+#ifdef ENABLE_LYRICS_SCREEN
+       g_free(options.text_editor);
+#endif
 }