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