diff --git a/posts/20140603-2208-auto-suggestions-for-duckduckgo-in-conkeror.org b/posts/20140603-2208-auto-suggestions-for-duckduckgo-in-conkeror.org new file mode 100644 index 0000000..d8b8172 --- /dev/null +++ b/posts/20140603-2208-auto-suggestions-for-duckduckgo-in-conkeror.org @@ -0,0 +1,42 @@ +#+title: Auto-suggestions for DuckDuckGo in Conkeror +#+filetags: conkeror, config, javascript +#+date: <2014-06-03 Tue 22:08> +#+exclude_tags: summary + +Recently [[https://duckduckgo.com][DuckDuckGo]] 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 [[http://conkeror.org][Conkeror]] can work with [[https://en.wikipedia.org/wiki/OpenSearch][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 [[https://duckduckgo.com/opensearch.xml][file]]. After this, you can replace the =/usr/share/conkeror/search-engines/duckduckgo.xml= file[fn:1] with the newly downloaded one and you'd be done, ready to use the new auto-suggest functionality[fn:2]. + +If, however, you don't like overwriting your package's files because they may get overwritten again in the future[fn:3] 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[fn:4], 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: + +#+begin_src js + opensearch_load_paths.push(make_file("~/.conkerorrc/search-engines")); +#+end_src + +After Conkeror knows where to find your custom search engine specifications you can create a webjump for it: + +#+begin_src js + define_opensearch_webjump("ddg", "ddg.xml"); +#+end_src + +Once you evaluate these lines or restart your Conkeror, you should have a =ddg= webjump with auto-suggestion. Yay! + +* Auto-suggestions for DuckDuckGo in Conkeror :summary: + +Recently [[https://duckduckgo.com][DuckDuckGo]] 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... + +* Footnotes + +[fn:1] I have Conkeror installed in =/usr=, so if you have it installed somewhere else your path will be different. + +[fn:2] You might have to restart Conkeror first, I didn't test it without restarting. + +[fn:3] This can of course happen when, for example, your package manager updates your Conkeror installation. + +[fn:4] The default profile is named (appropriately) =default=. diff --git a/posts/20140625-1920-a-blogging-challenge.org b/posts/20140625-1920-a-blogging-challenge.org new file mode 100644 index 0000000..853e4ee --- /dev/null +++ b/posts/20140625-1920-a-blogging-challenge.org @@ -0,0 +1,14 @@ +#+title: A blogging challenge +#+date: <2014-06-25 Wed 19:20> +#+exclude_tags: summary +#+filetags: meta + +Lately I've been thinking that I should blog more. I've had a blog for as long as I can remember, I'm constantly trying out new platforms or new ways of blogging and I never really actually post anything. I sometimes get stuck in this spiral of meta-activity where, for example, I work hard on getting my blog ready or am figuring out how to best present some project I'm working on or its documentation, instead of actually blogging or working on/documenting that project. I get so bad that I occasionally even have projects around these meta-activities, like [[https://github.com/ryuslash/edocs][edocs]]. + +Thankfully, after a while I recognize that I'm not actually really doing anything and basically just stalling, and I try to do something about it. So, I'm going to try to stop doing that and just write. Yesterday [[https://ryuslash.org/blog/?p=37][I wrote]] about [[http://habitrpg.org][HabitRPG]] and now I'm going to try to use that to encourage myself to write more blog posts. So far it's starting out well, two days and two posts. + +So, please excuse my two posts of mostly filler content and I'll try to write something a little more interesting tomorrow. + +* A blogging challenge :summary: + +Lately I've been thinking that I should blog more.