qutebrowser
Today, I’ll be talking about qutebrowser.
qutebrowser is a keyboard-focused browser with a minimal GUI. It’s perfect for my use case, as I don’t need a lot of the features that most “bloated” web browsers have. By bloated I don’t mean LOC(lines of code), I mean extra features that I don’t use. If I don’t use them, why include them and potentially increase memory and storage usage? qutebrowser has the perfect blend of minimal and big enough for my daily use.
Finding the right browser
I used to use Librewolf, and while it is an amazing browser that I would recommend to any normie or person that wants a “big” browser, it used a lot of memory and didn’t have support for vim keybinds and modal editing. While an extension on the Mozilla Addons Store called tridactyl gives a more vim-like experience to Firefox-based browsers like Librewolf, it felt slow and sluggish at times, and frankly didn’t look good with any of the themes provided (even catppuccin D:). I still keep Librewolf with tridactyl installed on my system for accessing any websites that don’t work on qutebrowser, but otherwise I don’t use it at all, even on my Windows machine.
On the other hand, I used to use surf, I did not like it either for completely different reasons. First, it doesn’t even support Wayland, which is a common denominator between suckless software. (I suspect that the suckless devs’ irrational hatred and rejection of wayland is what caused their organisation to fall into inactivity, but that’s a story for another day.) Second, my god, are some of the patches are outdated. Some of them haven’t been updated in EONS, and half of them don’t work at all, the rest apply horribly to the current codebase, and some are messy enough that I gave up patching that patch in. Third, the scripts don’t work. They just don’t work. That’s it. And with the suckless website not being updated, there’s no way any of the patches and scripts will ever be updated or fixed. Fourth, the stylesheets just look awful. darkmode css doesn’t look good at all. Fifth, the whole goddamn thing is outdated. The latest release of surf is 2.1, and was released 3 years ago.
You can read about my opinions on surf in my earlier blog post.
Why I chose qutebrowser
So in my search for a minimal but functional web browser, I come across many half-baked and broken goods. My requirements were simple:
- Support Wayland
- Support Javascript
- Work on most or all websites
- Built in Adblocking (not a must)
- Fast
- Actually works (what a shocker!!)
- Darkmode support
- Vim keybinds
There was only one web browser that fit my requirements, and that was qutebrowser! I love it. It uses the blink web rendering engine, the same on that chromium uses, so it should work on all websites and supports JS. Despite it being written in Python, it’s still fast.
Catppuccin Colorscheme
The best thing is, my favourite colorscheme Catppuccin has a port for it! However, there are a few pull requests open on the repo that haven’t been merged even though they have been open for quite some time, so I took the liberty to port the repo to Codeberg and merge them all. You can find my personal fork here: https://codeberg.org/yuki-was-taken/catppuccin-qutebrowser. It just adds a few more quality-of-life changes to the theme. To install it,
- Clone the git repo using
git clone https://codeberg.org/yuki-was-taken/catppuccin-qutebrowser.git ~/.config/qutebrowser/catppuccin
. - Put this in the
config.py
file in~/.config/qutebrowser/
:
1import catppuccin
2
3# load your autoconfig, use this, if the rest of your config is empty!
4config.load_autoconfig()
5
6# set the flavor you'd like to use
7# valid options are 'mocha', 'macchiato', 'frappe', and 'latte'
8# last argument (optional, default is False): enable the plain look for the menu rows
9catppuccin.setup(c, 'mocha', True)
- Restart qutebrowser and enjoy!
Alternatively, you can put this in config.py
to let qutebrowser manage your theme:
1import os
2from urllib.request import urlopen
3
4# load your autoconfig, use this, if the rest of your config is empty!
5config.load_autoconfig()
6
7if not os.path.exists(config.configdir / "theme.py"):
8 theme = "https://raw.githubusercontent.com/catppuccin/qutebrowser/main/setup.py"
9 with urlopen(theme) as themehtml:
10 with open(config.configdir / "theme.py", "a") as file:
11 file.writelines(themehtml.read().decode("utf-8"))
12
13if os.path.exists(config.configdir / "theme.py"):
14 import theme
15 theme.setup(c, 'mocha', True)
Other Stuff
- By default, qutebrowser uses gvim when you do :edit-url, and you can change this by putting this in your
config.py
:c.editor.command = ['foot', '-a', 'launcher', '-e', 'nvim', '{file}']
- I set a few quickmarks in qutebrowser. Quickmarks are basically bookmarks except they are binded to a certain key combo when you do o or shift+o to go to a link. I have quickmarks set to an invidious instance(to hell with youtube ads!!), codeberg and github.
- Distrotube has done a few videos on qutebrowser that are really helpful! Go check them out!
Conclusion
I hope you learnt something from this blog post! qutebrowser increased my productivity by a lot when I first started using it, and I hope it will help you out a lot too!