static Setting default_settings[] = {
/* webkit settings */
/* alias, name, type, func, arg */
- {"images", "auto-load-images", TYPE_BOOLEAN, webkit, {0}},
- {"cursivfont", "cursive-font-family", TYPE_CHAR, webkit, {0}},
- {"defaultencoding", "default-encoding", TYPE_CHAR, webkit, {0}},
- {"defaultfont", "default-font-family", TYPE_CHAR, webkit, {0}},
- {"fontsize", "default-font-size", TYPE_INTEGER, webkit, {0}},
- {"monofontsize", "default-monospace-font-size", TYPE_INTEGER, webkit, {0}},
- {"caret", "enable-caret-browsing", TYPE_BOOLEAN, webkit, {0}},
- {"webinspector", "enable-developer-extras", TYPE_BOOLEAN, webkit, {0}},
- {"offlinecache", "enable-offline-web-application-cache", TYPE_BOOLEAN, webkit, {0}},
- {"pagecache", "enable-page-cache", TYPE_BOOLEAN, webkit, {0}},
- {"plugins", "enable-plugins", TYPE_BOOLEAN, webkit, {0}},
- {"scripts", "enable-scripts", TYPE_BOOLEAN, webkit, {0}},
- {"xssauditor", "enable-xss-auditor", TYPE_BOOLEAN, webkit, {0}},
- {"minimumfontsize", "minimum-font-size", TYPE_INTEGER, webkit, {0}},
- {"monofont", "monospace-font-family", TYPE_CHAR, webkit, {0}},
- {NULL, "print-backgrounds", TYPE_BOOLEAN, webkit, {0}},
- {"sansfont", "sans-serif-font-family", TYPE_CHAR, webkit, {0}},
- {"seriffont", "serif-font-family", TYPE_CHAR, webkit, {0}},
- {"useragent", "user-agent", TYPE_CHAR, webkit, {0}},
- {"spacial-navigation", "enable-spatial-navigation", TYPE_BOOLEAN, webkit, {0}},
+ {"images", "auto-load-images", TYPE_BOOLEAN, webkit, {.i = 1}},
+ {"cursivfont", "cursive-font-family", TYPE_CHAR, webkit, {.s = "serif"}},
+ {"defaultencoding", "default-encoding", TYPE_CHAR, webkit, {.s = "utf-8"}},
+ {"defaultfont", "default-font-family", TYPE_CHAR, webkit, {.s = "sans-serif"}},
+ {"fontsize", "default-font-size", TYPE_INTEGER, webkit, {.i = SETTING_DEFAULT_FONT_SIZE}},
+ {"monofontsize", "default-monospace-font-size", TYPE_INTEGER, webkit, {.i = SETTING_DEFAULT_FONT_SIZE}},
+ {"caret", "enable-caret-browsing", TYPE_BOOLEAN, webkit, {.i = 0}},
+ {"webinspector", "enable-developer-extras", TYPE_BOOLEAN, webkit, {.i = 0}},
+ {"offlinecache", "enable-offline-web-application-cache", TYPE_BOOLEAN, webkit, {.i = 1}},
+ {"pagecache", "enable-page-cache", TYPE_BOOLEAN, webkit, {.i = 1}},
+ {"plugins", "enable-plugins", TYPE_BOOLEAN, webkit, {.i = 1}},
+ {"scripts", "enable-scripts", TYPE_BOOLEAN, webkit, {.i = 1}},
+ {"xssauditor", "enable-xss-auditor", TYPE_BOOLEAN, webkit, {.i = 1}},
+ {"minimumfontsize", "minimum-font-size", TYPE_INTEGER, webkit, {.i = 5}},
+ {"monofont", "monospace-font-family", TYPE_CHAR, webkit, {.s = "monospace"}},
+ {NULL, "print-backgrounds", TYPE_BOOLEAN, webkit, {.i = 1}},
+ {"sansfont", "sans-serif-font-family", TYPE_CHAR, webkit, {.s = "sans-serif"}},
+ {"seriffont", "serif-font-family", TYPE_CHAR, webkit, {.s = "serif"}},
+ {"useragent", "user-agent", TYPE_CHAR, webkit, {.s = PROJECT "/" VERSION " (X11; Linux i686) AppleWebKit/535.22+ Compatible (Safari)"}},
+ {"spacial-navigation", "enable-spatial-navigation", TYPE_BOOLEAN, webkit, {.i = 0}},
#if WEBKIT_CHECK_VERSION(2, 0, 0)
- {"insecure-content-show", "enable-display-of-insecure-content", TYPE_BOOLEAN, webkit, {0}},
- {"insecure-content-run", "enable-running-of-insecure-content", TYPE_BOOLEAN, webkit, {0}},
+ {"insecure-content-show", "enable-display-of-insecure-content", TYPE_BOOLEAN, webkit, {.i = 0}},
+ {"insecure-content-run", "enable-running-of-insecure-content", TYPE_BOOLEAN, webkit, {.i = 0}},
#endif
/* internal variables */
- {NULL, "stylesheet", TYPE_BOOLEAN, user_style, {0}},
+ {NULL, "stylesheet", TYPE_BOOLEAN, user_style, {.i = 1}},
- {NULL, "proxy", TYPE_BOOLEAN, proxy, {0}},
+ {NULL, "proxy", TYPE_BOOLEAN, proxy, {.i = 1}},
#ifdef FEATURE_COOKIE
- {NULL, "cookie-accept", TYPE_CHAR, cookie_accept, {0}},
- {NULL, "cookie-timeout", TYPE_INTEGER, cookie_timeout, {0}},
+ {NULL, "cookie-accept", TYPE_CHAR, cookie_accept, {.s = "always"}},
+ {NULL, "cookie-timeout", TYPE_INTEGER, cookie_timeout, {.i = 4800}},
#endif
- {NULL, "strict-ssl", TYPE_BOOLEAN, strict_ssl, {0}},
- {NULL, "strict-focus", TYPE_BOOLEAN, strict_focus, {0}},
-
- {NULL, "scrollstep", TYPE_INTEGER, scrollstep, {0}},
- {NULL, "status-color-bg", TYPE_COLOR, status_color_bg, {0}},
- {NULL, "status-color-fg", TYPE_COLOR, status_color_fg, {0}},
- {NULL, "status-font", TYPE_FONT, status_font, {0}},
- {NULL, "status-ssl-color-bg", TYPE_COLOR, status_color_bg, {0}},
- {NULL, "status-ssl-color-fg", TYPE_COLOR, status_color_fg, {0}},
- {NULL, "status-ssl-font", TYPE_FONT, status_font, {0}},
- {NULL, "status-sslinvalid-color-bg", TYPE_COLOR, status_color_bg, {0}},
- {NULL, "status-sslinvalid-color-fg", TYPE_COLOR, status_color_fg, {0}},
- {NULL, "status-sslinvalid-font", TYPE_FONT, status_font, {0}},
- {NULL, "timeoutlen", TYPE_INTEGER, timeoutlen, {0}},
- {NULL, "input-bg-normal", TYPE_COLOR, input_style, {0}},
- {NULL, "input-bg-error", TYPE_COLOR, input_style, {0}},
- {NULL, "input-fg-normal", TYPE_COLOR, input_style, {0}},
- {NULL, "input-fg-error", TYPE_COLOR, input_style, {0}},
- {NULL, "input-font-normal", TYPE_FONT, input_style, {0}},
- {NULL, "input-font-error", TYPE_FONT, input_style, {0}},
- {NULL, "completion-font", TYPE_FONT, completion_style, {0}},
- {NULL, "completion-fg-normal", TYPE_COLOR, completion_style, {0}},
- {NULL, "completion-fg-active", TYPE_COLOR, completion_style, {0}},
- {NULL, "completion-bg-normal", TYPE_COLOR, completion_style, {0}},
- {NULL, "completion-bg-active", TYPE_COLOR, completion_style, {0}},
- {NULL, "ca-bundle", TYPE_CHAR, ca_bundle, {0}},
- {NULL, "home-page", TYPE_CHAR, home_page, {0}},
- {NULL, "download-path", TYPE_CHAR, download_path, {0}},
- {NULL, "history-max-items", TYPE_INTEGER, history_max_items, {0}},
- {NULL, "editor-command", TYPE_CHAR, editor_command, {0}},
- {NULL, "header", TYPE_CHAR, headers, {0}},
- {NULL, "nextpattern", TYPE_CHAR, nextpattern, {0}},
- {NULL, "previouspattern", TYPE_CHAR, nextpattern, {0}},
+ {NULL, "strict-ssl", TYPE_BOOLEAN, strict_ssl, {.i = 1}},
+ {NULL, "strict-focus", TYPE_BOOLEAN, strict_focus, {.i = 0}},
+
+ {NULL, "scrollstep", TYPE_INTEGER, scrollstep, {.i = 40}},
+ {NULL, "status-color-bg", TYPE_COLOR, status_color_bg, {.s = "#000"}},
+ {NULL, "status-color-fg", TYPE_COLOR, status_color_fg, {.s = "#fff"}},
+ {NULL, "status-font", TYPE_FONT, status_font, {.s = SETTING_GUI_FONT_EMPH}},
+ {NULL, "status-ssl-color-bg", TYPE_COLOR, status_color_bg, {.s = "#95e454"}},
+ {NULL, "status-ssl-color-fg", TYPE_COLOR, status_color_fg, {.s = "#000"}},
+ {NULL, "status-ssl-font", TYPE_FONT, status_font, {.s = SETTING_GUI_FONT_EMPH}},
+ {NULL, "status-sslinvalid-color-bg", TYPE_COLOR, status_color_bg, {.s = "#f77"}},
+ {NULL, "status-sslinvalid-color-fg", TYPE_COLOR, status_color_fg, {.s = "#000"}},
+ {NULL, "status-sslinvalid-font", TYPE_FONT, status_font, {.s = SETTING_GUI_FONT_EMPH}},
+ {NULL, "timeoutlen", TYPE_INTEGER, timeoutlen, {.i = 1000}},
+ {NULL, "input-bg-normal", TYPE_COLOR, input_style, {.s = "#fff"}},
+ {NULL, "input-bg-error", TYPE_COLOR, input_style, {.s = "#f77"}},
+ {NULL, "input-fg-normal", TYPE_COLOR, input_style, {.s = "#000"}},
+ {NULL, "input-fg-error", TYPE_COLOR, input_style, {.s = "#000"}},
+ {NULL, "input-font-normal", TYPE_FONT, input_style, {.s = SETTING_GUI_FONT_NORMAL}},
+ {NULL, "input-font-error", TYPE_FONT, input_style, {.s = SETTING_GUI_FONT_EMPH}},
+ {NULL, "completion-font", TYPE_FONT, completion_style, {.s = SETTING_GUI_FONT_NORMAL}},
+ {NULL, "completion-fg-normal", TYPE_COLOR, completion_style, {.s = "#f6f3e8"}},
+ {NULL, "completion-fg-active", TYPE_COLOR, completion_style, {.s = "#fff"}},
+ {NULL, "completion-bg-normal", TYPE_COLOR, completion_style, {.s = "#656565"}},
+ {NULL, "completion-bg-active", TYPE_COLOR, completion_style, {.s = "#777"}},
+ {NULL, "ca-bundle", TYPE_CHAR, ca_bundle, {.s = "/etc/ssl/certs/ca-certificates.crt"}},
+ {NULL, "home-page", TYPE_CHAR, home_page, {.s = SETTING_HOME_PAGE}},
+ {NULL, "download-path", TYPE_CHAR, download_path, {.s = ""}},
+ {NULL, "history-max-items", TYPE_INTEGER, history_max_items, {.i = 2000}},
+ {NULL, "editor-command", TYPE_CHAR, editor_command, {.s = "x-terminal-emulator -e vi %s"}},
+ {NULL, "header", TYPE_CHAR, headers, {.s = ""}},
+ {NULL, "nextpattern", TYPE_CHAR, nextpattern, {.s = "/\\bnext\\b/i,/^(>\\|>>\\|»)$/,/^(>\\|>>\\|»)/,/(>\\|>>\\|»)$/,/\\bmore\\b/i"}},
+ {NULL, "previouspattern", TYPE_CHAR, nextpattern, {.s = "/\\bprev\\|previous\\b/i,/^(<\\|<<\\|«)$/,/^(<\\|<<\\|«)/,/(<\\|<<\\|«)$/"}},
};
void setting_init(void)
s = &default_settings[i];
/* use alias as key if available */
g_hash_table_insert(settings, (gpointer)s->alias != NULL ? s->alias : s->name, s);
+ s->func(s, false);
}
}