fnstrip

Your Touch Bar,
your buttons.

fnstrip is a Touch Bar renderer for T1 MacBook Pros on T1Bridge. It keeps Esc, the F-keys, brightness, volume and media, and adds buttons that run your own commands, live meters, and the camera and mic, right on the strip.

Enjoy your old MacBook's Touch Bar again, on Linux. fnstrip is for the Intel MacBook Pros of 2016 and 2017, the ones with Apple's T1 chip (for other MacBook Touch Bars, see other Macs below). It's a free hobby project, made for the fun of it: no company, no ads, nothing to buy, nothing collected.

Install ↓ The bar below works: drag, tap, double-tap fn, change the theme.

This browser can't run the live bar: it needs WebAssembly, in browsers from 2021 on (Safari 15, Chrome and Edge 91, Firefox 89). Here's a recording; the rest of the page, the config builder included, works as usual.

 

Theme

Double-tap fn (or F) to see the theme on your own buttons and live meters.

Best on a computer screen (or, of course, the laptop with the Touch Bar): the real bar is 36 times wider than it is tall.

· Drawn live in your browser by fnstrip's own code (compiled to WebAssembly), so it looks exactly like the real bar. The meters show sample data here (the battery is real where your browser shares it). Camera and mic stay in this tab.

What's on the strip

The keys you had

Esc, F1–F12 on fn, media keys. Nothing lost from T1Bridge's own bar.

Sliders that follow you

Brightness, keyboard light and volume show their level and track your finger. Tap the icons to mute or turn the keyboard light off.

Your own buttons

Any command, one tap away, lit while it's on: VPN, do-not-disturb, a dev server, a backup.

Live meters

CPU, temperature, fans, memory, disk, network and battery, with their history already there when you look.

Music you can see

Play/pause lights up while something plays, with a live spectrum of what you're hearing.

Camera and mic

See your camera's picture and your mic's sound on their buttons, so you know at a glance when they're live.

Themes

Default, pastel, mono or rainbow, across the whole bar, meters included. Any colour can be changed on top.

Safe to try

A typo in the config costs only that line, not your setup; if fnstrip stops, T1Bridge's own bar comes back.

See it on the bar

Recorded from the renderer's own drawing code, at the bar's own shape.

Controls. Esc, sliders for display brightness, keyboard backlight and volume that follow your finger, and media keys. Tap the speaker to mute, or the keyboard icon to turn the backlight off and on.
The three rows, as Fn changes them. The controls; Esc and F1–F12 while Fn is held (prefer the F-keys first? one setting swaps them); and your extras row after a double-tap.
Extras. Double-tap Fn; it stays until the next Fn press. Your own toggles (lit while they're on), and live CPU, temperature, fan, memory, disk, network and battery graphs. A lit camera shows its picture, a lit mic a spectrum, a lit VPN its traffic. (Sample data.)
A proper hello. A short light show when the renderer starts. A touch or Fn skips it, and startup_animation = "off" turns it off.
Test screen. Triple-tap Fn and hold, with debug_gestures = "on": full-colour animations with frame rate, render time and CPU, plus live audio spectra and the camera. Quad-tap Fn steps through the themes.

Wear it your way

Four themes, each across the whole bar: buttons, sliders, meters and spectra. Drawn here by the same code as the bar above; click one to try it up there.

The four themes, each with its controls and extras rows

One line picks a theme. Mono is greys all the way across, camera included; pastel and rainbow give every button its own colour, and its meter follows it.

A [colors] section changes any single colour on top: your own "on" colour, a different background, your team's colours.

Colours: background, plate, pressed, label, dim, lit, lit_pressed, fill, muted.

theme = "mono"

[colors]
lit   = "#c0392b"   # "on" buttons in red
label = "#f5e6c8"   # warm white labels

Make it yours

The builder is made for the computer with the Touch Bar: pick your buttons there, download the config, and drop it straight into ~/.config/fnstrip/. On a phone it's cramped, and the file would land on the wrong machine anyway.

Best done on the laptop with the Touch Bar: build your row here, download the config, and drop it into place.

  1. Pick your buttons, or start from a layout. They go live on the bar above (double-tap fn).
  2. Arrange them: drag along your row, or use ‹ ›. Toggles fill in from the left, meters from the right, as on the bar.
  3. Download the config, save it as ~/.config/fnstrip/config.toml, and restart the service.

Everything you change here goes live on the bar at the top: your buttons, their order, the theme, the colours, even what the toggles run. Try your row there before you download it.

Start from
Fine-tune colours as the theme

Change any colour on top of the theme; the bar above and the preview below follow, and the config gets a [colors] section. On pastel and rainbow, button colours set the brightness and each button keeps its own hue.

Your extras row, as the bar will draw it. Drag a button along it to move it.

Any command, any toggle

A toggle is an icon, a command to run when tapped, and an optional status command that lights it while it's on, so any toggle can drive anything you can run from a shell: do-not-disturb, keep-awake, night light, a backup, a dev server. More ready-made commands are in the reference.

Commands run with sh -c as you, so treat the file like a shell script. A mistake in the config costs only its own line, and if fnstrip ever exits, T1Bridge's own bar comes back.

~/.config/fnstrip/config.toml

        

Install

Four steps, about five minutes once T1Bridge works. Nothing runs as root, and every step can be undone.

  1. Get T1Bridge working

    fnstrip draws the bar; T1Bridge talks to the hardware. Install it first and check its own bar shows up.

    You also need Rust 1.88 or newer to build, and optionally brightnessctl (brightness sliders), PipeWire tools (mic and speaker spectra) and ffmpeg (camera).

  2. Build it and point T1Bridge at it

    Get the source, then, in it:

    terminal
    cargo build --release
    install -Dm755 target/release/fnstrip ~/.local/bin/fnstrip
    mkdir -p ~/.config/t1bridge
    ln -sfn ~/.local/bin/fnstrip ~/.config/t1bridge/renderer
    systemctl --user restart t1-touchbar.service

    The link is T1Bridge's documented way to choose a renderer. fnstrip runs as you, as an ordinary process.

  3. Volume and media optional

    The volume slider, mute and media keys go through a T1Bridge desktop provider. To see whether you already have one, this prints its path, or nothing if there's none:

    terminal
    systemctl --user show -p Environment t1-touchbar.service | grep -o 'T1BRIDGE_DESKTOP_PROVIDER=[^ ]*'

    If there's none, use the small one that comes with fnstrip (it needs wpctl and busctl):

    terminal
    install -Dm755 contrib/desktop-provider/fnstrip-desktop-provider ~/.local/bin/
    mkdir -p ~/.config/systemd/user/t1-touchbar.service.d
    printf '[Service]\nEnvironment=T1BRIDGE_DESKTOP_PROVIDER=%%h/.local/bin/fnstrip-desktop-provider\n' \
      > ~/.config/systemd/user/t1-touchbar.service.d/fnstrip-provider.conf
    systemctl --user daemon-reload
    systemctl --user restart t1-touchbar.service
  4. Make it yours optional

    Without a config you get the built-in default: the controls, the F-keys, and an extras row with a mic toggle and CPU, memory, disk, network and battery meters. Build one with the builder above, or start from config/default.toml, which explains every setting. Save it as ~/.config/fnstrip/config.toml and restart the service.

Changed your mind? Two commands give you T1Bridge's own bar back: rm ~/.config/t1bridge/renderer and systemctl --user restart t1-touchbar.service. If fnstrip ever fails to start or exits, T1Bridge falls back to its own bar by itself.

Reference

Everything on one page. The same details live in the README and in config/default.toml.

Touches and Fn

Do thisAnd
Tap a buttonIt does its thing: a key, a media command, or your own command.
Drag on a sliderThe level follows your finger, anywhere along the slider.
Tap the speaker iconMute and unmute.
Tap the keyboard iconBacklight off, then back on to the level it had.
Hold fnEsc and F1–F12 (or the controls, with default_row = "function").
Double-tap fnYour extras row. It stays until the next fn press.
Triple-tap fn and holdThe test screen: animations with frame rate, render time and CPU. With debug_gestures = "on".
Quad-tap fnThe next theme, until fnstrip restarts. With debug_gestures = "on".
Touch, or press fn, during the startup animationSkips it.

The config file

A small subset of TOML at ~/.config/fnstrip/config.toml. Values are quoted strings; on/off settings also take true/false. A mistake costs only its own line: it's logged with its line number in journalctl --user -u t1-touchbar.service and skipped, and the rest applies. Settings are only ever added, so your config keeps working on newer versions.

SettingValuesWhat it does
default_row"controls", "function"The row shown with fn up; the other one shows while fn is held.
startup_animation"on", "off"The light show when the renderer starts.
debug_gestures"off", "on"Lets the test screen (triple-tap fn and hold) and theme switching (quad-tap fn) through. Off by default.
temperature_unit"c", "f"The temperature meter in °C (the default) or °F.
theme"default", "pastel", "mono", "rainbow"The colours of the whole bar, meters included.
[colors]background, plate, pressed, label, dim, lit, lit_pressed, fill, muted = "#rrggbb"Changes single colours of the theme.
[[extras]]up to 10One button of the extras row, with the keys below.
 icontoggles: camera, mic, vpn; meters: cpu, mem, disk, net, battery, temp, fanToggles fill in from the left after Esc, meters from the right end.
 commanda shell commandRuns with sh -c when tapped (optional for meters).
 statusa shell commandLights the button while it exits 0. Checked every second while the row shows, and after a tap.
 interfacee.g. "wg0"For vpn and net: which network interface to graph.

Any VPN

fnstrip reads no output from your VPN: command toggles it (its output is ignored), status says whether it's up (exit code 0 = lit), and interface names its network interface for the traffic graph (ip link lists them).

VPNstatusinterface
WireGuard (wg-quick)test -e /sys/class/net/wg0wg0
NetworkManager (OpenVPN, WireGuard, …)nmcli -t -f NAME connection show --active | grep -qx Worktun0, or the connection's own name
Tailscaletailscale status >/dev/nulltailscale0

The matching toggle commands are in config/default.toml. wg-quick needs root; NetworkManager can bring WireGuard up and down as you.

Fitting the commands to your setup

Toggle commands depend on your distribution and desktop. The built-in mic button uses PipeWire's wpctl; here are common swaps. Any toggle icon can run any of them. Try a command in a terminal first: if it works there, it works on the bar, and the status command must exit 0 exactly when the button should be lit (echo $? shows it).

Buttoncommandstatus
Mic mute, PipeWirewpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle! wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep -q MUTED
Mic mute, PulseAudiopactl set-source-mute @DEFAULT_SOURCE@ toggleLC_ALL=C pactl get-source-mute @DEFAULT_SOURCE@ | grep -q 'Mute: no'
Do not disturb, makomakoctl mode -t do-not-disturbmakoctl mode | grep -q do-not-disturb
Do not disturb, dunstdunstctl set-paused toggledunstctl is-paused | grep -q true
Do not disturb, SwayNCswaync-client -dswaync-client -D | grep -q true

The volume slider and media keys go through the desktop provider instead; the one in contrib/ uses wpctl and busctl, so on PulseAudio swap its wpctl lines for pactl ones.

When something's off

You seeTry
T1Bridge's own bar, not fnstripCheck the link (ls -l ~/.config/t1bridge/renderer) and the log: journalctl --user -u t1-touchbar.service -b.
A button or setting is missingIts line has a mistake: the log names the line and says what's wrong.
Volume or media do nothingSet up a desktop provider (install step 3). Media keys need a player that supports MPRIS, which most do.
No brightness slidersInstall brightnessctl.
The camera button stays darkIt shows the picture from the webcam service in contrib/t1-webcam.
Something elseCreate $XDG_RUNTIME_DIR/fnstrip-record: fnstrip then logs events and keeps every frame, so you can replay what happened.

Light on your laptop

The renderer only draws when something changes, and the meters read a few small files from /proc and /sys four times a second. They keep doing so in the background, so the extras row opens on full graphs, but only one plate's width of history is kept, in memory.

Whether music is playing comes from a single listener on the session bus that wakes only when a player changes state.

Measured on a 15″ 2016 MacBook Pro with the screen on.

Bar showingCPU, one core
Controls, nothing playingabout 2%
Music playing, spectrum on play/pauseabout 4%

Plus the desktop provider's once-a-second status check, which depends on the provider.

Your machine, your business

fnstrip runs as you: no root, no setuid. Besides the commands in your config, it starts only busctl, dbus-monitor, pw-record, ffmpeg, brightnessctl, systemctl and date, each without a shell.

The mic and speaker spectra and the camera picture run only while their button is lit (or music plays). They're analysed in memory and never saved or sent anywhere.

Touch ID stays entirely T1Bridge's: fnstrip only reads its state file to draw the prompt.

Treat the config like a shell script. Button commands run as you, so whoever can edit config.toml can run commands as you. Read any config you didn't write before using it, including one from this page once you've changed it.

This page: no cookies, no analytics, no trackers, fonts served from here. The camera and mic demos stay in your browser tab.

Questions

Which Macs does it work on?

MacBook Pros with a T1 chip and a Touch Bar: the 2016 and 2017 models (MacBookPro13,2, 13,3, 14,2 and 14,3), wherever T1Bridge runs. It's tested on a 15″ 2016 so far; reports from the others are welcome.

I have a T2 Intel Mac, or an M1 or M2 MacBook Pro.

Those Touch Bars work differently. Use tiny-dfr, from the Asahi Linux project: it covers the T2 models and the Apple Silicon MacBook Pros with a Touch Bar (the 13″ M1 and M2; later Macs dropped it).

Does it change how T1Bridge or Touch ID work?

No. fnstrip replaces only the drawing part, through T1Bridge's documented renderer link. The hardware, the fingerprint sensor and its authentication stay T1Bridge's, and its own bar comes back the moment fnstrip stops.

Can apps put their own buttons on the bar?

Not on Linux: there's no system-wide way for apps to publish Touch Bar buttons, as there is on macOS. Instead, you choose the buttons, and each one can run any command, so it can drive any app that has a command line.

Will the meters work on my Mac?

Very likely: the 2016 and 2017 Touch Bar MacBook Pros share the same kinds of parts, and fnstrip finds each sensor rather than assuming where it is. CPU, memory, disk and network come from the kernel and work everywhere. Temperature reads the CPU package sensor (coretemp), fans Apple's SMC (applesmc), and the battery the standard power-supply interface. If a sensor's driver isn't loaded, that meter stays empty, the log says which driver it looked for, and it looks again every 30 seconds. The net meter counts your real network devices, not the T1's own link to the Mac.

My distribution does things differently (PulseAudio, dunst, …).

The keys, sliders and meters don't depend on it. Your own buttons are shell commands, so they adapt: see fitting the commands to your setup for PulseAudio, mako, dunst and SwayNC versions, and any VPN for WireGuard, NetworkManager and Tailscale.

Can I add my own icons?

Not yet: the icons come from the set shown in the builder, but the commands behind them can be anything. Icons from files are an idea for later.

Will it hurt my battery?

Barely: about 2% of one core with the screen on and nothing playing. See the numbers.

Something broke. What now?

Remove the link and restart the service (above), and you're back on T1Bridge's bar. Then the reference and the log usually say why.

Free, open, and honest

MIT licensed, free to use, change and share. The code, the icons it draws with, and the credits for everything it builds on are in the repository.

Built with AI, by a human. fnstrip was written with substantial help from Claude, an AI coding assistant, under the direction of its author, who decided what it should do and tried it out on a real 2016 MacBook Pro. Every change is checked by automated tests too. AI made the code quick to write; it doesn't make it perfect. Read it, question it, and report what's wrong.

Status: beta. Tested on one machine with T1Bridge v0.1.12. Expect rough edges, and tell us about them.

Standing on

Not affiliated with or endorsed by Apple or the T1Bridge project. “Touch Bar” is a trademark of Apple Inc.