Remove feedback for toggled proxy.
[vimprobable2.git] / config.h
blob01a31b6eb0aac6dc00a0fe7d20eeaa22be3fa91e
1 /*
2 (c) 2009 by Leon Winter
3 (c) 2009-2011 by Hannes Schueller
4 (c) 2009-2010 by Matto Fransen
5 (c) 2010-2011 by Hans-Peter Deifel
6 (c) 2010-2011 by Thomas Adam
7 (c) 2011 by Albert Kim
8 see LICENSE file
9 */
11 /* Vimprobable version number */
12 #define VERSION "0.9.11.2"
13 #define INTERNAL_VERSION "Vimprobable2/"VERSION
15 /* general settings */
16 char startpage[MAX_SETTING_SIZE] = "http://www.vimprobable.org/";
17 char useragent[MAX_SETTING_SIZE] = "Vimprobable2/" VERSION;
18 char acceptlanguage[MAX_SETTING_SIZE] = "";
19 static const gboolean enablePlugins = TRUE; /* TRUE keeps plugins enabled */
20 static const gboolean enableJava = TRUE; /* FALSE disables Java applets */
21 static const gboolean enablePagecache = FALSE; /* TRUE turns on the page cache. */
23 /* appearance */
24 char statusbgcolor[MAX_SETTING_SIZE] = "#000000"; /* background color for status bar */
25 char statuscolor[MAX_SETTING_SIZE] = "#ffffff"; /* color for status bar */
26 char sslbgcolor[MAX_SETTING_SIZE] = "#b0ff00"; /* background color for status bar with SSL url */
27 char sslcolor[MAX_SETTING_SIZE] = "#000000"; /* color for status bar with SSL url */
29 /* normal, warning, error */
30 static const char *urlboxfont[] = { "monospace normal 8", "monospace normal 8", "monospace bold 8"};
31 static const char *urlboxcolor[] = { NULL, "#ff0000", "#ffffff" };
32 static const char *urlboxbgcolor[] = { NULL, NULL, "#ff0000" };
34 /* normal, error */
35 static const char *completionfont[] = { "monospace normal 8", "monospace bold 8" };
36 /* topborder color */
37 static const char *completioncolor[] = { "#000000", "#ff00ff", "#000000" };
38 /* current row background */
39 static const char *completionbgcolor[] = { "#ffffff", "#ffffff", "#fff000" };
40 /* pango markup for prefix highliting: opening, closing */
41 #define COMPLETION_TAG_OPEN "<b>"
42 #define COMPLETION_TAG_CLOSE "</b>"
44 static const char statusfont[] = "monospace bold 8"; /* font for status bar */
45 #define ENABLE_HISTORY_INDICATOR
46 #define ENABLE_INCREMENTAL_SEARCH
47 #define ENABLE_GTK_PROGRESS_BAR
48 #define ENABLE_WGET_PROGRESS_BAR
49 static const int progressbartick = 20;
50 static const char progressborderleft = '[';
51 static const char progressbartickchar = '=';
52 static const char progressbarcurrent = '>';
53 static const char progressbarspacer = ' ';
54 static const char progressborderright = ']';
56 /* external handlers:
57 * the handle (first string) contain what the handled links have to start with
58 * the handlers (second string) contain the external applications which should be called for this sort of link
59 * %s can be used as a placeholder for the link argument after the handler
60 * e.g.: "mailto:user@example.org
61 * "handle" is "mailto:"
62 * "%s" will translate to "user@example.org"
64 static URIHandler uri_handlers[] = {
65 { "mailto:", "x-terminal-emulator -e mutt %s" },
66 { "ftp://", "x-terminal-emulator -e wget ftp://%s" },
69 /* cookies */
70 #define ENABLE_COOKIE_SUPPORT
71 #define COOKIES_STORAGE_FILENAME "%s/vimprobable/cookies", config_base
72 #define COOKIES_STORAGE_READONLY FALSE /* if TRUE new cookies will be lost if you quit */
74 /* downloads directory */
75 #define DOWNLOADS_PATH "%s", getenv("HOME")
77 /* font size */
78 #define DEFAULT_FONT_SIZE 12
80 /* user styles */
81 #define USER_STYLESHEET "%s/vimprobable/style.css", config_base
83 /* proxy */
84 static const gboolean use_proxy = TRUE; /* TRUE if you're going to use a proxy (whose address
85 is specified in http_proxy environment variable), false otherwise */
86 /* scrolling */
87 static unsigned int scrollstep = 40; /* cursor difference in pixel */
88 static unsigned int pagingkeep = 40; /* pixels kept when paging */
89 #define DISABLE_SCROLLBAR
91 /* searching */
92 #define ENABLE_MATCH_HIGHLITING
93 static const int searchoptions = CaseInsensitive | Wrapping;
94 gboolean complete_case_sensitive = TRUE;
96 /* search engines */
97 static Searchengine searchengines[] = {
98 { "i", "http://ixquick.com/do/metasearch.pl?query=%s" },
99 { "w", "https://secure.wikimedia.org/wikipedia/en/w/index.php?title=Special%%3ASearch&search=%s&go=Go" },
100 { "wd", "https://secure.wikimedia.org/wikipedia/de/w/index.php?title=Special%%3ASearch&search=%s&go=Go" },
101 { "d", "https://duckduckgo.com/?q=%s&t=Vimprobable" },
102 { "dd", "https://duckduckgo.com/html/?q=%s&t=Vimprobable" },
105 static char defaultsearch[MAX_SETTING_SIZE] = "i";
107 /* command mapping */
108 Command commands[COMMANDSIZE] = {
109 /* command, function, argument */
110 { "ba", navigate, {NavigationBack} },
111 { "back", navigate, {NavigationBack} },
112 { "ec", script, {Info} },
113 { "echo", script, {Info} },
114 { "echoe", script, {Error} },
115 { "echoerr", script, {Error} },
116 { "fw", navigate, {NavigationForward} },
117 { "fo", navigate, {NavigationForward} },
118 { "forward", navigate, {NavigationForward} },
119 { "javascript", script, {Silent} },
120 { "o", open_arg, {TargetCurrent} },
121 { "open", open_arg, {TargetCurrent} },
122 { "q", quit, {0} },
123 { "quit", quit, {0} },
124 { "re", navigate, {NavigationReload} },
125 { "re!", navigate, {NavigationForceReload} },
126 { "reload", navigate, {NavigationReload} },
127 { "reload!", navigate, {NavigationForceReload} },
128 { "qt", search_tag, {0} },
129 { "st", navigate, {NavigationCancel} },
130 { "stop", navigate, {NavigationCancel} },
131 { "t", open_arg, {TargetNew} },
132 { "tabopen", open_arg, {TargetNew} },
133 { "print", print_frame, {0} },
134 { "bma", bookmark, {0} },
135 { "bookmark", bookmark, {0} },
136 { "source", view_source, {0} },
137 { "set", browser_settings, {0} },
138 { "map", mappings, {0} },
139 { "jumpleft", scroll, {ScrollJumpTo | DirectionLeft} },
140 { "jumpright", scroll, {ScrollJumpTo | DirectionRight} },
141 { "jumptop", scroll, {ScrollJumpTo | DirectionTop} },
142 { "jumpbottom", scroll, {ScrollJumpTo | DirectionBottom} },
143 { "pageup", scroll, {ScrollMove | DirectionTop | UnitPage} },
144 { "pagedown", scroll, {ScrollMove | DirectionBottom | UnitPage} },
145 { "navigationback", navigate, {NavigationBack} },
146 { "navigationforward", navigate, {NavigationForward} },
147 { "scrollleft", scroll, {ScrollMove | DirectionLeft | UnitLine} },
148 { "scrollright", scroll, {ScrollMove | DirectionRight | UnitLine} },
149 { "scrollup", scroll, {ScrollMove | DirectionTop | UnitLine} },
150 { "scrolldown", scroll, {ScrollMove | DirectionBottom | UnitLine} },
153 /* mouse bindings
154 you can use MOUSE_BUTTON_1 to MOUSE_BUTTON_5
156 static Mouse mouse[] = {
157 /* modmask, modkey, button, function, argument */
158 { 0, 0, MOUSE_BUTTON_2, paste, {TargetCurrent | ClipboardPrimary | ClipboardGTK, rememberedURI} },
159 { GDK_CONTROL_MASK, 0, MOUSE_BUTTON_2, paste, {TargetNew | ClipboardPrimary | ClipboardGTK} },
160 { GDK_CONTROL_MASK, 0, MOUSE_BUTTON_1, open_remembered, {TargetNew} },
163 /* settings (arguments of :set command) */
164 static Setting browsersettings[] = {
165 /* public name, internal variable webkit setting integer value? boolean value? colour value? reload page? */
166 { "useragent", useragent, "user-agent", FALSE, FALSE, FALSE, FALSE },
167 { "scripts", NULL, "enable-scripts", FALSE, TRUE, FALSE, FALSE },
168 { "plugins", NULL, "enable-plugins", FALSE, TRUE, FALSE, FALSE },
169 { "pagecache", NULL, "enable-page-cache", FALSE, TRUE, FALSE, FALSE },
170 { "java", NULL, "enable-java-applet", FALSE, TRUE, FALSE, FALSE },
171 { "images", NULL, "auto-load-images", FALSE, TRUE, FALSE, FALSE },
172 { "shrinkimages", NULL, "auto-shrink-images", FALSE, TRUE, FALSE, FALSE },
173 { "cursivefont", NULL, "cursive-font-family", FALSE, FALSE, FALSE, FALSE },
174 { "defaultencoding", NULL, "default-encoding", FALSE, FALSE, FALSE, FALSE },
175 { "defaultfont", NULL, "default-font-family", FALSE, FALSE, FALSE, FALSE },
176 { "fontsize", NULL, "default-font-size", TRUE, FALSE, FALSE, FALSE },
177 { "monofontsize", NULL, "default-monospace-font-size", TRUE, FALSE, FALSE, FALSE },
178 { "caret", NULL, "enable-caret-browsing", FALSE, TRUE, FALSE, FALSE },
179 { "fantasyfont", NULL, "fantasy-font-family", FALSE, FALSE, FALSE, FALSE },
180 { "minimumfontsize", NULL, "minimum-font-size", TRUE, FALSE, FALSE, FALSE },
181 { "monofont", NULL, "monospace-font-family", FALSE, FALSE, FALSE, FALSE },
182 { "backgrounds", NULL, "print-backgrounds", FALSE, TRUE, FALSE, FALSE },
183 { "sansfont", NULL, "sans-serif-font-family", FALSE, FALSE, FALSE, FALSE },
184 { "seriffont", NULL, "serif-font-family", FALSE, FALSE, FALSE, FALSE },
185 { "stylesheet", NULL, "user-stylesheet-uri", FALSE, FALSE, FALSE, FALSE },
186 { "resizetextareas", NULL, "resizable-text-areas", FALSE, TRUE, FALSE, FALSE },
187 { "webinspector", NULL, "enable-developer-extras", FALSE, TRUE, FALSE, FALSE },
189 { "homepage", startpage, "", FALSE, FALSE, FALSE, FALSE },
190 { "statusbgcolor", statusbgcolor, "", FALSE, FALSE, TRUE, TRUE },
191 { "statuscolor", statuscolor, "", FALSE, FALSE, TRUE, TRUE },
192 { "sslbgcolor", sslbgcolor, "", FALSE, FALSE, TRUE, TRUE },
193 { "sslcolor", sslcolor, "", FALSE, FALSE, TRUE, TRUE },
194 { "acceptlanguage", acceptlanguage, "", FALSE, FALSE, FALSE, FALSE },
195 { "defaultsearch", defaultsearch, "", FALSE, FALSE, FALSE, FALSE },
196 { "qmark", NULL, "", FALSE, FALSE, FALSE, FALSE },
197 { "proxy", NULL, "", FALSE, TRUE, FALSE, FALSE },
198 { "scrollbars", NULL, "", FALSE, TRUE, FALSE, FALSE },
199 { "statusbar", NULL, "", FALSE, TRUE, FALSE, FALSE },
200 { "inputbox", NULL, "", FALSE, TRUE, FALSE, FALSE },
201 { "completioncase", NULL, "", FALSE, TRUE, FALSE, FALSE },