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