This post is mirrored from it's original location on dev.to.
I've been forcing myself to use a barely usable laptop for any couch coding I do because I have a puppy who likes to jump into my lap - regardless of whether there's already something in it.
Usually I'd use a 15" MacBook Pro, but since both I and my employer would be pretty upset if it was damaged I've been using something with a little lower stakes that has been sitting unused on a shelf in my garage for quite a while.
It's a bit of an interesting challenge and has forced me to re-examine some of my tool usage. I started by a minimal install of Debian “bookworm” with the XFCE Desktop Environment which chews through much fewer resources than the default GNOME 43 based environment (although more than LXDE - but there still has to be room for aesthetics).
This is already a bit of a change because when I'm not using the MacBook Pro, I am using my desktop which has Pop!_OS 22.04 installed.
Terminal emulator
I did find that XFCE's terminal emulator was pretty slow, so I installed Alacritty - a lightweight terminal written in Rust.
Alacritty doesn't yet support ligatures, tabs or split panes - so be warned if that's a show stopper for you. It does happily render Nerd Font symbols though. Alacritty is so fast I also decided to make the switch from iTerm2 on my mac.
Shell environment
I've been using oh-my-zsh for years but over time more and more has been added to it (both by me and upstream) resulting in a great - but slow - experience. Running it on a machine with so few resources was definitely not an option.
After a little research I came across starship (also written in Rust) which is a “blazing-fast, and infinitely customizable prompt for any shell”. I deleted almost all of my .zshrc
and replaced it with eval "$(starship init zsh)"
. I also had to manually add hooks for asdf
, direnv
and a couple of other tools that I had been relying on oh-my-zsh plugins for.
The result? Well I'm speechless. I had forgotten what it was like to have a near-instantaneous shell prompt. I've switched my profile on all my machines to starship.
Programming environment
I used to be a pretty heavy Vim user (RIP Bram), but when I started doing a lot of remote pairing with less experienced devs I realised that they were sometimes having trouble following along when I was driving. Their experience was basically "click click click" some text whizzes around the screen.
So I made the switch to Code. I came for the accessibility and stayed for devcontainers, remote development and the language server protocol. Again though, Code is a great tool but is built using web technologies and Electron and when loaded down with a full-suite of extensions it can feel sluggish on the most powerful of machines.
Here comes Lapce; a "Lightning-fast and Powerful Code Editor" written in Rust (are you seeing a theme here?). When they say "lightning-fast" they're not kidding. Despite the website saying it's "pre-alpha" it has a surprisingly full feature set:
- Tree-sitter based syntax highlighting
- Remote development
- Language server protocol
- WASI-based plugin system
What's missing is mainly docs and plugins (and docs on how to write plugins).
The first codebase I opened was a Rust project and it's support for Rust is nothing short of incredible. I guess it would be given that's where it originates. It seemlessly integrated with rust-analyser
, cargo fmt
, etc and felt like a very mature offering.
Sadly, this isn't true for all languages. I spend most of my days working on and with the Ash project in Elixir. Whilst Lapce has syntax highlighting for Elixir there is no language server plugin available yet. There are at least two plugins in development, but given I can't figure out how to install them in my local editor to test them I can't speak to their quality.
I decided I can live without elixir-ls when couching in return for having a usable editor. When the plugin ecosystem and documentation matures I can see myself switching to using Lapce for my primary editor.
Browser
For better or worse, I spend a lot of my time on the web. Having a quick web browser is kind of important, but since I also seem to mostly write web applications I also need one that renders things in a conventional way.
This immediately rules out a bunch of lightweight browser options like lynx or Dillo.
I usually use Firefox for general browsing and Chromium when I need the good dev tools. I think I have to live with having Chromium installed for when I need it, but Firefox is just too weighty for this little machine. I settled on Falkon which is a nice balance between performance and standards. It uses the Chromium renderer under the hood, so webpages usually look how I expect them to. It is thankfully missing some much loved browser "features" such as submitting "http://localhost:4000" to a search engine rather than loading the page.
Summary
Thanks for coming along on this little tour of lightweight dev tools. I hope in my struggles to use a dumb old computer you have found something useful to speed up your computing life.