Skip to main content
Version: main

btop

Generates a btop theme file — the colours behind the resource monitor's CPU/memory/network/process boxes, gradient meters, temperature scales, and status text. btop is a curses-style TUI for terminals; it reads one .theme file at a time and re-reads it when sent SIGUSR2.

Installation

Built into tinct — nothing to install separately. tinct generate -o btop works out of the box.

Quick start

tinct generate -i image -p ~/Pictures/wallpaper.jpg -o btop

The first time, you also need to point btop at the theme — see Integration.

Generated files

FilePathRole
tinct.theme~/.config/btop/themes/tinct.themebtop theme file. Sets every theme[...] key btop recognises: backgrounds, foregrounds, gradient endpoints for CPU/memory/network/disk graphs, box outlines, and meter backgrounds.

The filename matches --btop.theme-name (default tinct). The filename without .theme is also the value you put into btop's color_theme config key.

Integration

btop loads themes by name from ~/.config/btop/themes/. After the first generate, tell btop to use it — either edit the config:

# ~/.config/btop/btop.conf
color_theme = "tinct"

…or pick it interactively: press p (options menu) → cycle to "tinct" in the theme list → Esc to save.

The theme name is tinct by default; if you used --btop.theme-name=mything then it's "mything" instead.

Reload behaviour

Automatic

After writing the theme file the plugin sends SIGUSR2 to every running btop process (this is the verb declared in Hooks().Reload). btop traps that signal and re-reads its config + active theme, so the colours change live without exiting the TUI.

The reload only applies if color_theme = "tinct" is already set in btop.conf; otherwise btop re-reads the file but keeps using whichever theme it was already on. Use --btop.reload=false to skip the signal.

Manual fallback

If the signal didn't reach btop (it wasn't running at generate time, or you're in a different mount namespace):

pkill -SIGUSR2 -x btop

Or restart the process, or press p in the running TUI and re-select the theme.

Uninstall / revert

  1. Remove the config line: edit ~/.config/btop/btop.conf and either delete color_theme = "tinct" or change it to another theme name (e.g. color_theme = "Default").

  2. Delete the generated file:

    rm ~/.config/btop/themes/tinct.theme
  3. Reload to drop the theme:

    pkill -SIGUSR2 -x btop

    Or restart btop. If color_theme still pointed at tinct you may briefly see a missing-theme warning until you set it to something else.

  4. External state: this plugin only writes to ~/.config/btop/themes/. No further cleanup is required.

Flags

FlagDefaultDescription
--btop.output-dir~/.config/btop/themesOverride the output directory
--btop.theme-nametinctTheme name; written as <name>.theme and used as the color_theme value
--btop.reloadtrueSend SIGUSR2 to running btop instances after writing the theme

Colour role mapping

btop keyTinct roleNotes
main_bgbackgroundTerminal background; leave empty in the template for transparent terminals
main_fgforegroundMain text colour
titleaccent1Box titles
hi_fgaccent2Highlighted shortcut keys
selected_bg / selected_fgaccent1 / onAccent1Selected row in process list
inactive_fgforegroundMutedGreyed-out text
proc_miscaccent3Mini graphs in process box
cpu_box, mem_box, net_box, proc_boxoutlineBox borders
div_lineoutlineVariantDivider line at top of each box
temp_start / temp_mid / temp_endsuccess / warning / dangerTemperature gradient (cool → hot)
cpu_start / cpu_mid / cpu_endaccent1 / accent2 / accent3CPU usage gradient
free_startsuccessMemory: free
cached_startinfoMemory: cached
available_startaccent2Memory: available
used_start / used_mid / used_endaccent1 / warning / dangerMemory: used (low → critical)
download_* / upload_*info/accent1/accent2 and warning/accent3/dangerNetwork throughput gradients
process_start / process_mid / process_endaccent1 / accent2 / accent3Process box graph
meter_bgsurfaceContainerBackground of meter bars

Customising the template

Dump the default template to override it:

tinct plugins templates dump -o btop -l ~/.config/tinct/templates/btop

This writes ~/.config/tinct/templates/btop/tinct.theme.tmpl. Tinct uses your copy in preference to the embedded default.

See the templating reference for available functions.

Troubleshooting

Theme didn't change

Check color_theme is actually set:

grep color_theme ~/.config/btop/btop.conf

If it's not "tinct" (or whatever --btop.theme-name you used), btop is reloading the file but ignoring it. Set it via p in the TUI or by editing the conf.

pkill: SIGUSR2: unknown signal

Some pkill implementations want -USR2 or numeric -12. The plugin uses Go's signal package so this only affects manual reload commands. Try:

pkill -USR2 -x btop

Theme list is empty inside btop

btop only scans ~/.config/btop/themes/ (plus its built-in themes). If tinct.theme is in a different directory (because you set --btop.output-dir), move or symlink it back, or accept that btop won't find it.

Background isn't transparent

main_bg is set to the theme background. To get terminal-transparent btop, override the template and set theme[main_bg]="" (empty string), or edit the generated file in place.

  • neovim — companion theme for the editor often run alongside btop.
  • tmux — tmux colours for users running btop inside a tmux pane.