Skip to content

Instantly share code, notes, and snippets.

@wdkrnls
Created November 9, 2014 01:09
Show Gist options
  • Save wdkrnls/38ef55530f7ee9eadff6 to your computer and use it in GitHub Desktop.
Save wdkrnls/38ef55530f7ee9eadff6 to your computer and use it in GitHub Desktop.
load_paths.unshift("chrome://conkeror-contrib/content/"); // require("mode-line-buttons.js"); // mode_line_add_buttons(standard_mode_line_buttons, true); define_webjump("codesearch", "http://www.google.com/codesearch?q=%s"); define_webjump("cpan", "http://search.cpan.org/search?query=%s&mode=all"); define_webjump("imdb", "http://imdb.com/find?q=%s
require("clicks-in-new-buffer.js");
require("page-modes/google-search-results.js");
require("page-modes/wikipedia.js");
require("session.js");
require("block-content-focus-change.js");
require("favicon");
require("content-policy.js");
require("index-webjump.js");
xkcd_add_title = true;
read_buffer_show_icons=true;
hints_display_url_panel = true;
view_source_use_external_editor = true;
define_key(content_buffer_normal_keymap, "C-x x", "switch-to-buffer");
var minibuffer_autohide_with_mode_line = true;
function hide_minibuffer (window) {
window.minibuffer.element.collapsed = true;
if (minibuffer_autohide_with_mode_line && window.mode_line)
window.mode_line.container.collapsed = true;
}
function show_minibuffer (window) {
window.minibuffer.element.collapsed = false;
if (minibuffer_autohide_with_mode_line && window.mode_line)
window.mode_line.container.collapsed = false;
}
mode_line_mode(false);
load_paths.unshift("chrome://conkeror-contrib/content/");
// require("mode-line-buttons.js");
// mode_line_add_buttons(standard_mode_line_buttons, true);
define_webjump("codesearch", "http://www.google.com/codesearch?q=%s");
define_webjump("cpan", "http://search.cpan.org/search?query=%s&mode=all");
define_webjump("imdb", "http://imdb.com/find?q=%s");
define_webjump("trans", "http://translate.google.com/translate_t#auto|en|%s");
define_webjump("twitter", "http://twitter.com/%s");
define_webjump("urban", "http://www.urbandictionary.com/define.php?term=%s");
define_webjump("wa", "http://www.wolframalpha.com/input/?i=%s");
define_webjump("yt", "http://www.youtube.com/results?search_query=%s&search=Search");
wikipedia_enable_didyoumean = true;
define_wikipedia_webjumps("en");
define_key(content_buffer_normal_keymap, "M-left", "back");
define_key(content_buffer_normal_keymap, "M-right", "forward");
define_webjump("conk", "http://conkeror.org");
define_webjump("efu", "http://emacs-fu.blogspot.com");
define_webjump("lkml", "http://lkml.org");
define_webjump("ew", "http://emacswiki.org");
define_webjump("tamu", "howdy.tamu.edu");
define_webjump("so", "http://stackoverflow.com/search?q=%s");
define_webjump("yts", "http://www.youtube.com/results?search_query=%s&aq=f");
define_webjump("imbd", "http://www.imdb.com/find?s=all&q=%s");
define_key(default_global_keymap, "C-c r", "reload-config");
interactive("reload-config", "reload conkerorrc",
function(I) {
load_rc();
I.window.minibuffer.message("config reloaded");
}
);
// org-protocol stuff
function org_capture (url, title, selection, window) {
var cmd_str =
'emacsclient \"org-protocol:/capture:/w/'+url+'/'+title+'/'+selection+'\"';
if (window != null) {
window.minibuffer.message('Issuing ' + cmd_str);
}
shell_command_blind(cmd_str);
}
interactive("org-capture", "Clip url, title, and selection to capture via org-protocol",
function (I) {
org_capture(
encodeURIComponent(I.buffer.display_uri_string),
encodeURIComponent(I.buffer.document.title),
encodeURIComponent(I.buffer.top_frame.getSelection()),
I.window);
}
);
// capture with C-c c
define_key(content_buffer_normal_keymap, "C-c c", "org-capture");
load_paths.unshift("chrome://conkeror-contrib/content/");
homepage = "http://www.google.com";
minibuffer_auto_complete_default = true;
url_completion_use_history = true;
url_completion_use_bookmarks = true;
function disable_scrollbars (buffer) {
buffer.top_frame.scrollbars.visible = false;
}
add_hook("create_buffer_late_hook", disable_scrollbars);
var old_isearch_start = (old_isearch_start || isearch_start);
isearch_start = function (window, direction) {
window.buffers.current.browser.contentWindow.scrollbars.visible = true;
old_isearch_start(window, direction);
};
var old_isearch_session_destroy = (old_isearch_session_destroy ||
isearch_session.prototype.destroy);
isearch_session.prototype.destroy = function () {
this.minibuffer.window.buffers.current.browser.contentWindow.scrollbars.visible = false;
old_isearch_session_destroy.call(this);
};
url_remoting_fn = load_url_in_new_buffer;
browser_default_open_target=OPEN_NEW_BUFFER;
download_buffer_automatic_open_target = OPEN_NEW_BUFFER_BACKGROUND;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment