1 /***************************************************************************
2 * Copyright (C) 2008-2014 by Andrzej Rybczak *
3 * electricityispower@gmail.com *
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. *
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. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
21 #ifndef NCMPCPP_SETTINGS_H
22 #define NCMPCPP_SETTINGS_H
24 #include <boost/date_time/posix_time/posix_time_types.hpp>
25 #include <boost/optional.hpp>
26 #include <boost/regex.hpp>
29 #include <mpd/client.h>
33 #include "screen_type.h"
34 #include "strbuffer.h"
38 Column() : stretch_limit(-1), right_alignment(0), display_empty_tag(1) { }
47 bool display_empty_tag
;
53 : playlist_disable_highlight_delay(0), visualizer_sync_interval(0)
56 bool read(const std::vector
<std::string
> &config_paths
, bool ignore_errors
);
58 std::string ncmpcpp_directory
;
59 std::string lyrics_directory
;
61 std::string mpd_music_dir
;
62 std::string visualizer_fifo_path
;
63 std::string visualizer_output_name
;
64 std::string empty_tag
;
66 Format::AST
<char> song_list_format
;
67 Format::AST
<char> song_window_title_format
;
68 Format::AST
<char> song_library_format
;
69 Format::AST
<char> song_columns_mode_format
;
70 Format::AST
<char> browser_sort_format
;
71 Format::AST
<char> song_status_format
;
72 Format::AST
<wchar_t> song_status_wformat
;
73 Format::AST
<wchar_t> new_header_first_line
;
74 Format::AST
<wchar_t> new_header_second_line
;
76 std::string external_editor
;
77 std::string system_encoding
;
78 std::string execute_on_song_change
;
79 std::string lastfm_preferred_language
;
80 std::wstring progressbar
;
81 std::wstring visualizer_chars
;
85 std::vector
<Column
> columns
;
87 DisplayMode playlist_display_mode
;
88 DisplayMode browser_display_mode
;
89 DisplayMode search_engine_display_mode
;
90 DisplayMode playlist_editor_display_mode
;
92 NC::Buffer browser_playlist_prefix
;
93 NC::Buffer selected_item_prefix
;
94 NC::Buffer selected_item_suffix
;
95 NC::Buffer now_playing_prefix
;
96 NC::Buffer now_playing_suffix
;
97 NC::Buffer modified_item_prefix
;
101 NC::Color empty_tags_color
;
102 NC::Color header_color
;
103 NC::Color volume_color
;
104 NC::Color state_line_color
;
105 NC::Color state_flags_color
;
106 NC::Color main_color
;
107 NC::Color main_highlight_color
;
108 NC::Color progressbar_color
;
109 NC::Color progressbar_elapsed_color
;
110 NC::Color statusbar_color
;
111 NC::Color alternative_ui_separator_color
;
112 NC::Color active_column_color
;
114 std::vector
<NC::Color
> visualizer_colors
;
115 VisualizerType visualizer_type
;
117 NC::Border window_border
;
118 NC::Border active_window_border
;
122 SpaceAddMode space_add_mode
;
124 mpd_tag_type media_lib_primary_tag
;
127 bool playlist_show_mpd_host
;
128 bool playlist_show_remaining_time
;
129 bool playlist_shorten_total_times
;
130 bool playlist_separate_albums
;
131 bool set_window_title
;
132 bool header_visibility
;
133 bool header_text_scrolling
;
134 bool statusbar_visibility
;
135 bool titles_visibility
;
136 bool centered_cursor
;
137 bool screen_switcher_previous
;
138 bool autocenter_mode
;
140 bool incremental_seeking
;
141 bool now_playing_lyrics
;
142 bool fetch_lyrics_in_background
;
143 bool local_browser_show_hidden_files
;
145 bool jump_to_now_playing_song_at_start
;
146 bool clock_display_seconds
;
147 bool display_volume_level
;
148 bool display_bitrate
;
149 bool display_remaining_time
;
150 bool ignore_leading_the
;
151 bool block_search_constraints_change
;
152 bool use_console_editor
;
153 bool use_cyclic_scrolling
;
154 bool ask_before_clearing_playlists
;
155 bool ask_before_shuffling_playlists
;
157 bool mouse_list_scroll_whole_page
;
158 bool visualizer_in_stereo
;
159 bool data_fetching_delay
;
160 bool media_library_sort_by_mtime
;
161 bool tag_editor_extended_numeration
;
162 bool discard_colors_if_item_is_selected
;
163 bool store_lyrics_in_song_dir
;
164 bool generate_win32_compatible_filenames
;
165 bool ask_for_locked_screen_width_part
;
166 bool allow_for_physical_item_deletion
;
167 bool progressbar_boldness
;
168 bool startup_slave_screen_focus
;
170 unsigned mpd_connection_timeout
;
171 unsigned crossfade_time
;
173 unsigned volume_change_step
;
174 unsigned message_delay_time
;
176 unsigned lines_scrolled
;
177 unsigned search_engine_default_search_mode
;
179 boost::regex::flag_type regex_type
;
181 boost::posix_time::seconds playlist_disable_highlight_delay
;
182 boost::posix_time::seconds visualizer_sync_interval
;
184 double visualizer_sample_multiplier
;
185 double locked_screen_width_part
;
187 size_t selected_item_prefix_length
;
188 size_t selected_item_suffix_length
;
189 size_t now_playing_prefix_length
;
190 size_t now_playing_suffix_length
;
192 ScreenType startup_screen_type
;
193 boost::optional
<ScreenType
> startup_slave_screen_type
;
194 std::list
<ScreenType
> screen_sequence
;
196 SortMode browser_sort_mode
;
199 extern Configuration Config
;
201 #endif // NCMPCPP_SETTINGS_H