dotfiles/conkeror/.conkerorrc/init.org

61 lines
1.8 KiB
Org Mode
Raw Normal View History

2016-09-24 17:09:16 +02:00
Add commands to search through and open links from history.
#+BEGIN_SRC js
define_browser_object_class(
"history-url", null,
function (I, prompt) {
check_buffer(I.buffer, content_buffer);
var result = yield I.buffer.window.minibuffer.read_url(
$prompt = prompt, $use_webjumps = false, $use_history = true,
$use_bookmarks = false, $sort_order = 'date_descending'
);
yield co_return(result);
}
);
interactive("find-url-from-history",
"Find a page from history in the current buffer",
"find-url",
$browser_object = browser_object_history_url);
interactive("find-url-from-history-new-buffer",
"Find a page from history in a new buffer",
"find-url-new-buffer",
$browser_object = browser_object_history_url);
define_key(content_buffer_normal_keymap, "H", "find-url-from-history");
define_key(content_buffer_normal_keymap, "h", "find-url-from-history-new-buffer");
#+END_SRC
Set the hints digits to the keys on my keyboard's home row, for easy
access.
#+BEGIN_SRC js
hint_digits = "arstdhneio";
#+END_SRC
2016-09-24 17:18:10 +02:00
Add the ~search-engines/~ directory to the opensearch load path.
#+BEGIN_SRC js
function add_to_opensearch_load_path(new_path) {
if (new_path.startsWith('/')) {
opensearch_load_paths.push(new_path);
} else {
let path = get_home_directory();
path.append('.conkerorrc');
path.append(new_path);
opensearch_load_paths.push(path);
}
}
add_to_opensearch_load_path('search-engines');
#+END_SRC
Add a Mozilla Developer Network webjump. This uses their OpenSearch
description.
#+BEGIN_SRC js
define_opensearch_webjump("mdn", "mozilla-developer-network.xml");
#+END_SRC