summaryrefslogtreecommitdiffstats
path: root/.conkerorrc/init.js
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-12-05 00:44:09 +0100
committerGravatar Tom Willemsen2012-12-05 00:44:09 +0100
commit6278e2e634b05027d31220afd328a9f7fe77c6f1 (patch)
tree3dbec6a3880ca980694def0d737a477b68254691 /.conkerorrc/init.js
parentfa717d86a07d009ab324a40cd8dbf539e61a9da3 (diff)
parent15adc911da3f5b527c74b6bb67d677898d6a173e (diff)
downloaddotfiles-6278e2e634b05027d31220afd328a9f7fe77c6f1.tar.gz
dotfiles-6278e2e634b05027d31220afd328a9f7fe77c6f1.zip
Merge remote-tracking branch 'origin/master' into phoenix
Conflicts: .emacs.d/site-lisp/oni.el
Diffstat (limited to '.conkerorrc/init.js')
-rw-r--r--.conkerorrc/init.js55
1 files changed, 5 insertions, 50 deletions
diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js
index f4818d8..939d3a6 100644
--- a/.conkerorrc/init.js
+++ b/.conkerorrc/init.js
@@ -1,10 +1,11 @@
require("content-policy.js");
require("favicon");
-var linkwave_program = "/home/slash/var/src/linkwave/src/linkwave";
-
+load_paths.push("file:///home/slash/var/src/linkwave/conkeror/");
theme_load_paths.push("/home/slash/.conkerorrc/themes/");
+require("linkwave");
+
define_browser_object_class(
"history-url", null,
function (I, prompt) {
@@ -46,53 +47,6 @@ function oni_escape(str) {
return str.replace(/(["$`])/g, '\\$1');
}
-function oni_linkwave_add(I) {
- check_buffer(I.buffer, content_buffer);
- let url =
- load_spec_uri_string(load_spec(I.buffer.top_frame));
- let title = yield I.minibuffer.read(
- $prompt = "name (required): ",
- $initial_value = I.buffer.title);
- // let tags = escape(yield I.minibuffer.read(
- // $prompt = "tags (space delimited): "));
- let description = yield I.minibuffer.read(
- $prompt = "extended description: ");
- let command = linkwave_program + ' "' + url + '" "' + title + '" "'
- + description + '"';
- let result = yield shell_command(command);
-
- if (!result)
- I.window.minibuffer.message('Added to linkwave');
- else
- I.window.minibuffer.message('Couldn\'t add to linkwave');
-}
-interactive("linkwave-add", "Bookmark the page in linkwave",
- oni_linkwave_add);
-
-function oni_linkwave_add_link(I) {
- bo = yield read_browser_object(I);
- let url = load_spec_uri_string(
- load_spec(encodeURIComponent(bo)));
- check_buffer(I.buffer, content_buffer);
- let title = yield I.minibuffer.read(
- $prompt = "name (required): ",
- $initial_value = bo.textContent);
- // let tags = escape(yield I.minibuffer.read(
- // $prompt = "tags (space delimited): "));
- let description = yield I.minibuffer.read(
- $prompt = "extended description: ");
- let command = linkwave_program + ' "' + url + '" "' + title + '" "'
- + description + '"';
- let result = yield shell_command(command);
-
- if (!result)
- I.window.minibuffer.message('Added to linkwave');
- else
- I.window.minibuffer.message('Couldn\'t add to linkwave');
-}
-interactive("linkwave-add-link", "Bookmark the a link in linkwave",
- oni_linkwave_add_link);
-
function oni_org_store_link(I) {
var cmd_str = 'emacsclient \"org-protocol://store-link://'
+ encodeURIComponent(I.buffer.display_uri_string) + '/'
@@ -155,7 +109,7 @@ define_webjump("arch/packages",
"https://www.archlinux.org/packages/?sort=&q=%s&limit=50",
$alternative="https://packages.archlinux.org");
-content_policy_bytype_table.object = oni_block_flash;
+// content_policy_bytype_table.object = oni_block_flash;
cwd = make_file("/home/slash/downloads/");
hint_digits = "arstdhneio";
read_buffer_show_icons = true;
@@ -166,6 +120,7 @@ define_key(content_buffer_normal_keymap, "h",
"find-url-from-history-new-buffer");
define_key(content_buffer_normal_keymap, "H",
"find-url-from-history");
+define_key(content_buffer_normal_keymap, "C-x C-b", "switch-to-buffer");
define_key(default_base_keymap, "C-x f", "follow-new-buffer");
add_hook("before_quit_hook", oni_before_quit_func);