Much like weechat being my irc client, Firefox is my browser of choice, though not the one I’d made myself.
It’s developed by Mozilla, which has a weird nonprofit/for-profit structure but one that apparently gives them the resources to maintain a browser, no mean feat…
Browsers are mostly self explanatory in this day and age, so you probably don’t need this guide per se. Or at least we’ve been using them for dozens of years, so the majority of the functionality is mundane by now. Even though they do cool stuff like render 3d graphics, manage networking, provide developer tools, and even have a extension ecosystem. Browsers like Firefox are tools from an earlier web, when the ideal of software and you control was still somewhat tangible. Compare this to Safari on iOS, which distributes extensions through the first-party Apple App Store now and generally has few controls.
So why write this guide at all? It’s mostly to document my configuration of this old browser, so the next time Firefox randomly wipes my config, or I set up a new computer, it’ll be easier. No I don’t use the cloud firefox syncing system, maybe I can illustrate why in a punnet square:
doing what I want | doing what I don’t want | |
yes | firefox sync | firefox sync |
no | firefox sync |
Versus manual config:
doing what I want | doing what I don’t want | |
yes | manual config | |
no | manual config |
Anyways here’s the stuff I do to make firefox my own. For now. Someday maybe I’ll actually fork firefox and bake my config in. Or have my firefox config trackable in version control. Like vim/emacs…
Ok a bit of history here, I grew up on windows computers then when I left my laptop on a plane, the 2013 macbook airs had just come out and a friend convinced me to get one.
I tried to install ubuntu on it first thing but when that didn’t work, I gave in and went on to use Macs for about 10 years… though the macbook air I bought I still have and it remains the only one I did buy; all the others were my employers’.
So I have a lot of muscle memory of using cmd as a shortcut key, and here’s the thing: it actually makes more sense from a biomechanics perspective to use your thumb for shortcuts rather than your pinky. Even though I do use some control shortcuts (see control+t below) I remap my caps lock key to control so my pinky doesn’t have to cramp up into the corner of my keyboard.
Fast forwarding to the present, I am running debian on this laptop and use firefox. By default it uses control for keyboard shortcuts, but my muscle memory and muscles don’t want to hit, say, control+l to move the focus to the address bar.
Ok enough talk, now to actually do this! There are 2 about:config
settings that are relevant:
ui.key.accelKey
should be set to 18
ui.key.menuAccessKey
should be disabled by setting it to 9999
Then you’ll have to restart your browser.
What’s going on here? The ui.key.accelKey
is the shortcut key in
question; I guess they call it an “accelerator” key. By default it is
17
which means control
(see https://www.toptal.com/developers/keycode/table1),
so we change it to 18
for alt
. But this binding conflicts with alt
being the “menu access” key, so we have to disable that by setting it
to a way too high number. Here’s a what the menu bar looks like, remember it?
Now it is hidden by default and almost all of its settings are on the hamburger menu on the right.
This one is pretty straightforward, I mostly just use these extensions:
The last 2 I wrote :) read about them on their extension pages. control-t is another MacOS/emacs muscle memory that’s extremely useful, there’s a bug to fix it for MacOS but an extensions works just as well. I don’t use MacOS much anymore anyways… To Chrome’s credit they actually have this functionality baked in their UI.
Vimium is really nice, it gives a vim feel to firefox… though the design isn’t perfect.
The commands I use most are j and k to scroll down and up, which is a nice and smooth way of scrolling, much nicer than the up and down arrows (even if you were to remap them to make them more ergonomic). x closes a tab and X reopens the last closed tab. gg scrolls to the top and G scrolls to the bottom. i enters “insert mode” (it disables vimium until you hit esc) though it’s generally pretty good about not interfering since it basically gets disabled when the focus is on an input.
For pages like email clients that have extensive keyboard shortcuts you can disable vimium on them in the options.
f
has been reimagined as a tool to open links: you press f and then keys pop up
on all the links; typing them opens the link.
That’s pretty much the good parts, now for the not so good parts which fortunately can be configured away.
First off, pressing p
will paste your clipboard contents into your search engine and immediately search it. This sounds fine until you forget your password is on your clipboard and you watch it broadcast into the world and into your browser history… oops. Take care of this with unmap p
in the vimium config, which you get to by clicking the little extension icon then clicking “Options”. Don’t forget
to click “Save changes” at the bottom (or press ctrl+enter).
Second, if you remap alt to control like I do, vimium conflicts with the find-on-page shortcut which is now alt+f
. Its function is to open multiple
links and is not something I use. So I unmap it with unmap <a-f>
.
By default firefox is now putting spacing between the back/forward/refresh buttons and the address bar, and between the address bar and extension. Right click it and select “customize toolbar”, then drag the spacers off. You can also remove the Pocket and Firefox Account off the toolbar if you don’t use them, like me.
If you open more tabs than fit on your screen, by default is allows you to scroll through them, which is kinda nice cause you can always read the tab, but it’s confusing because you think you’re jumping to the last tab with alt+9 but really it’s just the last visible tab. You can fix this but it’s a hassle, look to this post: https://superuser.com/questions/1749962/firefox-how-to-have-very-small-tab-size-and-no-tab-scroll-buttons
Other than that, you have to poke around the “new tab” page and the settings to remove sponsored stuff, or you can keep it I guess; you’re supporting Firefox if you use it. Thankfully though it does let you take ads out. That’s it, hope that helps!
You can also see it at https://en.wikipedia.org/wiki/List_of_Unicode_characters where it’s listed as “Device Control 1”. More fascinating control code lore: https://en.wikipedia.org/wiki/C0_and_C1_control_codes ↩