flow is designed to live in a status bar. Three approaches work:
--tiny— one pre-coloured line, cheapest option.--format— your own layout, optionally fixed width with--width.--json-stream— full data for tools that do their own rendering.
In all three, adding --no-color makes the output plain ASCII, which is what
panels that re-render the string expect.
set -g status-right "#(flow --tiny --no-color)"Fixed width, so the status bar never reflows:
set -g status-right '#(flow --format "{{.Down}} / {{.Up}}" --width 28 --no-color)'modules-right += flow
flow = flow --format '{{.Down}} ↓ {{.Up}} ↑' --no-colorOne shot per poll. (--json-stream never exits, so it is for pipes, not
poll-based modules.)
{
"modules-right": {
"custom/flow": {
"exec": "flow --format '{{.Down}} ↓ {{.Up}} ↑' --no-color",
"interval": 1
}
}
}sketchybar --add item flow right \
--set flow script="flow --format '↓ {{.Down}} ↑ {{.Up}}' --no-color" \
update_freq=2[flow]
command=flow --format 'net ↓{{.Down}} ↑{{.Up}}' --no-color
interval=2--refreshcontrols how often values update; the default is100ms.--interface <name>pins a specific interface, which avoids surprises on machines with many virtual adapters (docker, vboxnet, tailscale).