Skip to content
Jerzy Wilczek edited this page Oct 6, 2023 · 4 revisions

⚙️ Config

The config system is rather minimal for now.

📁 Config location

jwtop will look for the config folder in 3 places:

  1. If the --config-path command line option is specified, it will look there.
  2. If the JWTOP_CONFIG_DIR environment variable is set, it will treat it's value as the config path.
  3. It will look in ~/.config/jwtop on linux, ~/Library/Application Support/org.jw.jwtop on macos and in C:\\Users\<your username>\AppData\Roaming\jw\jwtop\config on windows (mac and win paths are not tested, so if you can please give some feedback on their correctness)

The config folder should contain a config.toml file and a themes directory.

🔧 config.toml spec

For now, the only key allowed in the config file is the theme key. It's value should be a theme name that corresponds to a file in the themes directory. For example, if you have a config.toml that looks like this:

theme = "gruvbox"

then the theme should be located at themes/gruvbox.toml.

If theme is set to "default" or not set at all, the default theme is used.

🎨 themes spec

A theme specifies hex colors for various elements of the UI.

An example theme that sets all possible colors:

[widget]
frame_color = "#d5c4a1"
title_color = "#ebdbb2"

[plot]
axis_labels_color = "#ebdbb2"
plot_colors = [
    "#8ec07c",
    "#d3869b",
    "#83a598",
]

[bars]
low_usage_color = "#b8bb26"
medium_usage_color = "#fabd2f"
high_usage_color = "#fb4934"

[table]
header_color = "#fe8019"
row_color = "#ebdbb2"
  • frame_color and title_color set the color of the frames and titles of all widgets

  • plot_colors sets the colors of the line plots. This list can be of any reasonable length. If there are more plots than colors in the list, it will be looped.

Any unset values will use the default color for that value, which is usually one of your terminal colors.

The other options seem rather self-explanatory. Feel free to open an issue if something is not clear.

Clone this wiki locally