printing command (patch by Matto Fransen <matto@matto.nl>
[vimprobable2.git] / config.h
blob853abccb9b856311b11ba4b85984d485a8070fb7
1 /*
2 (c) 2009 by Leon Winter
3 (c) 2009 by Hannes Schueller
4 (c) 2009 by Matto Fransen
5 see LICENSE file
6 */
8 /* general settings */
9 char startpage[241] = "http://www.vimprobable.org/";
10 char useragent[120] = "Vimprobable2/0.9.4.0";
11 static const gboolean enablePlugins = TRUE; /* TRUE keeps plugins enabled */
12 static const gboolean enableJava = TRUE; /* FALSE disables Java applets */
14 /* appearance */
15 char statusbgcolor[] = "#000000"; /* background color for status bar */
16 char statuscolor[] = "#ffffff"; /* color for status bar */
17 char sslbgcolor[] = "#b0ff00"; /* background color for status bar with SSL url */
18 char sslcolor[] = "#000000"; /* color for status bar with SSL url */
20 /* normal, warning, error */
21 static const char *urlboxfont[] = { "monospace normal 8", "monospace normal 8", "monospace bold 8"};
22 static const char *urlboxcolor[] = { NULL, "#ff0000", "#ffffff" };
23 static const char *urlboxbgcolor[] = { NULL, NULL, "#ff0000" };
25 /* normal, error */
26 static const char *completionfont[] = { "monospace normal 8", "monospace bold 8" };
27 /* topborder color */
28 static const char *completioncolor[] = { "#000000", "#ff00ff", "#000000" };
29 /* current row background */
30 static const char *completionbgcolor[] = { "#ffffff", "#ffffff", "#fff000" };
31 /* pango markup for prefix highliting: opening, closing */
32 #define COMPLETION_TAG_OPEN "<b>"
33 #define COMPLETION_TAG_CLOSE "</b>"
35 static const char statusfont[] = "monospace bold 8"; /* font for status bar */
36 #define ENABLE_HISTORY_INDICATOR
37 #define ENABLE_INCREMENTAL_SEARCH
38 #define ENABLE_GTK_PROGRESS_BAR
39 #define ENABLE_WGET_PROGRESS_BAR
40 static const int progressbartick = 20;
41 static const char progressborderleft = '[';
42 static const char progressbartickchar = '=';
43 static const char progressbarcurrent = '>';
44 static const char progressbarspacer = ' ';
45 static const char progressborderright = ']';
47 /* cookies */
48 #define ENABLE_COOKIE_SUPPORT
49 #define COOKIES_STORAGE_FILENAME "%s/.config/vimprobable/cookies", getenv("HOME")
50 #define COOKIES_STORAGE_READONLY FALSE /* if TRUE new cookies will be lost if you quit */
52 /* bookmarks */
53 #define BOOKMARKS_STORAGE_FILENAME "%s/.config/vimprobable/bookmarks", getenv("HOME")
55 /* history */
56 #define HISTORY_MAX_ENTRIES 1000
57 #define HISTORY_STORAGE_FILENAME "%s/.config/vimprobable/history", getenv("HOME")
58 #define CLOSED_URL_FILENAME "%s/.config/vimprobable/closed", getenv("HOME")
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 */
73 /* scrolling */
74 static unsigned int scrollstep = 40; /* cursor difference in pixel */
75 static unsigned int pagingkeep = 40; /* pixels kept when paging */
76 #define DISABLE_SCROLLBAR
78 /* searching */
79 #define ENABLE_MATCH_HIGHLITING
80 static const int searchoptions = CaseInsensitive | Wrapping;
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[] = {
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, {TargetCurrent} },
105 { "open", open, {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, {TargetNew} },
116 { "tabopen", open, {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, {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 { "java", NULL, "enable-java-applet", FALSE, TRUE, FALSE, FALSE },
154 { "images", NULL, "auto-load-images", FALSE, TRUE, FALSE, FALSE },
155 { "shrinkimages", NULL, "auto-shrink-images", FALSE, TRUE, FALSE, FALSE },
156 { "cursivefont", NULL, "cursive-font-family", FALSE, FALSE, FALSE, FALSE },
157 { "defaultencoding", NULL, "default-encoding", FALSE, FALSE, FALSE, FALSE },
158 { "defaultfont", NULL, "default-font-family", FALSE, FALSE, FALSE, FALSE },
159 { "fontsize", NULL, "default-font-size", TRUE, FALSE, FALSE, FALSE },
160 { "monofontsize", NULL, "default-monospace-font-size", TRUE, FALSE, FALSE, FALSE },
161 { "caret", NULL, "enable-caret-browsing", FALSE, TRUE, FALSE, FALSE },
162 { "fantasyfont", NULL, "fantasy-font-family", FALSE, FALSE, FALSE, FALSE },
163 { "minimumfontsize", NULL, "minimum-font-size", TRUE, FALSE, FALSE, FALSE },
164 { "monofont", NULL, "monospace-font-family", FALSE, FALSE, FALSE, FALSE },
165 { "backgrounds", NULL, "print-backgrounds", FALSE, TRUE, FALSE, FALSE },
166 { "sansfont", NULL, "sans-serif-font-family", FALSE, FALSE, FALSE, FALSE },
167 { "seriffont", NULL, "serif-font-family", FALSE, FALSE, FALSE, FALSE },
168 { "stylesheet", NULL, "user-stylesheet-uri", FALSE, FALSE, FALSE, FALSE },
169 { "resizetextareas", NULL, "resizable-text-areas", FALSE, TRUE, FALSE, FALSE },
170 { "webinspector", NULL, "enable-developer-extras", FALSE, TRUE, FALSE, FALSE },
172 { "homepage", startpage, "", FALSE, FALSE, FALSE, FALSE },
173 { "statusbgcolor", statusbgcolor, "", FALSE, FALSE, TRUE, TRUE },
174 { "statuscolor", statuscolor, "", FALSE, FALSE, TRUE, TRUE },
175 { "sslbgcolor", sslbgcolor, "", FALSE, FALSE, TRUE, TRUE },
176 { "sslcolor", sslcolor, "", FALSE, FALSE, TRUE, TRUE },
177 { "qmark", NULL, "", FALSE, FALSE, FALSE, FALSE },
178 { "proxy", NULL, "", FALSE, TRUE, FALSE, FALSE },
179 { "scrollbars", NULL, "", FALSE, TRUE, FALSE, FALSE },