ncmpc  0.31
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_HXX
21 #define OPTIONS_HXX
22 
23 #include "config.h"
24 #include "defaults.hxx"
25 
26 #include <vector>
27 #include <string>
28 #include <chrono>
29 
30 struct Options {
31  std::string host;
32  std::string password;
33  std::string config_file;
34  std::string key_file;
36  std::string search_format;
38 #ifndef NCMPC_MINI
39  std::string xterm_title_format;
41 #endif
42  std::vector<std::string> screen_list = DEFAULT_SCREEN_LIST;
44  int port;
45  int timeout_ms = 0;
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 = true;
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 #ifdef NCMPC_MINI
82  static constexpr bool jump_prefix_only = true;
83 #else
86  bool welcome_screen_list = true;
87  bool jump_prefix_only = true;
88  bool second_column = true;
89 #endif
90 };
91 
92 extern Options options;
93 
94 void options_parse(int argc, const char **argv);
95 
96 #endif
int crossfade_time
Definition: Options.hxx:46
bool second_column
Definition: Options.hxx:88
std::string xterm_title_format
Definition: Options.hxx:39
bool enable_xterm_title
Definition: Options.hxx:76
#define DEFAULT_SCROLL
Definition: defaults.hxx:37
std::vector< std::string > screen_list
Definition: Options.hxx:42
bool welcome_screen_list
Definition: Options.hxx:86
int scroll_offset
Definition: Options.hxx:63
std::string status_format
Definition: Options.hxx:37
bool audible_bell
Definition: Options.hxx:71
void options_parse(int argc, const char **argv)
#define DEFAULT_CROSSFADE_TIME
Definition: defaults.hxx:24
bool find_wrap
Definition: Options.hxx:60
bool display_remaining_time
Definition: Options.hxx:43
bool auto_center
Definition: Options.hxx:64
std::string list_format
Definition: Options.hxx:35
bool visible_bell
Definition: Options.hxx:72
bool find_show_last_pattern
Definition: Options.hxx:61
std::string key_file
Definition: Options.hxx:34
std::string search_format
Definition: Options.hxx:36
#define DEFAULT_LIST_FORMAT
Definition: defaults.hxx:30
int hide_cursor
Definition: Options.hxx:48
#define DEFAULT_LYRICS_TIMEOUT
Definition: defaults.hxx:35
std::string host
Definition: Options.hxx:31
#define DEFAULT_SCREEN_LIST
Definition: defaults.hxx:27
int port
Definition: Options.hxx:44
int timeout_ms
Definition: Options.hxx:45
bool bell_on_wrap
Definition: Options.hxx:73
bool wide_cursor
Definition: Options.hxx:65
std::chrono::seconds status_message_time
Definition: Options.hxx:74
std::string password
Definition: Options.hxx:32
#define DEFAULT_SCROLL_SEP
Definition: defaults.hxx:38
Options options
bool hardware_cursor
Definition: Options.hxx:66
std::string config_file
Definition: Options.hxx:33
#define DEFAULT_STATUS_FORMAT
Definition: defaults.hxx:33
std::string scroll_sep
Definition: Options.hxx:40
bool list_wrap
Definition: Options.hxx:62
bool visible_bitrate
Definition: Options.hxx:85
int search_mode
Definition: Options.hxx:47
bool jump_prefix_only
Definition: Options.hxx:87
bool scroll
Definition: Options.hxx:84
Definition: Options.hxx:30
int seek_time
Definition: Options.hxx:49