Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 1.47 KB

File metadata and controls

67 lines (49 loc) · 1.47 KB

status bar integrations

flow is designed to live in a status bar. Three approaches work:

  1. --tiny — one pre-coloured line, cheapest option.
  2. --format — your own layout, optionally fixed width with --width.
  3. --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.

tmux

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)'

polybar

modules-right += flow
flow = flow --format '{{.Down}} ↓  {{.Up}} ↑' --no-color

One shot per poll. (--json-stream never exits, so it is for pipes, not poll-based modules.)

waybar

{
  "modules-right": {
    "custom/flow": {
      "exec": "flow --format '{{.Down}} ↓ {{.Up}} ↑' --no-color",
      "interval": 1
    }
  }
}

sketchybar

sketchybar --add item flow right \
  --set flow script="flow --format '↓ {{.Down}}  ↑ {{.Up}}' --no-color" \
               update_freq=2

i3blocks

[flow]
command=flow --format 'net ↓{{.Down}} ↑{{.Up}}' --no-color
interval=2

Notes

  • --refresh controls how often values update; the default is 100ms.
  • --interface <name> pins a specific interface, which avoids surprises on machines with many virtual adapters (docker, vboxnet, tailscale).