Skip to content

Commit c5d341a

Browse files
committed
docs: Refactor README configuration section, replacing old examples and command notes with a new default commands list.
1 parent 8ed459b commit c5d341a

1 file changed

Lines changed: 9 additions & 22 deletions

File tree

README.md

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,13 @@ Quit with `q`, `Q`, `Esc`, or `Ctrl+C`.
3232
go run . --version
3333
```
3434

35-
## Config
35+
### Configuration
3636
Perfmon can load a custom tab list from a TOML file. Search order:
3737
1. `PERFMON_CONFIG` env var (full path)
3838
2. `$XDG_CONFIG_HOME/perfmon/config.toml` (or `~/.config/perfmon/config.toml`)
3939
3. `./perfmon.toml`
4040

4141
Example `perfmon.toml`:
42-
```toml
43-
[[tab]]
44-
title = "uptime"
45-
cmd = ["uptime"]
46-
47-
[[tab]]
48-
title = "top"
49-
cmd = ["top", "-b", "-n", "1"]
50-
```
51-
52-
## Command Notes
53-
- Load: `uptime`
54-
- CPU: `vmstat` (fallback `mpstat`)
55-
- Memory: `free -m` (Linux)
56-
- Net: `/proc/net/dev` (Linux) or `netstat -ib` (macOS)
57-
58-
If no configuration file is found, Perfmon falls back to a sensible set of defaults.
59-
60-
### Configuration
61-
You can customize tabs and refresh rates in `perfmon.toml`.
62-
6342
```toml
6443
# Global refresh rate (default: 5s)
6544
global_refresh_interval = "5s"
@@ -74,6 +53,14 @@ cmd = ["top", "-b", "-n", "1"]
7453
refresh_interval = "1s" # Override global rate
7554
```
7655

56+
### Default Commands
57+
If no configuration file is found, Perfmon falls back to a sensible default set:
58+
- **Load**: `uptime`
59+
- **CPU**: `vmstat` (or `mpstat`)
60+
- **Memory**: `free -m` (Linux) or `vm_stat` (macOS)
61+
- **Net**: `/proc/net/dev` (Linux) or `netstat` (macOS)
62+
- **Top**: `top`
63+
7764

7865
## Development
7966

0 commit comments

Comments
 (0)