my linux nerd toolbox August 29, 2017
Geeks! Some of you asked for it, and I’m not –yet 😄– web-famous enough to be on usesthis, so here’s a blog about my setup! Hope you find useful bits 🙂.
Without further ado: 🔥 🎆 🎇 my linux nerd toolbox 🎇 🎆 🔥 .
Hardware
As admirably summed up by Peter Welch, tech jobs rarely involve a "4700-hour week digging a tunnel under Mordor with a screwdriver", but taking care of the body doesn’t seem like premature optimization. So,
- My everyday Linux machine is a full-Intel Thinkpad laptop, to avoid death-by-driver-induced-madness.
- TypeMatrix keyboards don’t suck: narrow (thus bringing the mouse within closer reach), orthogonal,
Enter
+Backspace
in the middle (thus accessible to both hands). Oh, and their blank (label-less) versionhelpedforced me to fully learn to touch-type, which you should do. Not sure about the orthogonal layout? Fine, but really, do yourself a favor and buy a narrow/compact keyboard without numeric keypad, it makes for a more natural mouse position.- On the software side of keyboards, I roll with a custom xkb layout. No Dvorak for me, it’s a vanilla US layout (for a. commonness and b. uncrazy brackets placement), spruced up with frequent-for-me characters behind the
Alt Gr
modifier key: local ones (French â é ê ô ù), conveniences (→ ↔ ← ≠ ≥ © – —), and common emojis (👍 🙂 😄 😕). As to why a modifier key makingAlt Gr
+e
intoé
is any better than, say, a US International layout converting'e
toé
, it’s because this'e
logic gets in my way when I need to typelet animal = 'elk'
. See that gist; it’s a bit similar to that European layout.
- On the software side of keyboards, I roll with a custom xkb layout. No Dvorak for me, it’s a vanilla US layout (for a. commonness and b. uncrazy brackets placement), spruced up with frequent-for-me characters behind the
- A vertical mouse (e.g. Evoluent or Logitech) that doesn’t twist my wrist. Say that again? Friends don’t let friends twist their wrist.
- A big screen and beefed up font sizes in apps where I read a lot (email client, code editor, etc). I’m myopic, and if text is too small I will inevitably end up bending my neck to get closer to the text. Getting a 27" screen at work accidentally solved years-long recurring shoulder + neck pain; I thought I had good ergonomics & posture, but it turns out I frequently unconsciously sat in terrible bent-forwards posture.
- Also, no multi-monitor, it’s a recipe for potentially long sessions with the head skewed towards a non-centered screen. I get along just fine on one fat monitor thanks to simple window/splits management and efficient window switching (read below about marathon).
- Desk at a height that lets my forearms rest, monitors centered and just below my eyes (computer ergo 101).
- Chair? At work, I thought I liked fancy Aeron chairs, until I realized a simple sturdy & cushion-less chair supports my lower back even better. At home, a DIY standing desk. The sitting at work / standing at home yo-yo is 👍.
OS
- Server: Debian stable is stable and runs Docker images.
- Desktop: Arch Linux keeps it simple and upstream, has the bestest docs, a treasure trove of a user-maintained packages repository when the official repos are not enough, and is confident about my ability to report bugs as they arrive and perform the occasional config chore. In exchange, it doesn’t force a world-changing upgrade down my throat every six months or two years.
- About docs, arch-wiki-docs / arch-wiki-lite are awesome offline searchable resources for when your network is dead.
- Powertop / TLP and Hardware video acceleration everywhere possible for an efficient, quiet, cool laptop.
Code
- Whatever language to get a specific task done:
- At work I’m doing okay with modern node.js, which TypeScript makes usable. Curious to see if Deno picks up. I’d like to give Erlang / Elixir a try one of these days: much of the pain in web/backend software lies in distribution and communication while growing, so seeing these concerns baked in the language itself is attractive.
- I’m enjoying Rust a lot (the static site generator for this blag is written in Rust!). The level of care & craftsmanship poured into Rust’s {design, maintenance, tooling, ecosystem} is nuts.
- I’d probably enjoy Go at work, for the keep-it-simple pragmatism.
- I used to like Python 3 for the respectful community, the values, and the reliable, batteries-included stdlib (fuuuu the nodejs ecosystem and the typical mountain of micro-packages 🤬), but I learned to prefer statically typed languages (no idea if MyPy/Pydantic type annotations are good now).
- Dabbled in löve and Godot for gamedev attempts.
- Before inflicting a shell script upon earth, I reach for ShellCheck’s help through a plugin for my $EDITOR.
- Regular expressions are our friends. Play with them on regex101.
- These days, for an almost-IDE-like experience but lighter and more bendable, I like VS Code, with a few common extensions.
- The vvvery full-featured DBeaver helps me SQL.
- To build interwebs, my framework of choice is—WHOA WAIT. This would be a worthless piece of information, as these things change faster than a request-response round-trip these days. I’ll quietly pass by the flamewar, muttering that when I don’t want to start a web project with (choices ✕ more choiceshey, other choices), my rules of thumb are to:
Short feedback loops everywhere
... or I go crazy. Things like automatically running tests/rebuilds on file changes (with entr or full-blown incrond
), js Hot Reloading, or serving static HTML from the devd live-reloading http server.
Shell
The fish shell is {smart, full-featured, friendly, performant} by default. That being said, out of the interactive shell I don’t like the exoticism of fish as a scripting language; I keep preferring shebanged, shellchecked, defensive (ba)sh scripts, they’re a stable and portable evil I know.
- Shell used to happen in gnome-terminal / Alacritty + tmux, whose config & scrollback watness made me look a long time for a replacement. I wanted to love Tilix, but lack of scriptability and keyboard-friendliness made me look further, until I found the powerful and almost sane-by-default Kitty.
- Git: a few human aliases to interact with the borg, tig for a nice interactive text interface, delta for human-friendly & syntax-highlighted diffs, background cron fetching of work repos. I try to write good commit messages (another take from Greg Ward), and
git bisect
makes me cry tears of joy each time it lets me isolate the occasional case of hey-here’s-this-regression-compared-to-our-last-version-published-six-months-ago-can-you-fix-it-now. - Vanilla
grep
/find
/cat
/ncdu
are good, but their faster and featurefuler Rust-based equivalents rg/fd/bat/dua are I CANNOT EVEN. - I like to run taoup on interactive shell startup.
man
pages are good buttldr
pages are terser.- After too much profanity thrown at a vanilla
vi
in a ssh-ed server, I mount a pseudo-local folder using sshfs, grin, and enjoy my local toolshed. - rsync for backup/deploy chores. Pronounced à la française: ère-cinq.
- grc helps me colorize unhelpfully-white server logs, which I multiplex with lnav.
sudo
-globally-installing python/node command-line tools invariably ends up in divorce with your package manager, so I install those locally:- python:
pip install --user foo
- node:
npm i -g foo
withexport npm_config_prefix="$HOME/.node_modules"
- ... then expose local binaries with
export PATH="$HOME/.local/bin:$HOME/.node_modules/bin:$PATH"
).
- python:
Interwebs
Through Firefox, because Mozilla cares about the web & their users more than T̛h̶͝e͏ G̶̀o͜o͘g̛. Nightly channel, to get features in my grubby hands 12 weeks earlier, at the cost of the occasional crash I happily report to the fine folks at Mozilla.
- Tons of prefix-based keyword searches using the magic
%s
token, for direct focused searching without any Google / DuckDuckGo hop, like:- Searching for a local place in my city (
mon
treal)? Keyword searchmon museum
will expand that tohttps://maps.google.ca/maps?q=%s, Montreal QC
- French Wikipedia?
fr
→https://fr.wikipedia.org/wiki/%s
- Etc. Try them! They’re amazing.
- Searching for a local place in my city (
- De-cluttering of frequently-used websites through userContent.css, and browser prettifying with userChrome.css + Browser Toolbox.
- Containers.
- A minimal set of extensions, because I grew a sane suspicion about them (degrading performance, leaking information):
- Main privacy & perf condom: uBlock Origin. Medium mode is an endless game of broken-by-default whack-a-mole, so nowadays I just roll easy mode with most of the built-in filters.
- Vimium because my fingers ❤ my keyboard home row.
- Misc: Copy selection as Markdown, enhanced-h264ify.
- For performance and privacy, Google Fonts are blocked globally (by uBlock) but installed as system fonts. On Ubuntu with the Web-Font-Load helper, on Arch with AUR / ttf-google-fonts-git.
youtube-dl and yt-dlp slurp any video you throw at them.
Routers run OpenWrt and its awesome DNS-based ad/abuse domain blocking package, as baseline interjunk bouncer in vanilla browsers and mobile apps. It’s like a router-builtin Pi-Hole, with less config hassle 🙂.
The tech interwebs I like are RSS through Feedly Pro and HN. Then, to cut down on aimless FOMO addicto-HN-browsing, I enjoy the weekly / monthly newsletter format. For me it’s hackernewsletter, Exponential View, Schneier, but look at a selection and pick your poison. Real World News™ reaches me through the radio or podcasts, which are 👌 while cooking or doing housework.
Desktop Environment
Is GNOME, for the continued refinement and amount of eyeballs looking at it, at the cost of A. designers occasionally sawing a UX branch I was sitting on, and B. being shoved down the throat a programming language that I can appreciate to serve web pages, but which in the context a solid desktop environment is dubious, and made dubious-er by GNOME’s failure to provide a stable extension API, forcing extension authors to do brittle monkey-patching that makes them (and me) crazy because extension code breaks frequently on new major releases. I’ll end up switching to MATE or Xfce or LXQt or Plasma next time things break too much. Delaying the switch because, when it works, and accepting that .0 releases are generally kinda broken for a month, it’s polished.
Alt+Tab
-ing, clicking taskbar buttons, or using a slow-as-molasses Activities menu are inefficient and distracting. I focus windows (usually maximized or half-split) using my little marathon to bind keyboard shortcuts to focus/launch apps.- Shell’s
Super + {Left, Right}
keyboard shortcuts makes for dead-simple window splits without going all the tiling-WM way. - Theme nits;
Ctrl+Shift+I
in any GTK3 app started withGTK_DEBUG=interactive
to pop the inspector. Persist changes in~/.config/gtk-3.0/gtk.css
. - Nautilus scripts are nice to automate common file-contextual tasks.
- Autokey for text expansion and simple X scripting.
- A few UI changes with Tweaks, and a few extensions: GTK Title Bar, K/AppIndicator Support, Clipboard Indicator, Emoji Selector, Pomodoro.
- Fonts? I like them thick, for readability. So, in the terminal & editor I roll with monospace
Cascadia
orUbuntu Mono
, but pick your favorite with Programming fonts test drive. For graphical / non-monospace, I likeUbuntu Regular
.- Hideous
Arial
,Verdana
,Calibri
and, gah,Courier New
still used by many sites make my eyes bleed, so a fontconfig replace rule fixes that. Also, fontconfig emoji tweaks. Also, you want to set sexy default fonts in Firefox prefs.
- Hideous
Miscellaneous
- Non-code creation:
- Music recording & prod thanks to JACK, Ardour, and an -rt kernel.
- Text: markdown with Typora, and the occasional for-print blurb is typeset in good’ol’ LibreOffice with the LanguageTool prose linter / grammar checker. PDF editors suck, except Master PDF Editor.
- I screenshot stuff with a script mixing maim + zenity + inkscape, whose PNGs I crush wish pngquant (JPGs go through Guetzli / GIMP plugin), and when GNOME Shell’s
Ctrl+Shift+R
is not precise enough, I screencast with Simple Screen Recorder. If a GIF is needed for a GitHub embed, I Peek it and optimize it with Giflossy.
- Miscellaneousmiscellaneous :
- Clementine (or its fork Strawberry) is the only featureful-yet-suckless graphical Linux media player I tolerate (hail foobar in Windows-land). MUBI sells an awesome movie selection for CHEAP per month, and I get subtitles for the occasional illegal flick in seconds from VLC’s VLSub extension.
- I help mom with TeamViewer.
- Kiwix to store snapshots of Wikipedia & other libraries usable offline.
- Wine runs the occasional Windows app. Steam gaming happens on a dedicated Windows box, where an nvidia GPU doesn’t mean death-by-driver-induced-madness. Also, someday I’ll migrate to a Proton install, but as long as games are overwhelmingly QA-tested by/for Windows, that bright Proton day will wait. { SteamOS, Proton, DXVK, VKD3D, etc } are awesome projects, I want to use them, and Valve deserves giant kudos for them. However, I go through enough software madness by day, to a point that, by night, I like my games to simply run as meant & tested by their developers, and I get zero kick out of fumbling around Proton settings. I’ll cross that bridge when it feels comfortable to do so.
- Calibre to manage ebooks, Foliate to read them.
- gcalcli to quickly add to my Google Calendar from the terminal.
- To prune a full hard drive, (graphical) qdirstat or (term) dua/ncdu.
Phew! Got one more magic trick to suggest? Please do, via twitter/email.
Lastly, writing this waaaay-too-long collection brought back to mind Ryan Dahl’s "I hate almost all software" rant. So, a reminder (which I address to myself too): stay curious about craft & tools, but then move on and do stuff with them 🙂.
EDIT 2017 + 2018: following discussion on r/Arch: added guetzli, dbeaver, fd, gcalcli, universal-ctags, qdirstat / ncdu, moved from zsh to fish shell, Refined GitHub and grc. Added bat discovered on Ask HN: What are your favorite terminal programs?, offline Google Fonts, replaced tmux + gnome-term with Kitty, fontconfig-based font replacement and fontconfig emoji tweaks, replaced Shutter with my homebrew maim + zenity + inkscape screenshot script, arch-wiki-docs and arch-wiki-lite, and added a few Firefox addons: Pin Unpin Tab, Copy selection as Markdown, Redirector, Simple Tab Groups.
EDIT 2019: added OpenWrt & its adblock package, diff-so-fancy, Giflossy, taoup, Firefox userContent.css & userChrome.css, background cron fetching of git repos, and good commit messages (other take on the same lines).
EDIT 2020: added Cascadia and Programming fonts test drive, replaced diff-so-fancy with delta, added Powertop + TLP.
EDIT 2021 + 2022: added Zola and Hugo, yt-dlp, Strawberry, dua, lnav, Kiwix, dotfiles in detached git repo.