adding C-[ as escape sequence
[vimprobable2.git] / config.h
blobe3ca4a5de90cd1b7a7d19c209eb439ecfbcf4eda
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.7.1"
12 #define INTERNAL_VERSION "Vimprobable2/"VERSION
14 /* general settings */
15 char startpage[1024] = "http://www.vimprobable.org/";
16 char useragent[1024] = "Vimprobable2/" VERSION;
17 char acceptlanguage[1024] = "";
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" },
89 static Searchengine *defsearch = &searchengines[0];
91 /* command mapping */
92 Command commands[COMMANDSIZE] = {
93 /* command, function, argument */
94 { "ba", navigate, {NavigationBack} },
95 { "back", navigate, {NavigationBack} },
96 { "ec", script, {Info} },
97 { "echo", script, {Info} },
98 { "echoe", script, {Error} },
99 { "echoerr", script, {Error} },
100 { "fw", navigate, {NavigationForward} },
101 { "fo", navigate, {NavigationForward} },
102 { "forward", navigate, {NavigationForward} },
103 { "javascript", script, {Silent} },
104 { "o", open_arg, {TargetCurrent} },
105 { "open", open_arg, {TargetCurrent} },
106 { "q", quit, {0} },
107 { "quit", quit, {0} },
108 { "re", navigate, {NavigationReload} },
109 { "re!", navigate, {NavigationForceReload} },
110 { "reload", navigate, {NavigationReload} },
111 { "reload!", navigate, {NavigationForceReload} },
112 { "qt", search_tag, {0} },
113 { "st", navigate, {NavigationCancel} },
114 { "stop", navigate, {NavigationCancel} },
115 { "t", open_arg, {TargetNew} },
116 { "tabopen", open_arg, {TargetNew} },
117 { "print", print_frame, {0} },
118 { "bma", bookmark, {0} },
119 { "bookmark", bookmark, {0} },
120 { "source", view_source, {0} },
121 { "set", browser_settings, {0} },
122 { "map", mappings, {0} },
123 { "jumpleft", scroll, {ScrollJumpTo | DirectionLeft} },
124 { "jumpright", scroll, {ScrollJumpTo | DirectionRight} },
125 { "jumptop", scroll, {ScrollJumpTo | DirectionTop} },
126 { "jumpbottom", scroll, {ScrollJumpTo | DirectionBottom} },
127 { "pageup", scroll, {ScrollMove | DirectionTop | UnitPage} },
128 { "pagedown", scroll, {ScrollMove | DirectionBottom | UnitPage} },
129 { "navigationback", navigate, {NavigationBack} },
130 { "navigationforward", navigate, {NavigationForward} },
131 { "scrollleft", scroll, {ScrollMove | DirectionLeft | UnitLine} },
132 { "scrollright", scroll, {ScrollMove | DirectionRight | UnitLine} },
133 { "scrollup", scroll, {ScrollMove | DirectionTop | UnitLine} },
134 { "scrolldown", scroll, {ScrollMove | DirectionBottom | UnitLine} },
137 /* mouse bindings
138 you can use MOUSE_BUTTON_1 to MOUSE_BUTTON_5
140 static Mouse mouse[] = {
141 /* modmask, modkey, button, function, argument */
142 { 0, 0, MOUSE_BUTTON_2, paste, {TargetCurrent | ClipboardPrimary | ClipboardGTK, rememberedURI} },
143 { GDK_CONTROL_MASK, 0, MOUSE_BUTTON_2, paste, {TargetNew | ClipboardPrimary | ClipboardGTK} },
144 { GDK_CONTROL_MASK, 0, MOUSE_BUTTON_1, open_arg, {TargetNew, rememberedURI} },
147 /* settings (arguments of :set command) */
148 static Setting browsersettings[] = {
149 /* public name, internal variable webkit setting integer value? boolean value? colour value? reload page? */
150 { "useragent", useragent, "user-agent", FALSE, FALSE, FALSE, FALSE },
151 { "scripts", NULL, "enable-scripts", FALSE, TRUE, FALSE, FALSE },
152 { "plugins", NULL, "enable-plugins", FALSE, TRUE, FALSE, FALSE },
153 { "pagecache", NULL, "enable-page-cache", FALSE, TRUE, FALSE, FALSE },
154 { "java", NULL, "enable-java-applet", FALSE, TRUE, FALSE, FALSE },
155 { "images", NULL, "auto-load-images", FALSE, TRUE, FALSE, FALSE },
156 { "shrinkimages", NULL, "auto-shrink-images", FALSE, TRUE, FALSE, FALSE },
157 { "cursivefont", NULL, "cursive-font-family", FALSE, FALSE, FALSE, FALSE },
158 { "defaultencoding", NULL, "default-encoding", FALSE, FALSE, FALSE, FALSE },
159 { "defaultfont", NULL, "default-font-family", FALSE, FALSE, FALSE, FALSE },
160 { "fontsize", NULL, "default-font-size", TRUE, FALSE, FALSE, FALSE },
161 { "monofontsize", NULL, "default-monospace-font-size", TRUE, FALSE, FALSE, FALSE },
162 { "caret", NULL, "enable-caret-browsing", FALSE, TRUE, FALSE, FALSE },
163 { "fantasyfont", NULL, "fantasy-font-family", FALSE, FALSE, FALSE, FALSE },
164 { "minimumfontsize", NULL, "minimum-font-size", TRUE, FALSE, FALSE, FALSE },
165 { "monofont", NULL, "monospace-font-family", FALSE, FALSE, FALSE, FALSE },
166 { "backgrounds", NULL, "print-backgrounds", FALSE, TRUE, FALSE, FALSE },
167 { "sansfont", NULL, "sans-serif-font-family", FALSE, FALSE, FALSE, FALSE },
168 { "seriffont", NULL, "serif-font-family", FALSE, FALSE, FALSE, FALSE },
169 { "stylesheet", NULL, "user-stylesheet-uri", FALSE, FALSE, FALSE, FALSE },
170 { "resizetextareas", NULL, "resizable-text-areas", FALSE, TRUE, FALSE, FALSE },
171 { "webinspector", NULL, "enable-developer-extras", FALSE, TRUE, FALSE, FALSE },
173 { "homepage", startpage, "", FALSE, FALSE, FALSE, FALSE },
174 { "statusbgcolor", statusbgcolor, "", FALSE, FALSE, TRUE, TRUE },
175 { "statuscolor", statuscolor, "", FALSE, FALSE, TRUE, TRUE },
176 { "sslbgcolor", sslbgcolor, "", FALSE, FALSE, TRUE, TRUE },
177 { "sslcolor", sslcolor, "", FALSE, FALSE, TRUE, TRUE },
178 { "acceptlanguage", acceptlanguage, "", FALSE, FALSE, FALSE, FALSE },
179 { "qmark", NULL, "", FALSE, FALSE, FALSE, FALSE },
180 { "proxy", NULL, "", FALSE, TRUE, FALSE, FALSE },
181 { "scrollbars", NULL, "", FALSE, TRUE, FALSE, FALSE },
182 { "completioncase", NULL, "", FALSE, TRUE, FALSE, FALSE },