Hey, I’m Darren. I’m a software engineer in Edinburgh, UK. I enjoy working on open-source developer tooling, and occasionally writing about it here.

Goodbye Textualize


After three years of working full-time on Textual, it’s finally time to move on and find a new challenge.

Over the course of three years, I’ve worked with some amazing colleagues, been part of a fantastic community of open-source developers, and had the opportunity to work on the most interesting projects of my career so far. We took Textual from a proof-of-concept to version 1.0 - a fully-featured open-source TUI framework - which can be used to build apps that push the boundaries of what is possible in the terminal. I feel incredibly privileged to have been involved in such a project. Despite no longer working full-time on it, I’ll likely remain active in the community, albeit at a far reduced capacity.

Read more ⟶

Introducing Posting 2.0


Posting is a powerful HTTP client that runs entirely inside your terminal.

Version 2.0 has just arrived, bringing some powerful new features to Posting, including scripting, keymaps, and more!

posting-2

Posting 2.0 - a TUI HTTP client

Pre-request and post-response scripts

A common feature request has been around adding scripting capabilities to Posting. With 2.0, you can now attach Python functions to requests, and have them run before or after the request is sent. All output from these scripts is captured and displayed in the new “Scripts” tab. This makes it easy to see the results of your script executions and troubleshoot any issues.

Read more ⟶

Custom keymaps in Textual


Textual 0.82.0 adds support for keymaps, which make it easy to customise keybindings based on config or user preferences.

Keymaps allow you to swap the keys associated with a Binding at runtime with a single method call.

  • You could switch to a Vim keymap if a user of your app enables “Vim mode”.
  • You could read a keymap from a file on the users drive and swap it in on app startup.
  • You could swap the increment and decrement keys on April 1st!

The possibilities are endless!

Read more ⟶

Copying and pasting in Textual


Terminal emulators are in general quite limited when it comes to copying and pasting. Fortunately, we have a few options when writing Textual apps which allow us to add support for copy and paste. Each has its own trade-offs. Let’s explore these options and look at how we can integrate them into our apps.

App.copy_to_clipboard

Textual’s App class has a method called copy_to_clipboard. Pass a string into it, and it gets copied to the clipboard on the machine the emulator is running on. There is a caveat here: If the terminal doesn’t support the required protocol then nothing will happen!

Read more ⟶

Let's get fractional! Textual layouts with fr units


Fractional units (fr) are a tool in Textual’s CSS system which lets you distribute space between child widgets inside a container in a really intuitive way.

I use them everywhere in my Textual apps, but I get the feeling that they may be a little under-appreciated.

fr units make it easy to implement many common layout patterns, and have some less obvious benefits too!

Let’s explore how fractional units work in Textual, along with some practical examples!

Read more ⟶