Skip to content

Menus, Options and Help

Outcome: you can open btop's menu, change a setting in its options and see the change take effect at once, and find any key's meaning in the built-in help without leaving the program.

The menu

Press Esc or m anywhere and the main menu opens over the live screen: the program's name in block letters, its version, and three choices — OPTIONS, HELP, QUIT — moved between with the arrow keys and chosen with Enter. Esc from a sub-screen returns here first, and Esc again returns to the monitor; the lab confused itself once by forgetting the middle stop, and chapter 11 records the symptom (keys that seem to change the wrong thing are often just menu keys).

Options: five tabs of settings

OPTIONS opens a panel with five tabs — general, cpu, mem, net, proc — switched with Tab or their numbers, settings moved between with the arrow keys and changed with Left and Right. Every row explains itself on the right. The general tab, as the lab found it:

   │   [general]          2cpu           3mem           4net           5proc
   ├─────────────────────────────┬──────────────────────────────────────────┤
   │       Color theme 1/2       │ Set color theme.                         │
   │ ←         Default         → │                                          │
   │       Theme background      │ Choose from all theme files in (usually) │
   │             True            │ "/usr/[local/]share/btop/themes" and     │
   │          Truecolor          │ "~/.config/btop/themes".                 │
   │             True            │                                          │
   │          Force tty          │ "Default" for builtin default theme.     │
   │            False            │ "TTY" for builtin 16-color theme.        │
   │           Vim keys          │                                          │
   │            False            │ For theme updates see:                   │
   │        Disable mouse        │ https://github.com/aristocratos/btop     │
   │            False            │                                          │

The lab's one change: with Color theme selected, one press of Right moved Default to TTY — the built-in 16-colour theme — and the whole screen redrew in the plainer palette at once. Options changes are live: no restart, no saving step inside the program. (Where the change is kept is another matter — the config file, chapter 8 — and the lab has the scar to prove the distinction.) The same page holds Shown boxes (the words cpu mem net proc when all four are on), Update ms (2000 as installed), the Presets line chapter 7 decodes, and switches for rounded corners, mouse use, and vim-style keys. The other tabs hold the same kind of thing per box — graph styles, units, which network interface to open on, how processes are collected — and the right-hand column of plain explanation makes browsing them the intended way to learn them.

Notice Color theme 1/2: the lab's copy offered only two themes, Default and TTY, though btop ships with many more. The explanation column gives the reason — theme files live in a themes folder (/usr/local/share/btop/themes when installed, ~/.config/btop/themes for your own), and the lab's unpacked release binary was running away from its folder, so only the two built-in themes were within reach. Installing properly, or copying theme files into the home folder, lengthens the list. Chapter 11 files this under surprises with known causes.

Help: the key list, two pages

HELP (or F1, ?, or h from the main screen) opens two pages of every key the program answers to. The lab's first page, trimmed to the keys this guide uses most:

        Key:        Description:
       Mouse 1      Clicks buttons and selects in process list.
       Esc, m       Toggles main menu.
          p         Cycle view presets forwards.
      shift + p     Cycle view presets backwards.
          1         Toggle CPU box.
          2         Toggle MEM box.
          3         Toggle NET box.
          4         Toggle PROC box.
          5         Toggle GPU box.
        F2, o       Shows options.
      F1, ?, h      Shows this window.
      ctrl + r      Reloads config file from disk.
     q, ctrl + c    Quits program.
        +, -        Add/Subtract 100ms to/from update timer.
      Up, Down      Select in process list.
        Enter       Show detailed information for selected process.

Page two covers the process keys — filtering, tree, signals — which chapters 4 and 5 have already put in context. Two entries deserve underlining here. The mouse is a real input, not a garnish: every button drawn on a box (filter, tree, terminate, the rest) can be clicked, and rows can be selected by clicking — the lab drove btop by keyboard throughout, because a keyboard can be scripted and checked, but a reader at a real terminal may find the mouse quicker. And ctrl + r reloads the config file from disk, which is the handshake between this chapter and chapter 8: edit the file in another window, press ctrl + r, and btop obeys the new text without a restart.

Check: open Options, note your Shown boxes and Update ms; open Help and find the key that reloads the config file. You now hold every control the next two chapters arrange.