PageRenderTime 41ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/Build/vimprobable2-git/config.h

https://bitbucket.org/jasonwryan/eeepc
C Header | 223 lines | 157 code | 21 blank | 45 comment | 0 complexity | b33d63c38806a829ed4ce6d2ab49d705 MD5 | raw file
  1. /*
  2. (c) 2009 by Leon Winter
  3. (c) 2009-2012 by Hannes Schueller
  4. (c) 2009-2010 by Matto Fransen
  5. (c) 2010-2011 by Hans-Peter Deifel
  6. (c) 2010-2011 by Thomas Adam
  7. (c) 2011 by Albert Kim
  8. see LICENSE file
  9. */
  10. /* Vimprobable version number */
  11. #define VERSION "1.2.0"
  12. #define INTERNAL_VERSION "Vimprobable2/"VERSION
  13. /* general settings */
  14. char startpage[MAX_SETTING_SIZE] = "https://bbs.archlinux.org/";
  15. char useragent[MAX_SETTING_SIZE] = "Vimprobable2/" VERSION;
  16. char acceptlanguage[MAX_SETTING_SIZE] = "";
  17. static const gboolean enablePlugins = TRUE; /* TRUE keeps plugins enabled */
  18. static const gboolean enableJava = TRUE; /* FALSE disables Java applets */
  19. static const gboolean enablePagecache = FALSE; /* TRUE turns on the page cache. */
  20. static gboolean escape_input_on_load = TRUE; /* TRUE will disable automatic focusing of input fields via Javascript*/
  21. char temp_dir[MAX_SETTING_SIZE] = "/tmp"; /* location of temporary files, default will be overridden if TEMPDIR is set */
  22. /* appearance */
  23. char statusbgcolor[MAX_SETTING_SIZE] = "#222222"; /* background color for status bar */
  24. char statuscolor[MAX_SETTING_SIZE] = "#696969"; /* color for status bar */
  25. char sslbgcolor[MAX_SETTING_SIZE] = "#222222"; /* background color for status bar with SSL url */
  26. char sslinvalidbgcolor[MAX_SETTING_SIZE]= "#8A2F58"; /* background color for status bar with unverified SSL url */
  27. char sslcolor[MAX_SETTING_SIZE] = "#53A6A6"; /* color for status bar with SSL url */
  28. /* normal, warning, error */
  29. static const char *urlboxfont[] = { "Envy Code R 9", "Droid Sans Mono Slashed 9", "Droid Sans Mono Slashed 9"};
  30. static const char *urlboxcolor[] = { "#CCCCCC", "#CC99CC", "#FFB6C1" };
  31. static const char *urlboxbgcolor[] = { "#212121", "#111111", "#212121" };
  32. /* normal, error */
  33. static const char *completionfont[] = { "Envy Code R 9", "Droid Sans Mono Slashed 9" };
  34. /* topborder color */
  35. static const char *completioncolor[] = { "#899CA1", "#BF4D80", "#444444" };
  36. /* current row background */
  37. static const char *completionbgcolor[] = { "#3D3D3D", "#8C4665", "#5C5C5C" };
  38. /* pango markup for prefix highliting: opening, closing */
  39. #define COMPLETION_TAG_OPEN "<b>"
  40. #define COMPLETION_TAG_CLOSE "</b>"
  41. static const char statusfont[] = "Envy Code R 9"; /* 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 = ']';
  52. /* external handlers:
  53. * the handle (first string) contain what the handled links have to start with
  54. * the handlers (second string) contain the external applications which should be called for this sort of link
  55. * %s can be used as a placeholder for the link argument after the handler
  56. * e.g.: "mailto:user@example.org
  57. * "handle" is "mailto:"
  58. * "%s" will translate to "user@example.org"
  59. */
  60. static URIHandler uri_handlers[] = {
  61. { "mailto:", "urxvtc -e mutt %s" },
  62. { "ftp://", "urxvt -e wget ftp://%s" },
  63. { "vimprobableedit:", "urxvt -title scratchpad -geometry 84x18+32+50 -e vim %s" },
  64. };
  65. /* cookies */
  66. #define ENABLE_COOKIE_SUPPORT
  67. #define COOKIES_STORAGE_FILENAME "%s/vimprobable/cookies", config_base
  68. #define COOKIES_STORAGE_READONLY FALSE /* if TRUE new cookies will be lost if you quit */
  69. /* downloads directory */
  70. #define DOWNLOADS_PATH "%s", getenv("HOME")
  71. /* font size */
  72. #define DEFAULT_FONT_SIZE 13
  73. /* user styles */
  74. #define USER_STYLESHEET "%s/vimprobable/style.css", config_base
  75. /* user javascript */
  76. #define ENABLE_USER_SCRIPTFILE
  77. #define USER_SCRIPTFILE "%s/vimprobable/scripts.js", config_base
  78. /* ssl */
  79. static gboolean strict_ssl = TRUE; /* FALSE will accept any SSL certificate at face value */
  80. static char ca_bundle[MAX_SETTING_SIZE] = "/etc/ssl/certs/ca-certificates.crt";
  81. /* proxy */
  82. static const gboolean use_proxy = TRUE; /* TRUE if you're going to use a proxy (whose address
  83. is specified in http_proxy environment variable), false otherwise */
  84. /* scrolling */
  85. static unsigned int scrollstep = 40; /* cursor difference in pixel */
  86. static unsigned int pagingkeep = 40; /* pixels kept when paging */
  87. #define DISABLE_SCROLLBAR
  88. /* searching */
  89. #define ENABLE_MATCH_HIGHLITING
  90. static const int searchoptions = CaseInsensitive | Wrapping;
  91. gboolean complete_case_sensitive = TRUE;
  92. /* search engines */
  93. static Searchengine searchengines[] = {
  94. { "d", "https://duckduckgo.com/html/?q=%s&t=Vimprobable" },
  95. { "g", "http://www.google.com/search?hl=en&source=hp&ie=ISO-8859-l&q=%s" },
  96. { "a", "https://wiki.archlinux.org/index.php?title=Special%%3ASearch&search=%s&go=Go" },
  97. { "w", "https://secure.wikimedia.org/wikipedia/en/w/index.php?title=Special%%3ASearch&search=%s&go=Go" },
  98. { "b", "http://www.google.com/search?q=site:bbs.archlinux.org+%s" },
  99. /* Hack to shorten urls */
  100. { "B", "http://api.bit.ly/v3/shorten?login=jasonwryan&apikey=R_b71a9d75eecaed78de197596f35126d9&longUrl=%s&format=txt" },
  101. };
  102. static char defaultsearch[MAX_SETTING_SIZE] = "d";
  103. /* command mapping */
  104. Command commands[COMMANDSIZE] = {
  105. /* command, function, argument */
  106. { "ba", navigate, {NavigationBack} },
  107. { "back", navigate, {NavigationBack} },
  108. { "ec", script, {Info} },
  109. { "echo", script, {Info} },
  110. { "echoe", script, {Error} },
  111. { "echoerr", script, {Error} },
  112. { "fw", navigate, {NavigationForward} },
  113. { "fo", navigate, {NavigationForward} },
  114. { "forward", navigate, {NavigationForward} },
  115. { "javascript", script, {Silent} },
  116. { "o", open_arg, {TargetCurrent} },
  117. { "open", open_arg, {TargetCurrent} },
  118. { "q", quit, {0} },
  119. { "quit", quit, {0} },
  120. { "re", navigate, {NavigationReload} },
  121. { "re!", navigate, {NavigationForceReload} },
  122. { "reload", navigate, {NavigationReload} },
  123. { "reload!", navigate, {NavigationForceReload} },
  124. { "qt", search_tag, {0} },
  125. { "st", navigate, {NavigationCancel} },
  126. { "stop", navigate, {NavigationCancel} },
  127. { "t", open_arg, {TargetNew} },
  128. { "tabopen", open_arg, {TargetNew} },
  129. { "print", print_frame, {0} },
  130. { "bma", bookmark, {0} },
  131. { "bookmark", bookmark, {0} },
  132. { "source", view_source, {0} },
  133. { "openeditor", open_editor, {0} },
  134. { "set", browser_settings, {0} },
  135. { "map", mappings, {0} },
  136. { "inspect", open_inspector, {0} },
  137. { "jumpleft", scroll, {ScrollJumpTo | DirectionLeft} },
  138. { "jumpright", scroll, {ScrollJumpTo | DirectionRight} },
  139. { "jumptop", scroll, {ScrollJumpTo | DirectionTop} },
  140. { "jumpbottom", scroll, {ScrollJumpTo | DirectionBottom} },
  141. { "pageup", scroll, {ScrollMove | DirectionTop | UnitPage} },
  142. { "pagedown", scroll, {ScrollMove | DirectionBottom | UnitPage} },
  143. { "navigationback", navigate, {NavigationBack} },
  144. { "navigationforward", navigate, {NavigationForward} },
  145. { "scrollleft", scroll, {ScrollMove | DirectionLeft | UnitLine} },
  146. { "scrollright", scroll, {ScrollMove | DirectionRight | UnitLine} },
  147. { "scrollup", scroll, {ScrollMove | DirectionTop | UnitLine} },
  148. { "scrolldown", scroll, {ScrollMove | DirectionBottom | UnitLine} },
  149. };
  150. /* mouse bindings
  151. you can use MOUSE_BUTTON_1 to MOUSE_BUTTON_5
  152. */
  153. static Mouse mouse[] = {
  154. /* modmask, modkey, button, function, argument */
  155. { 0, 0, MOUSE_BUTTON_2, paste, {TargetCurrent | ClipboardPrimary | ClipboardGTK, rememberedURI} },
  156. { GDK_CONTROL_MASK, 0, MOUSE_BUTTON_2, paste, {TargetNew | ClipboardPrimary | ClipboardGTK} },
  157. { GDK_CONTROL_MASK, 0, MOUSE_BUTTON_1, open_remembered, {TargetNew} },
  158. };
  159. /* settings (arguments of :set command) */
  160. static Setting browsersettings[] = {
  161. /* public name, internal variable webkit setting integer value? boolean value? colour value? reload page? */
  162. { "useragent", useragent, "user-agent", FALSE, FALSE, FALSE, FALSE },
  163. { "scripts", NULL, "enable-scripts", FALSE, TRUE, FALSE, FALSE },
  164. { "plugins", NULL, "enable-plugins", FALSE, TRUE, FALSE, FALSE },
  165. { "pagecache", NULL, "enable-page-cache", FALSE, TRUE, FALSE, FALSE },
  166. { "java", NULL, "enable-java-applet", FALSE, TRUE, FALSE, FALSE },
  167. { "images", NULL, "auto-load-images", FALSE, TRUE, FALSE, FALSE },
  168. { "shrinkimages", NULL, "auto-shrink-images", FALSE, TRUE, FALSE, FALSE },
  169. { "cursivefont", NULL, "cursive-font-family", FALSE, FALSE, FALSE, FALSE },
  170. { "defaultencoding", NULL, "default-encoding", FALSE, FALSE, FALSE, FALSE },
  171. { "defaultfont", NULL, "default-font-family", FALSE, FALSE, FALSE, FALSE },
  172. { "fontsize", NULL, "default-font-size", TRUE, FALSE, FALSE, FALSE },
  173. { "monofontsize", NULL, "default-monospace-font-size", TRUE, FALSE, FALSE, FALSE },
  174. { "caret", NULL, "enable-caret-browsing", FALSE, TRUE, FALSE, FALSE },
  175. { "fantasyfont", NULL, "fantasy-font-family", FALSE, FALSE, FALSE, FALSE },
  176. { "minimumfontsize", NULL, "minimum-font-size", TRUE, FALSE, FALSE, FALSE },
  177. { "monofont", NULL, "monospace-font-family", FALSE, FALSE, FALSE, FALSE },
  178. { "backgrounds", NULL, "print-backgrounds", FALSE, TRUE, FALSE, FALSE },
  179. { "sansfont", NULL, "sans-serif-font-family", FALSE, FALSE, FALSE, FALSE },
  180. { "seriffont", NULL, "serif-font-family", FALSE, FALSE, FALSE, FALSE },
  181. { "stylesheet", NULL, "user-stylesheet-uri", FALSE, FALSE, FALSE, FALSE },
  182. { "resizetextareas", NULL, "resizable-text-areas", FALSE, TRUE, FALSE, FALSE },
  183. { "webinspector", NULL, "enable-developer-extras", FALSE, TRUE, FALSE, FALSE },
  184. { "homepage", startpage, "", FALSE, FALSE, FALSE, FALSE },
  185. { "statusbgcolor", statusbgcolor, "", FALSE, FALSE, TRUE, TRUE },
  186. { "statuscolor", statuscolor, "", FALSE, FALSE, TRUE, TRUE },
  187. { "sslbgcolor", sslbgcolor, "", FALSE, FALSE, TRUE, TRUE },
  188. { "sslcolor", sslcolor, "", FALSE, FALSE, TRUE, TRUE },
  189. { "acceptlanguage", acceptlanguage, "", FALSE, FALSE, FALSE, FALSE },
  190. { "defaultsearch", defaultsearch, "", FALSE, FALSE, FALSE, FALSE },
  191. { "qmark", NULL, "", FALSE, FALSE, FALSE, FALSE },
  192. { "proxy", NULL, "", FALSE, TRUE, FALSE, FALSE },
  193. { "windowsize", NULL, "", FALSE, FALSE, FALSE, FALSE },
  194. { "scrollbars", NULL, "", FALSE, TRUE, FALSE, FALSE },
  195. { "statusbar", NULL, "", FALSE, TRUE, FALSE, FALSE },
  196. { "inputbox", NULL, "", FALSE, TRUE, FALSE, FALSE },
  197. { "completioncase", NULL, "", FALSE, TRUE, FALSE, FALSE },
  198. { "escapeinput", NULL, "", FALSE, TRUE, FALSE, FALSE },
  199. { "strictssl", NULL, "", FALSE, TRUE, FALSE, FALSE },
  200. { "cabundle", ca_bundle, "", FALSE, FALSE, FALSE, FALSE },
  201. { "tempdir", temp_dir, "", FALSE, FALSE, FALSE, FALSE },
  202. };