static Setting default_settings[] = {
/* webkit settings */
- /* alias, name, type, func, arg, global */
- {"images", "auto-load-images", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {"shrinkimages", "auto-shrink-images", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {"cursivfont", "cursive-font-family", TYPE_CHAR, setting_webkit, {.s = "serif"}, FALSE},
- {"defaultencondig", "default-encoding", TYPE_CHAR, setting_webkit, {.s = "utf-8"}, FALSE},
- {"defaultfont", "default-font-family", TYPE_CHAR, setting_webkit, {.s = "sans-serif"}, FALSE},
- {"fontsize", "default-font-size", TYPE_INTEGER, setting_webkit, {.i = 11}, FALSE},
- {"monofontsize", "default-monospace-font-size", TYPE_INTEGER, setting_webkit, {.i = 11}, FALSE},
- {"caret", "enable-caret-browsing", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {"webinspector", "enable-developer-extras", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {"dnsprefetching", "enable-dns-prefetching", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {"dompaste", "enable-dom-paste", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {"frameflattening", "enable-frame-flattening", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {NULL, "enable-file-access-from-file-uris", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {NULL, "enable-html5-database", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {NULL, "enable-html5-local-storage", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {"javaapplet", "enable-java-applet", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {"offlinecache", "enable-offline-web-application-cache", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {"pagecache", "enable-page-cache", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {"plugins", "enable-plugins", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {"scripts", "enable-scripts", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {NULL, "enable-site-specific-quirks", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {NULL, "enable-spatial-navigation", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {"spell", "enable-spell-checking", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {NULL, "enable-universal-access-from-file-uris", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {NULL, "enable-webgl", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {"xssauditor", "enable-xss-auditor", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {NULL, "enforce-96-dpi", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {"fantasyfont", "fantasy-font-family", TYPE_CHAR, setting_webkit, {.s = "serif"}, FALSE},
- {NULL, "javascript-can-access-clipboard", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {NULL, "javascript-can-open-windows-automatically", TYPE_BOOLEAN, setting_webkit, {.i = 0}, FALSE},
- {"minimumfontsize", "minimum-font-size", TYPE_INTEGER, setting_webkit, {.i = 5}, FALSE},
- {NULL, "minimum-logical-font-size", TYPE_INTEGER, setting_webkit, {.i = 5}, FALSE},
- {"monofont", "monospace-font-family", TYPE_CHAR, setting_webkit, {.s = "monospace"}, FALSE},
- {"backgrounds", "print-backgrounds", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {"resizetextareas", "resizable-text-areas", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {"sansfont", "sans-serif-font-family", TYPE_CHAR, setting_webkit, {.s = "sans-serif"}, FALSE},
- {"seriffont", "serif-font-family", TYPE_CHAR, setting_webkit, {.s = "serif"}, FALSE},
- {"spelllang", "spell-checking-languages", TYPE_CHAR, setting_webkit, {.s = NULL}, FALSE},
- {NULL, "tab-key-cycles-through-elements", TYPE_BOOLEAN, setting_webkit, {.i = 1}, FALSE},
- {"useragent", "user-agent", TYPE_CHAR, setting_webkit, {.s = "vimb/" VERSION " (X11; Linux i686) AppleWebKit/535.22+ Compatible (Safari)"}, FALSE},
- {"zoomstep", "zoom-step", TYPE_FLOAT, setting_webkit, {.i = 100000}, FALSE},
+ /* alias, name, type, func, arg */
+ {"images", "auto-load-images", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"shrinkimages", "auto-shrink-images", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"cursivfont", "cursive-font-family", TYPE_CHAR, setting_webkit, {0}},
+ {"defaultencondig", "default-encoding", TYPE_CHAR, setting_webkit, {0}},
+ {"defaultfont", "default-font-family", TYPE_CHAR, setting_webkit, {0}},
+ {"fontsize", "default-font-size", TYPE_INTEGER, setting_webkit, {0}},
+ {"monofontsize", "default-monospace-font-size", TYPE_INTEGER, setting_webkit, {0}},
+ {"caret", "enable-caret-browsing", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"webinspector", "enable-developer-extras", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"dnsprefetching", "enable-dns-prefetching", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"dompaste", "enable-dom-paste", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"frameflattening", "enable-frame-flattening", TYPE_BOOLEAN, setting_webkit, {0}},
+ {NULL, "enable-file-access-from-file-uris", TYPE_BOOLEAN, setting_webkit, {0}},
+ {NULL, "enable-html5-database", TYPE_BOOLEAN, setting_webkit, {0}},
+ {NULL, "enable-html5-local-storage", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"javaapplet", "enable-java-applet", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"offlinecache", "enable-offline-web-application-cache", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"pagecache", "enable-page-cache", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"plugins", "enable-plugins", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"scripts", "enable-scripts", TYPE_BOOLEAN, setting_webkit, {0}},
+ {NULL, "enable-site-specific-quirks", TYPE_BOOLEAN, setting_webkit, {0}},
+ {NULL, "enable-spatial-navigation", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"spell", "enable-spell-checking", TYPE_BOOLEAN, setting_webkit, {0}},
+ {NULL, "enable-universal-access-from-file-uris", TYPE_BOOLEAN, setting_webkit, {0}},
+ {NULL, "enable-webgl", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"xssauditor", "enable-xss-auditor", TYPE_BOOLEAN, setting_webkit, {0}},
+ {NULL, "enforce-96-dpi", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"fantasyfont", "fantasy-font-family", TYPE_CHAR, setting_webkit, {0}},
+ {NULL, "javascript-can-access-clipboard", TYPE_BOOLEAN, setting_webkit, {0}},
+ {NULL, "javascript-can-open-windows-automatically", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"minimumfontsize", "minimum-font-size", TYPE_INTEGER, setting_webkit, {0}},
+ {NULL, "minimum-logical-font-size", TYPE_INTEGER, setting_webkit, {0}},
+ {"monofont", "monospace-font-family", TYPE_CHAR, setting_webkit, {0}},
+ {"backgrounds", "print-backgrounds", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"resizetextareas", "resizable-text-areas", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"sansfont", "sans-serif-font-family", TYPE_CHAR, setting_webkit, {0}},
+ {"seriffont", "serif-font-family", TYPE_CHAR, setting_webkit, {0}},
+ {"spelllang", "spell-checking-languages", TYPE_CHAR, setting_webkit, {0}},
+ {NULL, "tab-key-cycles-through-elements", TYPE_BOOLEAN, setting_webkit, {0}},
+ {"useragent", "user-agent", TYPE_CHAR, setting_webkit, {0}},
+ {"zoomstep", "zoom-step", TYPE_FLOAT, setting_webkit, {0}},
/* internal variables */
- {NULL, "stylesheet", TYPE_BOOLEAN, setting_user_style, {.i = 1}, FALSE},
+ {NULL, "stylesheet", TYPE_BOOLEAN, setting_user_style, {0}},
/* TODO make soup setting local */
- {NULL, "proxy", TYPE_BOOLEAN, setting_proxy, {.i = 1}, TRUE},
- {NULL, "cookie-timeout", TYPE_INTEGER, setting_cookie_timeout, {.i = 4800}, TRUE},
- {NULL, "strict-ssl", TYPE_BOOLEAN, setting_strict_ssl, {.i = 1}, TRUE},
-
- {NULL, "scrollstep", TYPE_INTEGER, setting_scrollstep, {.i = 40}, TRUE},
- {NULL, "status-color-bg", TYPE_COLOR, setting_status_color_bg, {.s = "#000"}, TRUE},
- {NULL, "status-color-fg", TYPE_COLOR, setting_status_color_fg, {.s = "#fff"}, TRUE},
- {NULL, "status-font", TYPE_FONT, setting_status_font, {.s = "monospace bold 8"}, TRUE},
- {NULL, "status-ssl-color-bg", TYPE_COLOR, setting_status_color_bg, {.s = "#95e454"}, TRUE},
- {NULL, "status-ssl-color-fg", TYPE_COLOR, setting_status_color_fg, {.s = "#000"}, TRUE},
- {NULL, "status-ssl-font", TYPE_FONT, setting_status_font, {.s = "monospace bold 8"}, TRUE},
- {NULL, "status-sslinvalid-color-bg", TYPE_COLOR, setting_status_color_bg, {.s = "#f08080"}, TRUE},
- {NULL, "status-sslinvalid-color-fg", TYPE_COLOR, setting_status_color_fg, {.s = "#000"}, TRUE},
- {NULL, "status-sslinvalid-font", TYPE_FONT, setting_status_font, {.s = "monospace bold 8"}, TRUE},
- {NULL, "input-bg-normal", TYPE_COLOR, setting_input_style, {.s = "#fff"}, TRUE},
- {NULL, "input-bg-error", TYPE_COLOR, setting_input_style, {.s = "#f00"}, TRUE},
- {NULL, "input-fg-normal", TYPE_COLOR, setting_input_style, {.s = "#000"}, TRUE},
- {NULL, "input-fg-error", TYPE_COLOR, setting_input_style, {.s = "#000"}, TRUE},
- {NULL, "input-font-normal", TYPE_FONT, setting_input_style, {.s = "monospace normal 8"}, TRUE},
- {NULL, "input-font-error", TYPE_FONT, setting_input_style, {.s = "monospace bold 8"}, TRUE},
- {NULL, "completion-font", TYPE_FONT, setting_completion_style, {.s = "monospace normal 8"}, TRUE},
- {NULL, "completion-fg-normal", TYPE_COLOR, setting_completion_style, {.s = "#f6f3e8"}, TRUE},
- {NULL, "completion-fg-active", TYPE_COLOR, setting_completion_style, {.s = "#fff"}, TRUE},
- {NULL, "completion-bg-normal", TYPE_COLOR, setting_completion_style, {.s = "#656565"}, TRUE},
- {NULL, "completion-bg-active", TYPE_COLOR, setting_completion_style, {.s = "#777777"}, TRUE},
- {NULL, "max-completion-items", TYPE_INTEGER, setting_completion_style, {.i = 15}, FALSE},
- {NULL, "hint-bg", TYPE_CHAR, setting_hint_style, {.s = "#ff0"}, TRUE},
- {NULL, "hint-bg-focus", TYPE_CHAR, setting_hint_style, {.s = "#8f0"}, TRUE},
- {NULL, "hint-fg", TYPE_CHAR, setting_hint_style, {.s = "#000"}, TRUE},
- {NULL, "hint-style", TYPE_CHAR, setting_hint_style, {.s = "position:absolute;z-index:100000;font-family:monospace;font-weight:bold;font-size:10px;color:#000;background-color:#fff;margin:0;padding:0px 1px;border:1px solid #444;opacity:0.7;"}, TRUE},
- {NULL, "ca-bundle", TYPE_CHAR, setting_ca_bundle, {.s = "/etc/ssl/certs/ca-certificates.crt"}, TRUE},
- {NULL, "home-page", TYPE_CHAR, setting_home_page, {.s = "https://github.com/fanglingsu/vimb"}, TRUE},
- {NULL, "download-path", TYPE_CHAR, setting_download_path, {.s = "/tmp/vimb"}, TRUE},
- {NULL, "history-max-items", TYPE_INTEGER, setting_history_max_items, {.i = 500}, TRUE},
+ {NULL, "proxy", TYPE_BOOLEAN, setting_proxy, {0}},
+ {NULL, "cookie-timeout", TYPE_INTEGER, setting_cookie_timeout, {0}},
+ {NULL, "strict-ssl", TYPE_BOOLEAN, setting_strict_ssl, {0}},
+
+ {NULL, "scrollstep", TYPE_INTEGER, setting_scrollstep, {0}},
+ {NULL, "status-color-bg", TYPE_COLOR, setting_status_color_bg, {0}},
+ {NULL, "status-color-fg", TYPE_COLOR, setting_status_color_fg, {0}},
+ {NULL, "status-font", TYPE_FONT, setting_status_font, {0}},
+ {NULL, "status-ssl-color-bg", TYPE_COLOR, setting_status_color_bg, {0}},
+ {NULL, "status-ssl-color-fg", TYPE_COLOR, setting_status_color_fg, {0}},
+ {NULL, "status-ssl-font", TYPE_FONT, setting_status_font, {0}},
+ {NULL, "status-sslinvalid-color-bg", TYPE_COLOR, setting_status_color_bg, {0}},
+ {NULL, "status-sslinvalid-color-fg", TYPE_COLOR, setting_status_color_fg, {0}},
+ {NULL, "status-sslinvalid-font", TYPE_FONT, setting_status_font, {0}},
+ {NULL, "input-bg-normal", TYPE_COLOR, setting_input_style, {0}},
+ {NULL, "input-bg-error", TYPE_COLOR, setting_input_style, {0}},
+ {NULL, "input-fg-normal", TYPE_COLOR, setting_input_style, {0}},
+ {NULL, "input-fg-error", TYPE_COLOR, setting_input_style, {0}},
+ {NULL, "input-font-normal", TYPE_FONT, setting_input_style, {0}},
+ {NULL, "input-font-error", TYPE_FONT, setting_input_style, {0}},
+ {NULL, "completion-font", TYPE_FONT, setting_completion_style, {0}},
+ {NULL, "completion-fg-normal", TYPE_COLOR, setting_completion_style, {0}},
+ {NULL, "completion-fg-active", TYPE_COLOR, setting_completion_style, {0}},
+ {NULL, "completion-bg-normal", TYPE_COLOR, setting_completion_style, {0}},
+ {NULL, "completion-bg-active", TYPE_COLOR, setting_completion_style, {0}},
+ {NULL, "max-completion-items", TYPE_INTEGER, setting_completion_style, {0}},
+ {NULL, "hint-bg", TYPE_CHAR, setting_hint_style, {0}},
+ {NULL, "hint-bg-focus", TYPE_CHAR, setting_hint_style, {0}},
+ {NULL, "hint-fg", TYPE_CHAR, setting_hint_style, {0}},
+ {NULL, "hint-style", TYPE_CHAR, setting_hint_style, {0}},
+ {NULL, "ca-bundle", TYPE_CHAR, setting_ca_bundle, {0}},
+ {NULL, "home-page", TYPE_CHAR, setting_home_page, {0}},
+ {NULL, "download-path", TYPE_CHAR, setting_download_path, {0}},
+ {NULL, "history-max-items", TYPE_INTEGER, setting_history_max_items, {0}},
};
void setting_init(void)