summaryrefslogtreecommitdiffstats
path: root/auto-suggestions-for-duckduckgo-in-conkeror.post
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-01-02 03:40:45 +0100
committerGravatar Tom Willemse2015-01-02 03:40:45 +0100
commitbada4ecc1a09a3e4a98ae3449f6e6e7e6de19fef (patch)
tree4d342203736f3d4e739c5650aa58021cf572b381 /auto-suggestions-for-duckduckgo-in-conkeror.post
downloadblog-bada4ecc1a09a3e4a98ae3449f6e6e7e6de19fef.tar.gz
blog-bada4ecc1a09a3e4a98ae3449f6e6e7e6de19fef.zip
Initial commit
Diffstat (limited to 'auto-suggestions-for-duckduckgo-in-conkeror.post')
-rw-r--r--auto-suggestions-for-duckduckgo-in-conkeror.post68
1 files changed, 68 insertions, 0 deletions
diff --git a/auto-suggestions-for-duckduckgo-in-conkeror.post b/auto-suggestions-for-duckduckgo-in-conkeror.post
new file mode 100644
index 0000000..429918c
--- /dev/null
+++ b/auto-suggestions-for-duckduckgo-in-conkeror.post
@@ -0,0 +1,68 @@
+;;;;;
+title: Auto-suggestions for DuckDuckGo in Conkeror
+tags: conkeror, config
+date: 2014-06-03 22:08
+format: md
+;;;;;
+
+Recently [DuckDuckGo](https://duckduckgo.com) gave its UI a big
+overhaul. One of the new parts of the UI is the auto-suggestions,
+which are pretty cool, especially when working with `!bang` syntax. I
+want that in my conkeror webjump! So I started looking...
+
+Turns out that [Conkeror](http://conkeror.org) can work with
+[OpenSearch](https://en.wikipedia.org/wiki/OpenSearch) descriptions to
+create webjumps and actually already has a DuckDuckGo OpenSearch XML
+file. However, DuckDuckGo has a newer version of that file.
+
+So, for starters you should download the proper XML
+[file](https://duckduckgo.com/opensearch.xml). After this, you can
+replace the `/usr/share/conkeror/search-engines/duckduckgo.xml`
+file[<sup>1</sup>](#fn1) with the newly downloaded one and you'd be
+done, ready to use the new auto-suggest
+functionality[<sup>2</sup>](#fn2).
+
+If, however, you don't like overwriting your package's files because
+they may get overwritten again in the future[<sup>3</sup>](#fn3) or
+you really don't think it's proper, you can also create a custom
+webjump that does the same thing, which is what I did.
+
+In case you are following my lead, first we'd need to put the
+downloaded XML file somewhere. I suggest
+`~/.conkerorrc/search-engines` because that way everything in your
+configuration stays nice and contained, although you might want to put
+it in your
+`~/.conkeror.mozdev.org/conkeror/CODE.PROFILE/search-engines`, where
+`CODE` is an eight-character alphanumeric sequence (as far as I can
+tell) and `PROFILE` is the name of the profile you
+use[<sup>4</sup>](#fn4), because that should already be included in
+your `opensearch_load_paths`.
+
+If you put the XML in your `.conkerorrc` you'll need to add that
+directory to your `opensearch_load_paths`, so put something like the
+following in your `init.js`, or whichever filename you use for your
+conkeror init:
+
+ opensearch_load_paths.push(make_file("~/.conkerorrc/search-engines"));
+
+After Conkeror knows where to find your custom search engine
+specifications you can create a webjump for it:
+
+ define_opensearch_webjump("ddg", "ddg.xml");
+
+Once you evaluate these lines or restart your Conkeror, you should
+have a `ddg` webjump with auto-suggestion. Yay!
+
+## Footnotes
+
+<a name="fn1"></a> I have Conkeror installed in `/usr`, so if you have
+it installed somewhere else your path will be different.
+
+<a name="fn2"></a> You might have to restart Conkeror first, I didn't
+test it without restarting.
+
+<a name="fn3"></a> This can of course happen when, for example, your
+package manager updates your Conkeror installation.
+
+<a name="fn4"></a> The default profile is named (appropriately)
+`default`.