In search for perfection (yeah, tech stuff)

Only a short while after having settled with dwb as my browser of choice, it was announced that it was unmaintained. Development had stopped and it was left in limbo. Again I was out hunting for The Browser. Revisiting Luakit and Uzbl, I discovered Vimb that seemed promising – but it had a few snags that ended up prolonging my quest. I hang around in the IRC chat channels of several tech projects, including a handful browsers. Got chatting with the main developer (“The Compiler”) of a new browser on the block just before X-mas – and it turned out that his qutebrowser served well as a Christmas present.

Qutebrowser uses a different underlying technology (QtWebKit), written in Python, has a very clean configuration, extensible and actively maintained.

It still lacks a few features like a form filler, session management and support for AdBlocks “easylist” (although it has a more rudimentary adblocker). But these are on the roadmap, and with the pace of development, I am sure these and many other neat features are not far away.

One thing that bugged me was how QtWebKit rendered fonts. Fonts were noticeably slimmer rendering web pages less readable. After some hours of tinkering, I solved the issue by first getting a better font setup for my system (here), then installing the Ubuntu package called “texlive-fonts-extra” and setting the font “Lato Heavy” for the following font settings in qutebrowser: “web-family-standard”, “web-family-serif”, “web-family-sans-serif”, “web-family-cursive” and “web-family-fantasy” (and the font “Droid Sans Mono” for “web-family-fixed”). Now fonts are beautiful and very readable.

After wading through more than a dozen browsers, qutebrowser fits the bill quite nicely.

And when I thought I couldn’t get closer to Nerdvana

… doors started to open.

I have written about my technical setup before. But now, ladies and gentlemen, it is getting HOT. Like hard core porn hot.

The setup goes like this: Linux (Ubuntu 14.04) as the operating system (easy package management – it does the job well). No kludgey memory-hogging desktop environment, just a damn good Window Manager straight – the i3. Lean, mean, keyboard driven and very efficient. Check out my config here.

The i3 window manager in action

The i3 window manager in action

Adding a conky bar with essential info at the top of the screen. And the perfect e-mail setup for good measure.

The e-mail client, mutt

The e-mail client, mutt

I am a vi-guy to the core, and I prefer to use console tools as much as I can (urxvt is the terminal with zsh as the shell). With key bindings for everything and with minimal use of the mouse, I get the speed and efficiency I want.

I use VIM for almost all my text editing – from writing books and articles (with the added benefit of LaTeX) to writing hyperlists, all my e-mails… and this very blog post. I swear by mutt as the e-mail client. It spawns vim as the editor. Essential vim plugins are netdict, visincr and gundo.

Newsbeuter - the rss reader

Newsbeuter – the rss reader

I use newsbeuter for newsfeeds, irssi as the Internet Relay Chat client and mcabber for my facebook chat 🙂 Zathura is the pdf reader of choice.

Using irssi to chat

Using irssi to chat

Just the other day, as I was struggling with a bug in the latest release of the trust old vifm console file manager, I came across an alternative – ranger. An ultra-neat file manager capable of all sorts of acrobatics – like displaying images right in the console (via w3m)! Wanna dig in? My config file should get you grooved in.

The amazing ranger - file manager on steroids

The amazing ranger – file manager on steroids

Then it’s the browser. I have been very happy with uzbl – until the latest git updates. Stability issues started creeping in and I was forced to look for alternatives. I have tried plenty – and I gave luakit another go. The config files are written directly in the programming language of lua. A bit of steep curve for simple configuration tasks but as you get used to lua, it offers amazing extensibility to the browser. As I started to fell in love with luakit, another vi-like browser popped up on the radar – dwb. How could I have missed this gem in all my trails and tribulations trying to find the perfect keyboard driven browser? OMG what a browser! Don’t leave home without it. With such an easy configuration, you’ll be up and running and turning into a fan in no time.

Dwb - über-cool browser

Dwb – über-cool browser

I have spent 14 years choosing my tools, fine tuning their operations and polishing every detail. I owe much work efficiency to this passion.

When I thought I couldn’t get closer to Nerdvana, I stumbled right into its core. Sadly, I now have few ideas left of how to improve my tools set :-/

dwb

Slightly more uzbl

To make uzbl even more usable, I have added a download viewer script that is easy to configure and maintain. The purpose was to get uzbl to launch the appropriate viewer program when a file is downloaded from the net (like launching mplayer for a downloaded movie or zathura for viewing a downloaded pdf file). Other browsers do this as default, but as there is hardly anything default about uzbl (that is the whole point, really), one is left with the task of finding or creating the best add-ons even for viewing downloaded files. No add-on that I could find did the trick, and so I made one.

uzbl-logo

It wasn’t easy to figure out exactly how to hook a script into uzbl that fires upon a completed download. But with some pointers from people at the uzbl IRC channel, it was very easy to make it work.

Here’s what you do on a Linux system.

Add to your uzbl config file:

@on_event DOWNLOAD_COMPLETE spawn @scripts_dir/downloadviewer.sh %s

Then create the script “downloadviewer.sh” and place it in the scripts folder (on my system, that would be “/usr/share/uzbl/examples/data/scripts/”). Do a “chmod 755” on the file to make it executable. The script would contain something like this:

#!/bin/sh
case "$1" in
*.pdf*) zathura "$1" & ;;
*.jpg*|*.png*|*.jpeg*) feh "$1" & ;;
*.txt*|*README*|*.pl*|*.sh*|*.py*|*.hs*|*.hl*) urxvt -e vim "$1" & ;;
*.mov*|*.avi*|*.mpeg*|*.mpg*|*.flv*|*.wmv*|*.mp4*) mplayer "$1" & ;;
esac

Edit to accommodate for your choice of viewers and file types to view.

Additionally, to set the “download directory” for uzbl, edit the file “/usr/share/uzbl/examples/data/scripts/util/uzbl-dir.sh” and change the line starting with “UZBL_DOWNLOAD_DIR=” to what you like.

hth 🙂

UZBL: Hardcore Browser

I finally managed to migrate away from Firefox!

After having tried all the major browsers like Chrome, Konqueror, Opera, and dozens of minor browsers like Midori, Epiphany, Vimprobable(2), Jumanji, Luakit, etc… I found it!

Meet the hard core browser that gives you the ultimate control of your surfin’ experience: UZBL

As Firefox and the other Big browsers got bigger and bigger and steadily requiring more resources and becoming more sluggish, my desire to move away from Firefox increased. Until I decided to make a real effort and a final jump. Although I have tested many browsers over the years, I have only been dead serious about a migration in the past two weeks. Having been accustomed to many neat Firefox plugins, it seemed like a tough challenge to find a browser that could match at least my basic requirements:

  1. It must be fast
  2. VIM-like key bindings. I want my browser to be modal and act like my favorite text editor.
  3. Fully customizable key bindings
  4. Easily configurable and extensible, putting me in the driver’s seat
  5. Ability to edit text fields with VIM – like I do now, writing this blog post
  6. Tab-based
  7. Password manager
  8. Form filler
  9. Ad blocker

…and with UZBL I get this. And much more. It is dead easy to extend and customize almost every aspect of the browser in the config file or via scripts. And I can write scripts in any language and set uzbl to launch a script via a key binding. I can write scripts in Shell, Ruby or even Raven 🙂

Bliss.

Click for full-size image

Click for full-size image

My system is now finally lean & mean with Ubuntu Linux as the OS, i3 as the Window Manager (no Gnome or KDE), Conky as a notifier, Mutt as my mail client, Newsbeuter as RSS reader, VIM for any and all text editing, LaTeX for writing books and articles, ZSH in urxvt, and now UZBL for surfing the Internetz. My perfect setup.

I had to tweak and squeeze the browser to make it behave just like I want it to – small stuff such as hitting “ogs” and then some search words to make the browser open up Google with the search results, or hit “tbi” to open up my blog in a new tab. And more involved stuff like restoring a closed tab by simply hitting “u”.

Firstly, I run “uzbl-tabbed” with this config and this follow-links-style. I changed the undo-tab scripts to this and this (so as to make it run on the latest uzbl version). If you want to try this browser, make sure to check out my config file – it includes some nifty stuff.

Enjoy (as long as you run Linux/*BSD/Unix/Mac OSX)