mirror of
https://codeberg.org/frosty/modbot.git
synced 2024-09-19 03:36:35 -04:00
update example config with a friendlier one
This commit is contained in:
parent
9ec3e94ae5
commit
faf4265f70
25
README.md
25
README.md
|
@ -25,31 +25,30 @@ Usage of modbot:
|
|||
|
||||
```go
|
||||
var (
|
||||
delim = "] ["
|
||||
prefix = "["
|
||||
suffix = "]"
|
||||
delim = []byte("] [")
|
||||
prefix = []byte("[")
|
||||
suffix = []byte("]")
|
||||
)
|
||||
|
||||
var modules = []Module{
|
||||
{
|
||||
Func: readers.ReadExec("statusbar cpu"),
|
||||
Func: readers.ReadCpuUsage(),
|
||||
Interval: 5 * time.Second,
|
||||
Template: `CPU {{printf "%.0f" .UsagePercent}}%`,
|
||||
},
|
||||
{
|
||||
Func: readers.ReadExec("statusbar volume"),
|
||||
Signal: 1,
|
||||
},
|
||||
{
|
||||
Func: readers.ReadExec("statusbar battery"),
|
||||
Func: readers.ReadBattery("BAT1"),
|
||||
Interval: 60 * time.Second,
|
||||
Template: "BAT {{.Capacity}}%",
|
||||
},
|
||||
{
|
||||
Func: readers.ReadExec("statusbar date"),
|
||||
Func: readers.ReadDate("15:04:05"),
|
||||
Interval: 1 * time.Second,
|
||||
},
|
||||
{
|
||||
Func: readers.ReadExec("statusbar loadavg"),
|
||||
Func: readers.ReadLoad(),
|
||||
Interval: 5 * time.Second,
|
||||
Template: "{{.OneMinute}}",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
@ -57,7 +56,5 @@ var modules = []Module{
|
|||
### Output
|
||||
|
||||
```
|
||||
[CPU 8%] [VOL 35%] [AC 71%] [23:04:02] [0.36]
|
||||
[CPU 8%] [BAT 100%] [03:15:57] [0.62]
|
||||
```
|
||||
|
||||
*Do note that the output is arbitrary as the scripts are not part of the program.*
|
||||
|
|
Loading…
Reference in a new issue