Configuration
macmon automatically saves your preferences for color, view type, and refresh interval to a configuration file. This ensures that your settings are preserved across sessions.
Configuration File Location
The configuration is stored in a JSON file located at:
~/.config/macmon.json
If the .config directory or the file does not exist, macmon will create them when you first change a setting (e.g., by pressing c or v).
Configuration Options
Here is an example of the macmon.json file's content:
{
"view_type": "Sparkline",
"color": "Green",
"interval": 1000
}
view_type(string): Determines the visualization style for the main metrics."Sparkline": (Default) Shows a small historical graph of the last ~128 samples.-
"Gauge": Shows a compact horizontal bar representing the current percentage. -
color(string): Sets the primary color for UI elements. -
Possible values:
"Green","Yellow","Red","Blue","Magenta","Cyan","Reset". -
interval(number): The refresh interval for metrics, in milliseconds. - Default:
1000.
Modifying Configuration
While you can manually edit this file, it's recommended to change these settings using the interactive keyboard controls within the macmon TUI:
- Press
cto cycle through colors. - Press
vto toggle theview_type. - Press
+or-to adjust theinterval.
Your changes will be saved to the file automatically.