ncmpc  0.30
options.hxx
Go to the documentation of this file.
1 /* ncmpc (Ncurses MPD Client)
2  * (c) 2004-2018 The Music Player Daemon Project
3  * Project homepage: http://musicpd.org
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef OPTIONS_H
21 #define OPTIONS_H
22 
23 #include "config.h"
24 #include "defaults.hxx"
25 
26 #include <vector>
27 #include <string>
28 #include <chrono>
29 
30 typedef struct {
31  std::string host;
32  std::string password;
33  std::string config_file;
34  std::string key_file;
35  std::string list_format = DEFAULT_LIST_FORMAT;
36  std::string search_format;
37  std::string status_format = DEFAULT_STATUS_FORMAT;
38 #ifndef NCMPC_MINI
39  std::string xterm_title_format;
40  std::string scroll_sep = DEFAULT_SCROLL_SEP;
41 #endif
42  std::vector<std::string> screen_list = DEFAULT_SCREEN_LIST;
44  int port;
45  int timeout_ms = 0;
46  int crossfade_time = DEFAULT_CROSSFADE_TIME;
49  int seek_time = 1;
50 #ifdef ENABLE_LYRICS_SCREEN
51  int lyrics_timeout = DEFAULT_LYRICS_TIMEOUT;
52  bool lyrics_autosave = false;
53  bool lyrics_show_plugin = false;
54  std::string text_editor;
55  bool text_editor_ask = false;
56 #endif
57 #ifdef ENABLE_CHAT_SCREEN
58  std::string chat_prefix;
59 #endif
60  bool find_wrap = true;
62  bool list_wrap;
63  int scroll_offset = 0;
65  bool wide_cursor = true;
67 
68 #ifdef ENABLE_COLORS
69  bool enable_colors;
70 #endif
71  bool audible_bell = true;
73  bool bell_on_wrap = true;
74  std::chrono::seconds status_message_time = std::chrono::seconds(3);
75 #ifndef NCMPC_MINI
77 #endif
78 #ifdef HAVE_GETMOUSE
79  bool enable_mouse;
80 #endif
81 #ifndef NCMPC_MINI
82  bool scroll = DEFAULT_SCROLL;
84  bool welcome_screen_list = true;
85  bool jump_prefix_only = true;
86  bool second_column = true;
87 #endif
88 } options_t;
89 
90 extern options_t options;
91 
92 void options_parse(int argc, const char **argv);
93 
94 #endif
bool auto_center
Definition: options.hxx:64
Definition: options.hxx:30
#define DEFAULT_SCROLL
Definition: defaults.hxx:37
bool enable_xterm_title
Definition: options.hxx:76
bool display_remaining_time
Definition: options.hxx:43
#define DEFAULT_CROSSFADE_TIME
Definition: defaults.hxx:24
std::string password
Definition: options.hxx:32
std::string config_file
Definition: options.hxx:33
void options_parse(int argc, const char **argv)
int hide_cursor
Definition: options.hxx:48
#define DEFAULT_LIST_FORMAT
Definition: defaults.hxx:30
bool find_show_last_pattern
Definition: options.hxx:61
#define DEFAULT_LYRICS_TIMEOUT
Definition: defaults.hxx:35
options_t options
#define DEFAULT_SCREEN_LIST
Definition: defaults.hxx:27
std::string xterm_title_format
Definition: options.hxx:39
bool hardware_cursor
Definition: options.hxx:66
#define DEFAULT_SCROLL_SEP
Definition: defaults.hxx:38
std::string host
Definition: options.hxx:31
bool visible_bitrate
Definition: options.hxx:83
#define DEFAULT_STATUS_FORMAT
Definition: defaults.hxx:33
int port
Definition: options.hxx:44
std::string key_file
Definition: options.hxx:34
bool visible_bell
Definition: options.hxx:72
bool list_wrap
Definition: options.hxx:62
int search_mode
Definition: options.hxx:47
std::string search_format
Definition: options.hxx:36