User Variables
Conkeror has many behaviors that can be customized by setting certain ordinary variables in your rc script. We will try to describe them all here.
- active_hint_background_color
- String color for the active hint. Default is "#88FF00".
- active_img_hint_background_color
- String color for the active image hint. Default is "#88FF00".
- allow_browser_window_close
If this is set to true, if a content buffer page calls window.close() from JavaScript and is not prevented by the normal Mozilla mechanism that restricts pages from closing a window that was not opened by a script, the buffer will be killed, deleting the window as well if it is the only buffer. Default is true.
- auto_mode_list
- A list of mappings from URI regular expressions to page modes. This should probably only be changed to add new page modes. See modules/page-modes/ for examples.
- browser_automatic_form_focus_window_duration
Time window (in milliseconds) during which a form element is allowed to gain focus following a mouse click or key press, if browser_prevent_automatic_form_focus_mode is enabled. Default is 20.
- browser_default_open_target
Specifies how new window requests by content pages (e.g. by window.open from JavaScript or by using the target attribute of anchor and form elements) will be handled. This will generally be OPEN_NEW_BUFFER, OPEN_NEW_BUFFER_BACKGROUND, or OPEN_NEW_WINDOW. Default is OPEN_NEW_BUFFER.
- browser_form_field_xpath_expression
XPath expression matching elements to be selected by browser-focus-next-form-field and browser-focus-previous-form-field. Default is
"//input[" + ( // "translate(@type,'RADIO','radio')!='radio' and " + // "translate(@type,'CHECKBOX','checkbox')!='checkbox' and " + "translate(@type,'HIDEN','hiden')!='hidden'" // "translate(@type,'SUBMIT','submit')!='submit' and " + // "translate(@type,'REST','rest')!='reset'" ) + "] | " + "//xhtml:input[" + ( // "translate(@type,'RADIO','radio')!='radio' and " + // "translate(@type,'CHECKBOX','checkbox')!='checkbox' and " + "translate(@type,'HIDEN','hiden')!='hidden'" // "translate(@type,'SUBMIT','submit')!='submit' and " + // "translate(@type,'REST','rest')!='reset'" ) + "] |" + "//select | //xhtml:select | " + "//textarea | //xhtml:textarea | " + "//textbox | //xul:textbox"
- browser_relationship_patterns
Patterns used by follow-next and follow-previous. By default, we have
browser_relationship_patterns[RELATIONSHIP_NEXT] = [/^next$/i, new RegExp("^>$","i"), new RegExp("^(>>|»)$","i"), new RegExp("^(>|»)","i"), new RegExp("(>|»)$","i"), new RegExp("\\bnext","i") ]; browser_relationship_patterns[RELATIONSHIP_PREVIOUS] = [/^(prev|previous)$/i, new RegExp("^<$","i"), new RegExp("^(<<|«)$","i"), new RegExp("^(<|«)","i"), new RegExp("(<|«)$","i"), new RegExp("\\bprev|previous\\b","i") ];
- can_kill_last_buffer
- Boolean controlling whether the kill-buffer command can kill the last buffer in a window.
- daemon_quit_exits
Boolean controlling whether daemon-mode abides the quit command. Default is true.
- default_browser_object_classes
- Specifies the default object class for each operation. This variable should be an object literal with string-valued properties that specify one of the defined browser object classes. If a property named after the operation is not present, the "default" property is consulted instead. Default is
{ follow: "links", follow_top: "frames", focus: "frames", save: "links", copy: "links", view_source: "frames", bookmark: "frames", save_page: "frames", save_page_complete: "top", save_page_as_text: "frames", default: "links" }
- Specifies the default object class for each operation. This variable should be an object literal with string-valued properties that specify one of the defined browser object classes. If a property named after the operation is not present, the "default" property is consulted instead. Default is
- default_directory
Default location for downloads. Do not set this variable directly. Use the function set_default_directory. If you call set_default_directory with no argument, Conkeror will attempt to use your home directory, which is the default value of this variable.
- default_minibuffer_auto_complete_delay
- Delay (in milliseconds) after the most recent key stroke before auto-completing. Default is 150.
- download_temporary_file_open_buffer_delay
Delay (in milliseconds) before a download buffer is opened for temporary downloads. This variable takes effect only if open_download_buffer_automatically is in download_added_hook, as it is by default. Default is 500.
- download_buffer_automatic_open_target
- Target for opening a download buffer for a new download. An open/follow target constant. Default is OPEN_NEW_WINDOW. Other possible values are OPEN_CURRENT_BUFFER, OPEN_NEW_BUFFER, OPEN_NEW_BUFFER_BACKGROUND.
- download_buffer_min_update_interval
- Minimum interval (in milliseconds) between updates in download progress buffers. Lowering this interval will increase the promptness of the progress display at the cost of using additional processor time. Default is 2000 (ms).
- editor_shell_command
Default is the value of the environment variable EDITOR. If it has no value, default is "emacs". Non-null run_external_editor_function overrides this setting.
- favicon_image_max_size
- Maximum (pixel) width and height of an image document that is considered for use as a favicon. Default is 1024.
- hint_background_color
- String color name for hints. Default is "yellow".
- hints_ambiguous_auto_exit_delay
- Delay (in milliseconds) after the most recent key stroke before the first of an ambiguous match is automatically selected. If this is set to 0, automatic selection in ambiguous matches is disabled. Default is 0.
- hints_auto_exit_delay
- Delay (in milliseconds) after the most recent key stroke before a sole matching element is automatically selected. If this is set to 0, automatic selection is disabled. Default is 500.
- hints_xpath_expressions
- XPath expressions for each object class. Default is
{ images: {def: "//img | //xhtml:img"}, frames: {def: "//iframe | //frame | //xhtml:iframe | //xhtml:frame"}, links: {def: "//*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @class='s'] | " + "//input[not(@type='hidden')] | //a | //area | //iframe | //textarea | //button | //select | " + "//xhtml:*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @class='s'] | " + "//xhtml:input[not(@type='hidden')] | //xhtml:a | //xhtml:area | //xhtml:iframe | //xhtml:textarea | " + "//xhtml:button | //xhtml:select"}, mathml: {def: "//m:math"} }
- XPath expressions for each object class. Default is
- img_hint_background_color
- String color for image hints. Default is "yellow".
- isearch_keep_selection
- Default is false. When true, the selection will always be left visible after completing an isearch.
- keyboard_key_sequence_help_timeout
- Delay (in milliseconds) before the current key sequence prefix is displayed in the minibuffer. Default is 0.
- kill_whole_line
Default is false. When true, the command cut-to-end-of-line will also cut the newline character at the end, when point is at the beginning of a line.
- media_scrape_default_regexp
- Regular expression used by the default media scraper to match URIs for embedded media in the page source code. Defaults to
new RegExp("(?:http://[a-zA-Z0-9.\\-]+/)?(?!://)[^=&<>\"'|\\s]+\\.(?:aiff|au|avi|flv|mid|mov|mp3|mpg|mpeg|ogg|ra|rm|spl|wav|wma|wmv)(?!\\w)", "ig")
- Regular expression used by the default media scraper to match URIs for embedded media in the page source code. Defaults to
- media_scrapers
Function (or coroutine) to use to scrape the current buffer for embedded media. Default is [media_scrape_default] (see media.js).
- mime_type_external_handlers
An array of two element arrays, associating mime type patterns with handler programs. The patterns are regular expressions. When conkeror looks for an external handler, the program corresponding to the first matching pattern will be used. The default value of mime_type_external_handlers is:
[[/^text\/.*$/, getenv("EDITOR")], [/^image\/.*$/, "feh"], [/^video\/.*$/, "mplayer"], [/^audio\/.*$/, "mplayer"], [/^application\/pdf$/, "evince"], [/^application\/postscript$/, "evince"], [/^application\/x-dvi$/, "evince"], [/^.*$/, getenv("EDITOR")]]An API exists for manipulating this array; see MimeTypeHandlers for details.
- minibuffer_auto_complete_default
Boolean specifying whether to auto-complete by default. The user variable minibuffer_auto_complete_preferences overrides this. Default is false.
- minibuffer_auto_complete_preferences
- minibuffer_history_max_items
- Maximum number of minibuffer history entries stored.Older history entries are truncated after this limit is reached. Default is 100.
- minibuffer_input_mode_show_message_timeout
- Time duration (in milliseconds) to flash minibuffer messages while in minibuffer input mode. Default is 1000.
- run_external_editor_function
Coroutine function called to invoke an external editor. If this variable is set to a function, it is used to invoke an external editor in place of editor_shell_command. It is called with the filename as the first argument, and optionally the boolean keyword argument $temporary specifying whether the file should be deleted after the editor is closed, and optionally the keyword argument $line specifying a line number to display. The create_external_editor_launcher function may be convenient for generating a function suitable for use as the value of this variable. Default is
getenv("VISUAL") || getenv("EDITOR") || "emacs"
- title_format_fn
- url_completion_use_bookmarks
Boolean Default is true. Controls whether bookmarks will be included in the completion list when prompting the user for an url, for example, with the open-url command.
Due to a Mozilla bug, this value is currently mutually exclusive with url_completion_use_history. Refer to http://bugs.conkeror.org/issue10 for details.
- url_completion_use_history
Boolean Default is false. Controls whether urls in the browse history will be included in the completion list when prompting the user for an url, for example, with the open-url command.
Due to a Mozilla bug, this value is currently mutually exclusive with url_completion_use_bookmarks. Refer to http://bugs.conkeror.org/issue10 for details.
- url_completion_use_webjumps
Boolean. Default is true. Controls whether webjumps will be included in the completion list when prompting the user for an url, for example, with the open-url command.
- url_remoting_fn
"Url remoting" is the term for invoking Conkeror with an url (for example, from a command line) when a Conkeror process is already running. The new invocation is said to "remote" the url to the already running process. The variable url_remoting_fn is a function to dispatch on urls remoted into Conkeror. The default value is load_url_in_new_window. Though you can easily write your own url remoting function, obvious ones are already included in conkeror:
load_url_in_new_window
load_url_in_new_buffer
load_url_in_current_buffer
- window_extra_argument_max_delay