Conkeror - a browser that doesn't suck

Switching web browsers, these days, is like a life changing experience for the better or the worse, akin to moving flats or changing jobs, perhaps. Well, maybe that’s an exaggeration, but it’s certainly as earth shattering as changing window manager (and I’ve been there, changed from FVWM to awesome after more than ten years).

So yesterday I switched from Google Chrome to Conkeror, and couldn’t be happier. Before that I was a fairly happy Firefox/Iceweasel customer who loved his vimperator plugin. For the uninitiated, vimperator, basically, lets you operate Firefox almost mouseless. It’s awesome to state it with an americanism.

However, lately Firefox didn’t work for me anymore, pages stopped loading or wouldn’t even open, akin to having DNS problems - except that I didn’t. After a bit of web searching, I found out it could be (and probably is) ipv6 related, in that Firefox by default first attempts an ipv6 connection before it falls back to ipv4, if ipv6 is not supported for whatever reason. Turns out you can disable this behaviour in Firefox, and you can permanently rid Linux of ipv6 support, except that neither solved the problem for me. After several weeks, I had to give in and switch to another browser, Chrome, as my hands were hurting from pressing reload on every page. Chrome worked fine, is fast, but lacks an equivalent to vimperator. Those plugins that do exist are nowhere near as customisable. So this browser change, was not very earth shattering at all, in fact, not even anticipated and never liked.

But the lack of keyboard support for Chrome also annoyed me, to the extent of trying one of the most seemingly archaic web browsers out there: Conkeror. In a nutsell, Conkeror is the emacs (or vim?) among the browsers. No menu bar, no tabs, no nothing. Just keyboard shortcuts and endless possibilities for configuration. At first, I was afraid I’d need to spend another week learning it, but after 30 min or so, I had a config which more or less resembled the behaviour of my previous vimperator setting, and couldn’t be happier. I’ve finally found a browser that doesn’t suck balls!

Since $HOME/.conkerorrc files are still somewhat hard to come by in the world wide web, I’ve decided, also to mark the occasion, to post my 30 min version here:

// auto completion in the minibuffer
minibuffer_auto_complete_default = true;
url_completion_use_history = true; // should work since bf05c87405
url_completion_use_bookmarks = true;

// we don't need a clock
remove_hook("mode_line_hook", mode_line_adder(clock_widget));

// Tabs
require("new-tabs.js");

// Open Middle-Clicked Links in New Buffers
require("clicks-in-new-buffer.js");
clicks_in_new_buffer_target = OPEN_NEW_BUFFER_BACKGROUND; // Now buffers open in background.

// Bind Number Keys to Switch to Buffers 1-10
function define_switch_buffer_key (key, buf_num) {
    define_key(default_global_keymap, key,
               function (I) {
                   switch_to_buffer(I.window,
                                    I.window.buffers.get_buffer(buf_num));
               });
}
for (let i = 0; i < 10; ++i) {
    define_switch_buffer_key(String((i+1)%10), i);
}

// Some shortcuts to often used sites
interactive("open-googleAU", "Go to google.com.au", "follow", $browser_object = "http://www.google.com.au/");
interactive("open-googleDE", "Go to google.de", "follow", $browser_object = "http://www.google.de/");
interactive("open-calendar", "Go to calendar.google.com", "follow", $browser_object = "http://calendar.google.com/");

// Some keybindings

define_key(content_buffer_normal_keymap, "j", "follow");
define_key(content_buffer_normal_keymap, "J", "follow-new-buffer-background");
define_key(content_buffer_normal_keymap, 'b', 'back');
define_key(content_buffer_normal_keymap, 'f', 'forward');
define_key(content_buffer_normal_keymap, "C-page_up", "buffer-previous");
define_key(content_buffer_normal_keymap, "C-page_down", "buffer-next");
define_key(content_buffer_normal_keymap, "C-x k", "kill-current-buffer");
define_key(content_buffer_normal_keymap, "C-x l", "find-url");
define_key(content_buffer_normal_keymap, "C-x t", "find-url-new-buffer");
define_key(content_buffer_normal_keymap, "A", "bookmark");
define_key(content_buffer_normal_keymap, "B", "list-bookmarks");
define_key(content_buffer_normal_keymap, "f1", "open-googleAU");
define_key(content_buffer_normal_keymap, "f2", "open-googleDE");
define_key(content_buffer_normal_keymap, "f3", "open-calendar");
define_key(content_buffer_normal_keymap, "C-x h", "open-googleAU");
define_key(content_buffer_normal_keymap, 'v', 'view-source');

// Some webjumps
define_webjump("dict", "http://dict.leo.org/ende?lp=ende&lang=en&searchLoc=0&cmpType=relaxed&sectHdr=on&spellToler=&search=%s");
define_webjump("g",   "http://www.google.com.au/search?q=%s");

// Content handlers
external_content_handlers.set("application/pdf", "mupdf");

Conkeror is not only great because it does exactly what I tell it to do, but also it has a lot of sane standard behaviour which needs no configuration. For example, when I open a PDF file - and boy do I open a lot of PDFs all the time - it first asks me if I want to download or view. If I download, everything works as expected. However, if I decide to view, the status bar changes into the default viewer command, which I can either confirm by pressing enter, or replace by typing the name of some other browser. That’s the fastest way I’ve ever seen to switch PDF viewers, which I also tend to do multiple times every day. (And no, I do not want to select a viewer from a drop-down menu using the mouse all the time.)

Conkeror makes web browsing the painless experience it should be and I can only urge you to give it a go. Oh, and most importantly, so far it also doesn’t suffer from the random page-load problems that I experienced with Firefox.