<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Daniel Whicker</title>
    <subtitle>Write-ups of the automation and home-lab projects I build, what they do, and what they&apos;re good for.</subtitle>
    <link href="https://danielwhicker.com/feed.xml" rel="self"/>
    <link href="https://danielwhicker.com/"/>
    <updated>2026-11-25T01:42:03+00:00</updated>
    <id>https://danielwhicker.com/</id>
    <author><name>Daniel Whicker</name></author>
    
    <entry>
        <title>My arcade cabinet never slept, so I put Home Assistant in charge of it</title>
        <link href="https://danielwhicker.com/2026/11/arcade-cabinet-home-assistant/"/>
        <id>https://danielwhicker.com/2026/11/arcade-cabinet-home-assistant/</id>
        <published>2026-11-24T15:00:00+00:00</published>
        <updated>2026-11-24T15:00:00+00:00</updated>
        <summary>A screen that never blanked, a PC that wouldn&apos;t wake up, and a volume control in another room. Two small tools fixed all three.</summary>
        <content type="html">&lt;p&gt;My arcade cabinet was drawing 47 to 60 watts. All day, every day. That’s 410 to
525 kilowatt-hours a year, because the screen never went to sleep and the display,
CPU and disks ran around the clock.&lt;/p&gt;

&lt;p&gt;The screen saver wasn’t working, and that’s almost certainly my own failing.
LaunchBox and BigBox have a lot of esoteric settings, and I never found the right
combination.&lt;/p&gt;

&lt;p&gt;So I tried letting the computer sleep. When it did, my zero-delay encoder wouldn’t
wake the damn thing back up.&lt;/p&gt;

&lt;p&gt;To add insult to injury, when attract mode started playing sound, I had to walk
over to the cabinet from whatever room I was in to turn it down.&lt;/p&gt;

&lt;h2 id=&quot;what-i-wanted&quot;&gt;What I wanted&lt;/h2&gt;

&lt;p&gt;Schedule everything about it. Shut it down and mute it by voice. Keep it powered
off when I’m traveling, without having to remember to unplug it.&lt;/p&gt;

&lt;p&gt;That’s a Home Assistant job. We’re an Apple household, so it runs alongside
HomeKit, and voice means Siri.&lt;/p&gt;

&lt;h2 id=&quot;ha-arcade-pc-agent&quot;&gt;ha-arcade-pc-agent&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/dewab74/ha-arcade-pc-agent&quot;&gt;ha-arcade-pc-agent&lt;/a&gt; is a small
Windows tray app that talks to Home Assistant over MQTT. Point it at your broker
and the cabinet shows up as a device.&lt;/p&gt;

&lt;p&gt;HASS.Agent exists, but I wanted very specific functionality, and in my setup it
also wanted a certificate revocation list on my private CA. I was too lazy to do
that for one host, so I wrote my own agent, which was a lot more work. Yes, I see
the irony. Mine checks the broker’s certificate against my CA’s PEM file and
doesn’t check revocation. A private CA usually publishes no revocation list anyway.&lt;/p&gt;

&lt;aside class=&quot;card get-it&quot; aria-label=&quot;Get ha-arcade-pc-agent&quot;&gt;
    &lt;p class=&quot;get-it-title&quot;&gt;ha-arcade-pc-agent&lt;/p&gt;
    &lt;p class=&quot;get-it-actions&quot;&gt;
        &lt;a class=&quot;button-primary&quot; href=&quot;https://github.com/dewab74/ha-arcade-pc-agent/releases/latest&quot;&gt;&lt;svg class=&quot;icon&quot; aria-hidden=&quot;true&quot; focusable=&quot;false&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path d=&quot;M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z&quot; /&gt;&lt;path d=&quot;m3.3 7 8.7 5 8.7-5&quot; /&gt;&lt;path d=&quot;M12 22V12&quot; /&gt;&lt;/svg&gt;
&lt;span&gt;Download the installer&lt;/span&gt;&lt;/a&gt;
        &lt;a class=&quot;button-secondary&quot; href=&quot;https://github.com/dewab74/ha-arcade-pc-agent&quot;&gt;&lt;svg class=&quot;icon&quot; aria-hidden=&quot;true&quot; focusable=&quot;false&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path d=&quot;M15 3h6v6&quot; /&gt;&lt;path d=&quot;M10 14 21 3&quot; /&gt;&lt;path d=&quot;M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6&quot; /&gt;&lt;/svg&gt;
&lt;span&gt;Source on GitHub&lt;/span&gt;&lt;/a&gt;
    &lt;/p&gt;
    &lt;p class=&quot;get-it-note text-muted&quot;&gt;Windows 10 or 11, x64. The installer is not code-signed, so SmartScreen may ask you to confirm. Each release publishes checksums.&lt;/p&gt;
&lt;/aside&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Screen on and off.&lt;/strong&gt; It blanks the monitor and leaves the PC running, so
nothing has to wake up.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Volume and mute,&lt;/strong&gt; both ways, within about a second.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Shut down, restart,&lt;/strong&gt; close the emulators, restart BigBox. Every close asks
politely first, so emulators and BigBox save their state.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Health sensors:&lt;/strong&gt; last input, stuck input, last boot, free disk space, pending
reboot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The stuck-input sensor earned its keep. A held button means the cabinet never
looks idle, so the overnight shutdown and the screen timeout quietly stop working.
A stuck button did that to me once. Home Assistant now pings my phone if one stays
held for ten minutes.&lt;/p&gt;

&lt;p&gt;I wanted it reusable, so it grew some options: a tray settings window, settable
names and entity ids, plain MQTT or TLS with a private CA or a self-signed
certificate, and an installer that also runs silently or over SSH.&lt;/p&gt;

&lt;figure class=&quot;figure-narrow&quot;&gt;
&lt;img src=&quot;/assets/img/arcade/agent-tray-menu.png&quot; width=&quot;574&quot; height=&quot;264&quot; alt=&quot;The agent&apos;s tray menu: its version, a line saying it is connected to the broker with
  the host name blacked out, then Settings, Open log, About and Quit.&quot; /&gt;
&lt;figcaption&gt;The tray menu. I&apos;ve blacked out the broker&apos;s name.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure class=&quot;figure-narrow&quot;&gt;
&lt;img src=&quot;/assets/img/arcade/agent-settings.png&quot; width=&quot;788&quot; height=&quot;1372&quot; alt=&quot;The agent&apos;s Settings window. The MQTT broker section has host, port, a Use TLS
  checkbox, a Verify the broker&apos;s certificate checkbox, username, password and CA certificate.
  The Home Assistant section has node id, device name, area and the mute and volume entity ids.
  The This PC section has the LaunchBox folder, an input watcher folder and a NAS share.
  The broker host, username and CA certificate path are blacked out.&quot; /&gt;
&lt;figcaption&gt;The Settings window. I&apos;ve blacked out the broker host, the username and the
CA path.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;launchbox-mqtt&quot;&gt;launchbox-mqtt&lt;/h2&gt;

&lt;p&gt;The agent can’t see inside LaunchBox.
&lt;a href=&quot;https://github.com/dewab74/launchbox-mqtt&quot;&gt;launchbox-mqtt&lt;/a&gt; can. It’s a plugin
that runs inside LaunchBox and BigBox. Enter your broker’s details and a LaunchBox
device shows up in Home Assistant through MQTT discovery.&lt;/p&gt;

&lt;aside class=&quot;card get-it&quot; aria-label=&quot;Get launchbox-mqtt&quot;&gt;
    &lt;p class=&quot;get-it-title&quot;&gt;launchbox-mqtt&lt;/p&gt;
    &lt;p class=&quot;get-it-actions&quot;&gt;
        &lt;a class=&quot;button-primary&quot; href=&quot;https://github.com/dewab74/launchbox-mqtt/releases/latest&quot;&gt;&lt;svg class=&quot;icon&quot; aria-hidden=&quot;true&quot; focusable=&quot;false&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path d=&quot;M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z&quot; /&gt;&lt;path d=&quot;m3.3 7 8.7 5 8.7-5&quot; /&gt;&lt;path d=&quot;M12 22V12&quot; /&gt;&lt;/svg&gt;
&lt;span&gt;Download the installer&lt;/span&gt;&lt;/a&gt;
        &lt;a class=&quot;button-secondary&quot; href=&quot;https://github.com/dewab74/launchbox-mqtt&quot;&gt;&lt;svg class=&quot;icon&quot; aria-hidden=&quot;true&quot; focusable=&quot;false&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path d=&quot;M15 3h6v6&quot; /&gt;&lt;path d=&quot;M10 14 21 3&quot; /&gt;&lt;path d=&quot;M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6&quot; /&gt;&lt;/svg&gt;
&lt;span&gt;Source on GitHub&lt;/span&gt;&lt;/a&gt;
    &lt;/p&gt;
    &lt;p class=&quot;get-it-note text-muted&quot;&gt;LaunchBox or BigBox 14.x on Windows. Close LaunchBox and BigBox first; the installer asks for your LaunchBox folder. It is not code-signed, so SmartScreen may ask you to confirm.&lt;/p&gt;
&lt;/aside&gt;

&lt;p&gt;Why MQTT? Home Assistant dashboards are neat and all, and it’s useful for
automations to know whether LaunchBox or BigBox is actually doing anything. But
MQTT is also a good place to pass things along. Someday I might hang an external
scoreboard marquee off it, or send a house-wide chime when somebody breaks a high
score. I’m not there yet. Maybe when I’m really bored.&lt;/p&gt;

&lt;p&gt;It reports the game being played (title, platform and so on), whether BigBox is
open, in attract mode or locked, and the last session. The device goes unavailable
when LaunchBox exits or the PC loses power. It’s event-driven, so nothing polls. I
looked for a maintained plugin and didn’t find one.&lt;/p&gt;

&lt;p&gt;A few extras are off by default: game artwork, achievements and high scores (the
bit that chime would hang on), and commands to exit the current game or launch one
by its id. Commands take an id and nothing else, never a path or a command line.
It has its own settings window under the Tools menu, and a silent installer.&lt;/p&gt;

&lt;figure class=&quot;figure-narrow&quot;&gt;
&lt;img src=&quot;/assets/img/arcade/launchbox-tools-menu.png&quot; width=&quot;546&quot; height=&quot;812&quot; alt=&quot;LaunchBox&apos;s Tools menu. Below the usual entries, Select Random Game, Export to
  Android and Options, there is a last item, LaunchBox MQTT settings.&quot; /&gt;
&lt;figcaption&gt;The plugin adds one entry to LaunchBox&apos;s Tools menu, at the bottom.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure class=&quot;figure-narrow&quot;&gt;
&lt;img src=&quot;/assets/img/arcade/launchbox-settings.png&quot; width=&quot;1059&quot; height=&quot;1138&quot; alt=&quot;The plugin&apos;s settings window. The Broker section has Publish to MQTT, host, port,
  Use TLS, Verify the broker&apos;s certificate, CA certificate, username and password. The Home
  Assistant section has device name, discovery, prefix and base topic, and checkboxes for
  game artwork, game stats and accepting commands. Test connection, Save and Cancel are at the
  bottom. The host and username are blacked out.&quot; /&gt;
&lt;figcaption&gt;The plugin&apos;s settings window, with the host and username blacked out. Artwork,
stats and commands are the opt-in extras.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;putting-it-together-with-a-plug&quot;&gt;Putting it together with a plug&lt;/h2&gt;

&lt;p&gt;The last piece is a
&lt;a href=&quot;https://link.amazon/B0ahJdwBB&quot; rel=&quot;sponsored noopener&quot;&gt;Third Reality plug&lt;/a&gt;
(affiliate link, details below) on the cabinet’s power. It’s Zigbee, so it reaches
Home Assistant through Zigbee2MQTT, and it reports power and energy. Now I can see
what the cabinet actually draws.&lt;/p&gt;

&lt;p class=&quot;text-muted&quot;&gt;Affiliate link: my wife gets a small commission, at no extra cost
to you. (I&apos;m too lazy to set up my own account.) Her channel is
&lt;a href=&quot;https://www.youtube.com/@KellyWhickerCards&quot; rel=&quot;noopener&quot;&gt;Kelly Whicker Cards&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The cabinet decides when it’s idle. Home Assistant only handles the power.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Overnight, after 30 minutes with no input, the PC closes the emulator and BigBox
and shuts Windows down.&lt;/li&gt;
  &lt;li&gt;Home Assistant cuts the plug once Windows is really gone: the PC has stopped
answering and the plug reads idle-level power, both for two minutes. It never
cuts power while Windows is running, because that’s a hard power-off.&lt;/li&gt;
  &lt;li&gt;At 08:30 it turns the plug back on, and the BIOS boots the cabinet when power
returns.&lt;/li&gt;
  &lt;li&gt;Vacation Mode shuts it down and skips the morning power-on until I’m back. No
more remembering to unplug it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During the day, after 20 minutes of nobody touching the menu, the agent blanks the
screen. A real button press wakes it.&lt;/p&gt;

&lt;p&gt;Apple Home only gets the plug and the mute switch. Shutdown and restart stay in
Home Assistant, because they’re far too easy to hit by accident from a phone.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/assets/img/arcade/ha-dashboard.png&quot; width=&quot;1568&quot; height=&quot;734&quot; alt=&quot;The cabinet&apos;s page on a Home Assistant dashboard. Controls show the screen
  off, mute off and volume at 16 percent. The plug is on and the power tile reads
  12 watts. Health tiles show Windows running, no stuck input, 328 gigabytes of
  disk free and 2.04 kilowatt-hours used this month.&quot; /&gt;
&lt;figcaption&gt;The cabinet&apos;s page on my Home Assistant dashboard, caught idle with
the screen off.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;That 12 W is the cabinet idle with the screen blanked. It used to sit at 47 to 60.&lt;/p&gt;

&lt;h2 id=&quot;trust&quot;&gt;Trust&lt;/h2&gt;

&lt;p&gt;Anything that can shut a PC down over MQTT deserves some suspicion, so I kept it
boring. Commands are a fixed set. Retained MQTT messages are refused, so a stale
“shutdown” can’t replay on reconnect. TLS checks certificates by default. Give each
tool its own MQTT user and restrict who can publish to its topics.&lt;/p&gt;

&lt;h2 id=&quot;where-they-stand&quot;&gt;Where they stand&lt;/h2&gt;

&lt;p&gt;Both are early, and they work on my cabinet.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The plugin has run end to end on LaunchBox/BigBox 14.1.0.5 against Home
Assistant’s Mosquitto broker over TLS.&lt;/li&gt;
  &lt;li&gt;The agent needs Windows 10 or 11 on x64. Neither installer is code-signed, so
SmartScreen may ask you to confirm.&lt;/li&gt;
  &lt;li&gt;Neither is affiliated with or endorsed by Unbroken Software, who make LaunchBox.&lt;/li&gt;
&lt;/ul&gt;
</content>
    </entry>
    
    <entry>
        <title>mping: ping a pile of hosts from one terminal screen</title>
        <link href="https://danielwhicker.com/2026/10/mping-terminal-ping-monitor/"/>
        <id>https://danielwhicker.com/2026/10/mping-terminal-ping-monitor/</id>
        <published>2026-10-13T14:00:00+00:00</published>
        <updated>2026-10-13T14:00:00+00:00</updated>
        <summary>A terminal UI that probes a list of hosts over ICMP, TCP, HTTP or HTTPS and shows what&apos;s up, how fast, and how often it fails.</summary>
        <content type="html">&lt;p&gt;I’m frequently doing VM migrations, host migrations, or other work where I want an
ad-hoc, at-a-glance report on whether what I’m migrating is done, up or down. Or
whether I need to dust off &lt;a href=&quot;https://bifrost.cc/resume.html&quot;&gt;my resume&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So I wrote mping, a terminal UI for watching a bunch of hosts at once. A TUI,
because given the choice between a GUI and a TUI, I’ll take the TUI. Give it a
list and it probes all of them concurrently, then shows each one’s status,
round-trip time, success and failure counts, when it last answered, and the last
error.&lt;/p&gt;

&lt;p&gt;It isn’t limited to ping. Each host can be probed over ICMP, TCP, HTTP or HTTPS, so
the same screen can tell you a router answers, a port is open, and a web page
returns a 200.&lt;/p&gt;

&lt;aside class=&quot;card get-it&quot; aria-label=&quot;Get mping&quot;&gt;
    &lt;p class=&quot;get-it-title&quot;&gt;mping&lt;/p&gt;
    &lt;p class=&quot;get-it-actions&quot;&gt;
        &lt;a class=&quot;button-primary&quot; href=&quot;https://github.com/dewab-org/mping/releases/latest&quot;&gt;&lt;svg class=&quot;icon&quot; aria-hidden=&quot;true&quot; focusable=&quot;false&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path d=&quot;M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z&quot; /&gt;&lt;path d=&quot;m3.3 7 8.7 5 8.7-5&quot; /&gt;&lt;path d=&quot;M12 22V12&quot; /&gt;&lt;/svg&gt;
&lt;span&gt;Download mping&lt;/span&gt;&lt;/a&gt;
        &lt;a class=&quot;button-secondary&quot; href=&quot;https://github.com/dewab-org/mping&quot;&gt;&lt;svg class=&quot;icon&quot; aria-hidden=&quot;true&quot; focusable=&quot;false&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path d=&quot;M15 3h6v6&quot; /&gt;&lt;path d=&quot;M10 14 21 3&quot; /&gt;&lt;path d=&quot;M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6&quot; /&gt;&lt;/svg&gt;
&lt;span&gt;Source on GitHub&lt;/span&gt;&lt;/a&gt;
    &lt;/p&gt;
    &lt;p class=&quot;get-it-note text-muted&quot;&gt;Linux (amd64, arm64) and macOS (Apple silicon). Or use Homebrew, below.&lt;/p&gt;
&lt;/aside&gt;

&lt;figure&gt;
&lt;img src=&quot;/assets/img/mping/demo.gif&quot; width=&quot;1011&quot; height=&quot;567&quot; alt=&quot;A terminal recording of mping. Six hosts show their status and round-trip times, with one
  red row. A dialog opens and two more hosts are typed in, the list grows to eight, and the
  settings dialog opens.&quot; /&gt;
&lt;figcaption&gt;A quick tour: adding hosts, then the settings. The red row is 192.0.2.1, a reserved
documentation address, so it&apos;s always down. You can also
&lt;a href=&quot;/assets/casts/mping-demo.cast&quot;&gt;download the recording&lt;/a&gt; and play it
with &lt;code&gt;asciinema play&lt;/code&gt;.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;using-it&quot;&gt;Using it&lt;/h2&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mping example.com 1.1.1.1
mping example.com tcp:api.example.com:8443 icmp:gateway.example.com
mping https://example.com/health
mping &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; hosts.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Put one host per line in a file, or list them as arguments. Any entry can override
the protocol, like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tcp:host:8443&lt;/code&gt;, or be a URL for an HTTP check.&lt;/p&gt;

&lt;p&gt;Targets aren’t fixed, either. While it’s running, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt; adds hosts and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;d&lt;/code&gt; deletes the
selected one, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;s&lt;/code&gt; opens the settings (protocol, interval, timeout, sort order,
theme). &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;o&lt;/code&gt; cycles the sort and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;q&lt;/code&gt; quits.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/assets/img/mping/main.png&quot; width=&quot;1146&quot; height=&quot;643&quot; alt=&quot;mping&apos;s main screen: a table of hosts with mode, address, round-trip time, status,
  success and failure counts. Six rows are green and one is red.&quot; /&gt;
&lt;figcaption&gt;The main screen. Six hosts answer, and the one that doesn&apos;t is red.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/assets/img/mping/settings.png&quot; width=&quot;1146&quot; height=&quot;643&quot; alt=&quot;mping&apos;s settings dialog over the host table, with ping, sort and display sections: protocol,
  TCP port, ICMP backend, interval, timeout, system args, sort key and direction, theme and
  refresh.&quot; /&gt;
&lt;figcaption&gt;The settings dialog, opened with &lt;code&gt;s&lt;/code&gt;.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;themes&quot;&gt;Themes&lt;/h2&gt;

&lt;p&gt;It ships with nine themes: default, Dracula, Nord, Solarized dark and light, and the
four Catppuccin flavors. A theme is a small text file of colors, or you can define
one inline in the YAML config. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mping --list-themes&lt;/code&gt; shows what it found.&lt;/p&gt;

&lt;div class=&quot;figure-row&quot;&gt;
&lt;figure class=&quot;figure-medium&quot;&gt;
&lt;img src=&quot;/assets/img/mping/mocha.png&quot; width=&quot;1146&quot; height=&quot;643&quot; alt=&quot;mping in the Catppuccin Mocha theme: soft pastel colors on a dark background.&quot; /&gt;
&lt;figcaption&gt;Catppuccin Mocha&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;figure-medium&quot;&gt;
&lt;img src=&quot;/assets/img/mping/nord.png&quot; width=&quot;1146&quot; height=&quot;643&quot; alt=&quot;mping in the Nord theme: muted blue-gray colors on a dark background.&quot; /&gt;
&lt;figcaption&gt;Nord&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/div&gt;

&lt;h2 id=&quot;getting-it&quot;&gt;Getting it&lt;/h2&gt;

&lt;p&gt;Homebrew is the easy way. It builds from source, so it needs Go, which Homebrew
will pull in:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;brew tap dewab-org/custom &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt; brew trust &lt;span class=&quot;nt&quot;&gt;--formula&lt;/span&gt; dewab-org/custom/mping 2&amp;gt;/dev/null &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; brew &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;dewab-org/custom/mping
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or take a tarball from the release page: Linux on amd64 or arm64, and macOS on Apple
silicon. The binaries are statically linked.&lt;/p&gt;

&lt;h2 id=&quot;where-it-stands&quot;&gt;Where it stands&lt;/h2&gt;

&lt;p&gt;The latest release is v0.2.0, from August. There’s no Intel Mac build, and nothing
for Windows.&lt;/p&gt;

&lt;p&gt;There’s also a SwiftUI desktop client, &lt;a href=&quot;https://github.com/dewab-org/mping-mac&quot;&gt;mping-mac&lt;/a&gt;,
in its own repo. It’s new, and it has no release yet.&lt;/p&gt;
</content>
    </entry>
    
    <entry>
        <title>My zsh profile is ridiculously overbuilt</title>
        <link href="https://danielwhicker.com/2026/09/zsh-profile-overbuilt/"/>
        <id>https://danielwhicker.com/2026/09/zsh-profile-overbuilt/</id>
        <published>2026-09-28T14:00:00+00:00</published>
        <updated>2026-09-28T14:00:00+00:00</updated>
        <summary>A multi-platform, context-aware shell profile with far too many tools in it. It works for me. If it works for you, great.</summary>
        <content type="html">&lt;p&gt;Yes, it’s overbuilt. Way overbuilt. Ridiculously so. Ludicrously so.&lt;/p&gt;

&lt;p&gt;Yes, I know oh-my-zsh exists. It’s uneven. Yes, I plagiarized components from it.
Then I revised, refined and rewrote them. Yes, some of this could be done
automagically with fish, but fish isn’t built in everywhere and zsh is. Yes, I could
do some of it with GNU stow, or whatever. This works for me. If it works for you
too, great. If not? ¯\_(ツ)_/¯&lt;/p&gt;

&lt;aside class=&quot;card get-it&quot; aria-label=&quot;Get profile&quot;&gt;
    &lt;p class=&quot;get-it-title&quot;&gt;profile&lt;/p&gt;
    &lt;p class=&quot;get-it-actions&quot;&gt;
        &lt;a class=&quot;button-secondary&quot; href=&quot;https://github.com/dewab-org/profile&quot;&gt;&lt;svg class=&quot;icon&quot; aria-hidden=&quot;true&quot; focusable=&quot;false&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path d=&quot;M15 3h6v6&quot; /&gt;&lt;path d=&quot;M10 14 21 3&quot; /&gt;&lt;path d=&quot;M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6&quot; /&gt;&lt;/svg&gt;
&lt;span&gt;Source on GitHub&lt;/span&gt;&lt;/a&gt;
    &lt;/p&gt;
    &lt;p class=&quot;get-it-note text-muted&quot;&gt;Zsh on macOS and Linux. Clone it and run setup.py, which has a --dry-run.&lt;/p&gt;
&lt;/aside&gt;

&lt;h2 id=&quot;what-i-was-after&quot;&gt;What I was after&lt;/h2&gt;

&lt;p&gt;A shell profile that knows what platform it’s on and behaves. The original goal was
macOS, Linux, Solaris, AIX, BSD, blah, blah, blah. It started out as bash, because
bash was everywhere. It generated its own prompt instead of using starship or
powerline, because reasons.&lt;/p&gt;

&lt;p&gt;The Solaris and AIX support got deprecated out once I stopped working on them and
stopped running into them in the field. Today it’s zsh on macOS and Linux, and it
uses Starship.&lt;/p&gt;

&lt;h2 id=&quot;it-in-use&quot;&gt;It in use&lt;/h2&gt;

&lt;p&gt;Here’s a quick tour in a scratch home directory, so it’s not my real history. It
lists the config, runs &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;repo-status&lt;/code&gt; across a few repos, jumps around with zoxide,
searches history with Atuin, and tab-completes git.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/assets/img/zsh/tour.gif&quot; width=&quot;1034&quot; height=&quot;609&quot; loading=&quot;lazy&quot; alt=&quot;A terminal recording of the profile in use. The prompt shows the user, host, directory
  and git status. The tour lists the config directory, runs repo-status across four repos, jumps
  between directories with zoxide, opens Atuin&apos;s history search and tab-completes a git command.&quot; /&gt;
&lt;figcaption&gt;The demo repos are made up. You can also
&lt;a href=&quot;/assets/casts/zsh-tour.cast&quot;&gt;download the recording&lt;/a&gt; and
play it with &lt;code&gt;asciinema play&lt;/code&gt;.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;where-things-go&quot;&gt;Where things go&lt;/h2&gt;

&lt;p&gt;Here’s how the repo is laid out. Most of the logic is in the order things load.&lt;/p&gt;

&lt;figure&gt;
&lt;picture&gt;
&lt;source media=&quot;(prefers-color-scheme: dark)&quot; srcset=&quot;/assets/img/zsh/tree-dark.svg&quot; /&gt;
&lt;img src=&quot;/assets/img/zsh/tree-light.svg&quot; width=&quot;614&quot; height=&quot;580&quot; alt=&quot;A folder diagram of the profile repo. At the top are setup.py, manifest.json, a bin folder
  and a tools folder with its own installer and manifest. Under config, the zsh folder holds
  .zshenv, .zshrc and zshrc.d, which has global, platform, applications, functions and scripts
  folders. Other config folders such as atuin and nvim sit beside it.&quot; /&gt;
&lt;/picture&gt;
&lt;figcaption&gt;The profile repo, drawn with Mermaid&apos;s tree view.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.zshenv&lt;/code&gt; runs for every shell.&lt;/strong&gt; It sets the XDG paths, creates the directories,
points &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ZDOTDIR&lt;/code&gt; at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/zsh&lt;/code&gt;, and resets &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PATH&lt;/code&gt;. A non-interactive shell gets
the path and nothing else, so scripts stay fast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.zshrc&lt;/code&gt; is the interactive loader.&lt;/strong&gt; History lives in the XDG state directory.
Completion is cached and rebuilt once a day. The helper functions get autoloaded. Then
it sources three groups of files, in this order:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;global/&lt;/code&gt;&lt;/strong&gt; is for everywhere. It picks the prompt. Starship is the default, and
Powerlevel10k is still there if I want it. So is the original prompt I generated
myself.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;platform/&lt;/code&gt;&lt;/strong&gt; has one file per operating system, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;darwin.zshrc&lt;/code&gt; and
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;linux.zshrc&lt;/code&gt;. Anything that only makes sense on one OS goes here.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;applications/&lt;/code&gt;&lt;/strong&gt; has one file per tool, 58 at the moment. They load in
alphabetical order, so the names matter. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;00_brew&lt;/code&gt; goes first so Homebrew is on the
path. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zz-carapace&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zz-selections&lt;/code&gt; go last, so the final preferences get
decided after every integration has loaded.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;functions/&lt;/code&gt;&lt;/strong&gt; holds autoloaded helpers, including the guards below. &lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scripts/&lt;/code&gt;&lt;/strong&gt;
holds support scripts, like the iTerm2 check.&lt;/p&gt;

&lt;p&gt;The profile has a few small helpers of its own, like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;is-executable&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;is-directory&lt;/code&gt;
and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;is-readable&lt;/code&gt;. They’re plumbing for the profile itself, not something I type.
This is the guard every application file starts with, using one of them. If the tool
isn’t there, the file quietly does nothing:&lt;/p&gt;

&lt;div class=&quot;language-zsh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;is-executable example &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return

&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;EXAMPLE_CONFIG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;XDG_CONFIG_HOME&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/example/config&quot;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;alias &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;ex&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;example&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That’s how the same profile runs on a laptop with everything installed and on a bare
server with almost nothing. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zz-selections&lt;/code&gt; handles the overlap. History uses Atuin
when it’s there and falls back to fzf when it isn’t.&lt;/p&gt;

&lt;h2 id=&quot;the-tools&quot;&gt;The tools&lt;/h2&gt;

&lt;p&gt;I use a lot of tools. Some of them overlap, and some are redundant. I don’t need them
all on every platform, which is why every integration checks first.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Tool&lt;/th&gt;
      &lt;th&gt;What it does here&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Starship&lt;/td&gt;
      &lt;td&gt;The prompt, in Catppuccin Mocha. The hostname changes color over SSH so I know which box I’m on. It reads the hostname from environment variables set once, because spawning a command for it on every prompt was slow.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Atuin&lt;/td&gt;
      &lt;td&gt;Shell history in a searchable database that knows the directory and the exit status. Ctrl-R and the up arrow use it.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;zoxide&lt;/td&gt;
      &lt;td&gt;Replaces &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt; with ranked jumps that learn where I go. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;z web&lt;/code&gt; and I’m there.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;fzf, fd, ripgrep&lt;/td&gt;
      &lt;td&gt;Fuzzy finding for files, history and completion, over fast file and text search.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Carapace&lt;/td&gt;
      &lt;td&gt;Completions for tools that don’t ship a good completer. Native zsh completers win where they exist, and Carapace fills the gaps.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;fzf-tab&lt;/td&gt;
      &lt;td&gt;Puts the completion menu in fzf.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;eza, bat, vivid&lt;/td&gt;
      &lt;td&gt;A better &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ls&lt;/code&gt;, a better &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cat&lt;/code&gt;, and the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ls&lt;/code&gt; colors.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;jq, yq, fx, jless, xh, glow&lt;/td&gt;
      &lt;td&gt;JSON and YAML tools, a JSON pager, an HTTP client and a Markdown renderer.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;direnv, assh&lt;/td&gt;
      &lt;td&gt;Per-directory environments, and a wrapper that adds inheritance and gateways to ssh config.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;kubectl, kubecolor, k9s, helm, helmfile, kubectx, kubens&lt;/td&gt;
      &lt;td&gt;Kubernetes, in an opt-in group. Tanzu and Carvel are another.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;gh, delta, lazygit, gitleaks&lt;/td&gt;
      &lt;td&gt;Git, and secret scanning.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1Password CLI, Vault, step, Trivy, Grype&lt;/td&gt;
      &lt;td&gt;Secrets, certificates and scanners.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;tmux, Vim, Neovim&lt;/td&gt;
      &lt;td&gt;Multiplexing and editors. Neovim has Catppuccin, LSP and format on save.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;I also keep a few &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;repo-*&lt;/code&gt; scripts for working across many repos: status, GitHub
Actions results, parallel fetch, safe pulls, and a branch audit. Here’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;repo-status&lt;/code&gt;
in the tour above, showing a clean repo, a dirty one, one ahead and one behind.&lt;/p&gt;

&lt;h2 id=&quot;how-fast-is-it&quot;&gt;How fast is it&lt;/h2&gt;

&lt;p&gt;Not very. I timed &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zsh -i -c exit&lt;/code&gt;, a full interactive startup, on an M1 Max running
macOS with zsh 5.9. Each shell ran under a real pty, after a few warm-up runs. Times
are in milliseconds.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Setup&lt;/th&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;Median&lt;/th&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;Mean&lt;/th&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;Min&lt;/th&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;Max&lt;/th&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;Runs&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Bare zsh (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zsh -f&lt;/code&gt;)&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;8&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;9&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;7&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;12&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;40&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;The profile, scratch home from the tour&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;434&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;457&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;391&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;711&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;40&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;The profile, my real home&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;359&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;359&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;333&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;391&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;20&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The scratch home is slower than my real one. I haven’t chased down why.&lt;/p&gt;

&lt;p&gt;The profile has a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ZPROF&lt;/code&gt; switch that turns on zsh’s profiler. These are the biggest
costs it reports, again from the scratch home:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Function&lt;/th&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;Calls&lt;/th&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;Total (ms)&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Plugin loader&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;4&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;97.8&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;compdef&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;305&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;13.5&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;compinit&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;9.5&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;is-executable&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;74&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;6.9&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;is-supported&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;4.3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_zsh_highlight_bind_widgets&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;3.3&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Plugins are the biggest single cost, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;compinit&lt;/code&gt; is cheap because it only rebuilds
once a day. A trace of the whole startup points the same way: the completion setup
and the plugin loaders take the most time.&lt;/p&gt;

&lt;p&gt;Several tools also generate their zsh integration when the shell starts. This is
what each one costs to print its init code, from 40 runs:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Tool&lt;/th&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;Median (ms)&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Atuin&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;12.2&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Carapace&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;10.5&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;direnv&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;7.6&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Starship&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;7.4&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;fzf&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;4.4&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;zoxide&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;3.3&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;That’s about 45 ms for all six.&lt;/p&gt;

&lt;h2 id=&quot;two-installers&quot;&gt;Two installers&lt;/h2&gt;

&lt;p&gt;There are two, both in Python, and each one is driven by its own JSON manifest.&lt;/p&gt;

&lt;h3 id=&quot;the-dotfiles&quot;&gt;The dotfiles&lt;/h3&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setup.py&lt;/code&gt; reads &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;manifest.json&lt;/code&gt; and does three things. You can run it with
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--dry-run&lt;/code&gt; first.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/assets/img/zsh/installer-setup.png&quot; width=&quot;1172&quot; height=&quot;762&quot; alt=&quot;Terminal output of python3 setup.py --dry-run on an empty home directory. Each line starts
  with dry-run and says it would create a directory, copy a file, or create a symlink from a
  folder in the home config directory into the profile repo.&quot; /&gt;
&lt;figcaption&gt;&lt;code&gt;setup.py --dry-run&lt;/code&gt; against an empty home directory.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;directories&lt;/code&gt;&lt;/strong&gt; are created with a mode. There are two of them, the plugin
directory and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config&lt;/code&gt;, both private.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;files&lt;/code&gt;&lt;/strong&gt; are 34 entries, each with a source, a target and a type. A &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;link&lt;/code&gt; is a
symlink back into the repo, which is what keeps the config tracked. A &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;copy&lt;/code&gt; is for
files that shouldn’t be linked. Targets can use variables like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;${XDG_CONFIG_HOME}&lt;/code&gt;,
and a couple of entries carry an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;os&lt;/code&gt; filter, like the tlrc config that only makes
sense on macOS.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gitrepos&lt;/code&gt;&lt;/strong&gt; are 24 plugins to clone: zsh plugins, Neovim plugins and Vim
plugins. Almost all of them are shallow clones, and one is pinned to a stable branch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a target already exists, it’s skipped. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--force&lt;/code&gt; replaces existing links, and a
copied file is kept as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.orig&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&quot;the-tools-1&quot;&gt;The tools&lt;/h3&gt;

&lt;p&gt;The other installer, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tools/install.py&lt;/code&gt;, reads its own manifest, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tools/manifest.json&lt;/code&gt;.
It installs my minimal set of tools, from releases or brew, into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.local/bin&lt;/code&gt;. I
wrote it so I could get a useful, populated tool chain even in more restricted
environments.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/assets/img/zsh/installer-groups.png&quot; width=&quot;1172&quot; height=&quot;212&quot; alt=&quot;Terminal output of tools/install.py --groups. Six groups are listed with their tools:
  general is the default with twenty tools, and git, docker, k8s, security and tanzu are opt-in.&quot; /&gt;
&lt;figcaption&gt;The groups. Only &lt;code&gt;general&lt;/code&gt; installs by default.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Tools are organized into groups. Only the group marked &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;default&lt;/code&gt; installs, which is
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;general&lt;/code&gt;. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;+k8s&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;+tanzu&lt;/code&gt; opt in to more, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-k8s&lt;/code&gt; deselects a group and removes
what the installer put there.&lt;/p&gt;

&lt;p&gt;Each tool is a small entry:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;repo&lt;/code&gt;&lt;/strong&gt; is a GitHub project. It always resolves the latest release, anonymously,
so there’s no token.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;match&lt;/code&gt;&lt;/strong&gt; is a regex per operating system, applied to the release’s file names.
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{arch}&lt;/code&gt; expands to whatever names the machine’s architecture goes by. A tool with
no match for the current OS is skipped with a notice.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew&lt;/code&gt;&lt;/strong&gt; overrides the Homebrew formula name, or turns brew off for that tool.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;note&lt;/code&gt;&lt;/strong&gt; explains the oddities. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;eza&lt;/code&gt; only publishes Linux binaries, so on macOS
it comes from Homebrew. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tldr&lt;/code&gt; is two different clients, tealdeer on Linux and tlrc
on macOS, each with its own config.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On macOS it prefers Homebrew formulae and symlinks them into place. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--no-brew&lt;/code&gt; always
fetches binaries, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--prefer-binary&lt;/code&gt; flips the preference.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/assets/img/zsh/installer-plan.png&quot; width=&quot;1172&quot; height=&quot;590&quot; alt=&quot;Terminal output of tools/install.py --list on an Apple silicon Mac. It reports the platform,
  the install directory and the method, brew with a binary fallback, then lists each tool in the
  general group with the way it would be installed and the version already installed.&quot; /&gt;
&lt;figcaption&gt;&lt;code&gt;--list&lt;/code&gt; shows the plan before it does anything. This is a Mac with
Homebrew, so it would use brew, and everything here is already installed.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;There’s also a controller mode. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--cache-dir&lt;/code&gt; with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--for linux/amd64&lt;/code&gt; downloads the
binaries for another platform into a cache instead of installing them, which is handy
for a box that can’t fetch things itself.&lt;/p&gt;

&lt;h2 id=&quot;where-it-stands&quot;&gt;Where it stands&lt;/h2&gt;

&lt;p&gt;It targets macOS and Linux, on both amd64 and arm64. It’s a personal configuration,
so expect to read it before you run it.&lt;/p&gt;
</content>
    </entry>
    
</feed>
