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