|
|
@@ -2,17 +2,15 @@ |
|
|
|
// Author: Collin J. Doering <rekahsoft@gmail.com> |
|
|
|
// Date: Mar 27, 2011 |
|
|
|
|
|
|
|
// REKAHSOFT-MINI |
|
|
|
// REKAHSOFT |
|
|
|
|
|
|
|
// the default page for new buffers. |
|
|
|
homepage = "http://www.duckduckgo.com"; |
|
|
|
|
|
|
|
// load urls from the command line in new buffers instead |
|
|
|
// of new windows. |
|
|
|
// load urls from the command line in new buffers instead of new windows. |
|
|
|
url_remoting_fn = load_url_in_new_buffer; |
|
|
|
|
|
|
|
// load download buffers in the background in the current |
|
|
|
// window, instead of in new windows. |
|
|
|
// load download buffers in the background in the current window, instead of in new windows. |
|
|
|
download_buffer_automatic_open_target = OPEN_NEW_BUFFER_BACKGROUND; |
|
|
|
|
|
|
|
// save a keystroke when selecting a dom node by number. |
|
|
@@ -27,14 +25,14 @@ hints_display_url_panel = true; |
|
|
|
cwd = get_home_directory(); |
|
|
|
//cwd.append("downloads"); |
|
|
|
|
|
|
|
// set how conkeror will handle certian mime types |
|
|
|
content_handlers.set("application/x-bittorrent", content_handler_open_url); |
|
|
|
|
|
|
|
// external programs for handling various mime types. |
|
|
|
// set how conkeror will handle mime types |
|
|
|
external_content_handlers = { |
|
|
|
"*": "emacsclient", |
|
|
|
text: { "*": "emacsclient" }, |
|
|
|
"*": "emacsclient -c", |
|
|
|
text: { "*": "emacsclient -c" }, |
|
|
|
image: { "*": "feh --scale-down" }, |
|
|
|
video: { "*": "mplayer" }, |
|
|
|
audio: { "*": "mplayer" }, |
|
|
|
// "x-scheme-handler/magnet": "transmission-remote -a", |
|
|
|
application: { |
|
|
|
pdf: "zathura", |
|
|
|
postscript: "zathura", |
|
|
@@ -43,20 +41,29 @@ external_content_handlers = { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
external_content_handlers.set("application/pdf", "zathura"); |
|
|
|
external_content_handlers.set("video/*", "urxvtc -e mplayer"); |
|
|
|
external_content_handlers.set("application/x-bittorrent", "transmission-remote -a"); |
|
|
|
|
|
|
|
set_protocol_handler("magnet", find_file_in_path("transmission-remote -a")); |
|
|
|
// TODO: magnet links do not work |
|
|
|
//set_protocol_handler("magnet", find_file_in_path("transmission-remote -a")); |
|
|
|
|
|
|
|
// use emacsclient as external editor. |
|
|
|
editor_shell_command = "emacsclient"; |
|
|
|
editor_shell_command = "emacsclient -c"; |
|
|
|
|
|
|
|
// view source in your editor. |
|
|
|
// view source in external editor. |
|
|
|
view_source_use_external_editor = true; |
|
|
|
|
|
|
|
// let xkcd-mode put the funny alt text into the page. |
|
|
|
xkcd_add_title = true; |
|
|
|
// Enable and configure some page modes |
|
|
|
// See: http://conkeror.org/PageModes |
|
|
|
require("page-modes/xkcd.js"); |
|
|
|
page_mode_activate(xkcd_mode); |
|
|
|
xkcd_add_title = true; // insert alt text into the page |
|
|
|
|
|
|
|
require("page-modes/reddit.js"); |
|
|
|
page_mode_activate(reddit_mode); |
|
|
|
|
|
|
|
require("page-modes/duckduckgo.js"); |
|
|
|
page_mode_activate(duckduckgo_mode); |
|
|
|
|
|
|
|
require("page-modes/youtube.js"); |
|
|
|
page_mode_activate(youtube_mode); |
|
|
|
|
|
|
|
// use session module |
|
|
|
require("session.js"); |
|
|
@@ -64,6 +71,7 @@ session_auto_save_auto_load = true; |
|
|
|
|
|
|
|
// Put history completion along side webjumps |
|
|
|
url_completion_use_history = true; |
|
|
|
url_completion_use_bookmarks = true; |
|
|
|
|
|
|
|
// Setup some handy web jumps |
|
|
|
define_webjump("wolframalpha", "http://www.wolframalpha.com/input/?i=%s"); |
|
|
@@ -122,9 +130,9 @@ define_webjump("emacswiki", |
|
|
|
define_webjump("savannah", "https://savannah.gnu.org/search/?words=%s&type_of_search=soft"); |
|
|
|
|
|
|
|
define_webjump("youtube", "http://www.youtube.com/results?search_query=%s&search=Search"); |
|
|
|
// END SECTION |
|
|
|
|
|
|
|
// Do a google search if a webjump is not recognized |
|
|
|
|
|
|
|
// Do a duckduckgo search if a webjump is not recognized |
|
|
|
read_url_handler_list = [read_url_make_default_webjump_handler("duckduckgo")]; |
|
|
|
|
|
|
|
// recognize urls a little diffently (allow one worded default webjumps) |
|
|
@@ -134,8 +142,23 @@ function possibly_valid_url (str) { |
|
|
|
!(/^\s*$/.test(str)); |
|
|
|
} |
|
|
|
|
|
|
|
// turn off mode line |
|
|
|
mode_line_mode(false); |
|
|
|
// setup tabs (see: http://conkeror.org/Tabs) |
|
|
|
require("new-tabs.js"); |
|
|
|
|
|
|
|
// Register stylesheet used to theme new-tabs |
|
|
|
register_user_stylesheet("file:///home/collin/.conkeror.d/conkeror.css"); |
|
|
|
|
|
|
|
// Setup favicon support (in the mode-line) |
|
|
|
require("favicon.js"); |
|
|
|
add_hook("mode_line_hook", mode_line_adder(buffer_icon_widget), true); |
|
|
|
read_buffer_show_icons = true; |
|
|
|
|
|
|
|
// add loading-count and buffer-count widgets to the mode-line |
|
|
|
add_hook("mode_line_hook", mode_line_adder(loading_count_widget), true); |
|
|
|
add_hook("mode_line_hook", mode_line_adder(buffer_count_widget), true); |
|
|
|
|
|
|
|
// remove the clock from the mode-line |
|
|
|
remove_hook("mode_line_hook", mode_line_adder(clock_widget)); |
|
|
|
|
|
|
|
// force scrolling bars so that incremental search (isearch) works and mousewheel scrolling |
|
|
|
function enable_scrollbars (buffer) { |
|
|
@@ -144,7 +167,7 @@ function enable_scrollbars (buffer) { |
|
|
|
add_hook("create_buffer_late_hook", enable_scrollbars); |
|
|
|
|
|
|
|
// Enable spellchecking of text boxes |
|
|
|
session_pref("layout.spellcheckDefault", 1); |
|
|
|
session_pref("layout.spellcheckDefault", 2); |
|
|
|
|
|
|
|
// Turn on password management in XUL runner |
|
|
|
session_pref("signon.rememberSignons", true); |
|
|
|