aboutsummaryrefslogtreecommitdiffstats
path: root/conkeror/.conkerorrc/init.org
diff options
context:
space:
mode:
Diffstat (limited to 'conkeror/.conkerorrc/init.org')
-rw-r--r--conkeror/.conkerorrc/init.org48
1 files changed, 48 insertions, 0 deletions
diff --git a/conkeror/.conkerorrc/init.org b/conkeror/.conkerorrc/init.org
index ab07b92..dc2b81c 100644
--- a/conkeror/.conkerorrc/init.org
+++ b/conkeror/.conkerorrc/init.org
@@ -58,3 +58,51 @@ description.
#+BEGIN_SRC js
define_opensearch_webjump("mdn", "mozilla-developer-network.xml");
#+END_SRC
+
+
+Add the ~site-js/~ directory to the load path.
+
+#+BEGIN_SRC js
+ function add_to_load_path(new_path) {
+ if (new_path.startsWith('/')) {
+ load_paths.push("file://" + new_path);
+ } else {
+ let path = get_home_directory();
+ path.append('.conkerorrc');
+ path.append(new_path);
+
+ load_paths.push(path);
+ }
+ }
+
+ add_to_load_path('site-js');
+#+END_SRC
+
+* Scuttle
+
+ Load the scuttle module.
+
+ #+BEGIN_SRC js
+ require('scuttle');
+ #+END_SRC
+
+ Set the URL of my scuttle installation.
+
+ #+BEGIN_SRC js
+ scuttle_url = 'https://ryuslash.org/scuttle/';
+ #+END_SRC
+
+ Add the bookmarked widget to the mode line. This requires my
+ customized version of Scuttle to be able to check if a buffer has
+ been bookmarked or not.
+
+ #+BEGIN_SRC js
+ add_hook('mode_line_hook', mode_line_adder(scuttle_bookmarked_widget));
+ #+END_SRC
+
+ Set-up keybindings for posting to scuttle.
+
+ #+BEGIN_SRC js
+ define_key(default_global_keymap, 'p', 'scuttle-post');
+ define_key(default_global_keymap, 'P', 'scuttle-post-link');
+ #+END_SRC