Navigation

An Ode to Qutebrowser

I've used Qutebrowser for quite some time now, and I thought I may do some evangelism. It only seems to be known for the fact it uses similar keybindings to navigating Vim, most other aspects are overlooked. So, why care?

Vim-like Keybindings

This is the main focus of anyone speaking about it, so I suppose I have to speak about it too. Having movement keys as 'h', 'j', 'k', and 'l' on the home row (if you use DVORAK or otherwise, this is configurable) has the same obvious speed improvements that Vim possesses. Most actions you can think of making on a fully-featured web browser are available here, largely from the home row. But "You can do most things from the home row," massively undersells Vim, and Qutebrowser.

Macros and Bulk Actions

I'll use the 'gl' sequence as an example - this moves your current tab one tab to the left in amidst the other tabs. But it can also be run as a bulk action - if you have 5 tabs open, and your highlighted tab is at position 5. You can run 'g3l' and your tab moves to position 2, and the tabs from positions 2 to 4 move up by one. This same method can be applied to many actions. Qutebrowser Keybinding Cheatsheet

Of course, you don't need to remember all of that, those which are frequently used will come naturally. In the case that there is some strange and complex sequence you need: this is where macros come in.

By default they can be reached with 'q' and '@', much like Vim. Press 'q' to begin 'a' macro, press a key to bind that macro to, and then you can make whatever action you want, however long and complex it is. Hit 'q' again to finish recording. Then, play it again with '@'. For your weird, specific command, particular to you and only you, you can easily make it happen in two presses without leaving the browser.

Hints

Hints are a key concept in how Qutebrowser functions as an almost entirely keyboard based browser (you can use clicks, if you really want to). The way Qutebrowser handles links is fairly intelligent: if the page has 9 links or less, they will be found on the home row - 'asdfghjkl'. So, you can type 'f s' to go to link 's'. If there are dozens, links may be designated with a second 'digit', for example you may type 'f jk'. If there are hundreds, a third 'digit' - 'f skl'. You never leave the home row, and the enumeration of links never gets unmanageable. All links within the visible window will appear with a highlighted letter, or letters, beside them. As you type, in the case of multiple letters, the hints appearing on screen will be narrowed down (e.g. upon typing 'f g' only links beginning with 'g' will still be present).

And of course, as an aside mention, Qutebrowser has history, tab-completion, and bookmarks, like any other. It also has 'quickmarks', allowing you to bind a URL to a shorter term to open more quickly. It also has a console, inspect element, and most things you would generally expect to see.

Space Saving

Qutebrowser's minimalist GUI takes up very little real estate on your screen, which is another bonus. Qutebrowser's command completion window, which takes up half the screen by default, is hidden unless actively in use. Qutebrowser is also lighter in terms of disk space than many other browsers, and has a small install size (if you forgive the dependencies on Qt4 and Python - which you probably already have installed for something else anyway). Qutebrowser's binary is generally several dozen times smaller than that of Chromium or Firefox.

Configurability

Typing 'ss' will immediately open the command completion window, with an organised alphabetical list of everything you can configure in Qutebrowser, which can be narrowed down into further sections and subsections upon typing. At 'qute://settings/' an additional HTML menu can be used to interact with the configuration.

Qutebrowser also has a config file, found at '~/.config/qutebrowser/config.py', which can configure all the above settings. Before you change anything in it, ensure the function 'config.load_autoconfig()' is on the first line - otherwise the default settings won't be loaded. An example use for this may be running a script for setting a desktop-wide colour scheme, which could include Qutebrowser by interacting with its config file. Additionally, Qutebrowser supports userscripts, which can write to the command completion prompt, parse the page, the current URL, the URL selected in 'hints' mode, and so on.

A good example of a macro using 'hints' mode: 'hint links spawn mpv --ytdl {hint-url}' - this goes into 'follow hint' mode, and spawns mpv with the value of the URL chosen.

Privacy

Because Qutebrowser isn't a direct copy of one of the 'big two' - Chromium and Firefox - it is lacking in a component for add-ons. It also doesn't have the graphical components necessary to display add-ons which are based on menus. For many people that use a variety of privacy enhancing add-ons, this is a clear downgrade. Some of these functions can be replaced through userscripts, but it's something to be aware of. Back onto positives.

You may be under the impression that without add-ons, Qutebrowser can't block ads - in fact, ad-blocking is inbuilt, regularly updated, and uses an /etc/hosts style format - which runs much quicker than a standard bloated ad-blocker. I have not once seen an ad while using this browser. Just run ':adblock-update'.

JS can be handled on a host-by-host basis, in the config file. If you would like to keep it off as a general default, but need it in a few select places, you can add URLs to your config.py like so:

config.set('content.javascript.enabled', True, '*://jisho.org/*')

By default, WebRTC works the same as it does in any browser. If you'd rather you didn't leak your IP address, neutering it is a fairly straightforward process. This can be set in the command completion prompt, or alternatively in config.py like so:

c.qt.args = ["force-webrtc-ip-handling-policy=disable_non_proxied_udp"]
c.content.webrtc_ip_handling_policy = 'disable-non-proxied-udp'

Using proxies, such as Tor via SOCKS, is built into the browser. See the 'content.proxy' setting.