System information agregator
Go to file
2024-08-24 03:16:44 -04:00
lib collection of changes 2024-08-24 03:13:04 -04:00
.editorconfig first prototype version 2024-07-30 04:02:05 -04:00
.gitignore name change and more modules added. config not started. 2024-08-14 12:28:29 -04:00
config.go collection of changes 2024-08-24 03:13:04 -04:00
go.mod allow setting the x root window name 2024-08-20 22:33:37 +00:00
go.sum allow setting the x root window name 2024-08-20 22:33:37 +00:00
LICENSE first prototype version 2024-07-30 04:02:05 -04:00
main.go collection of changes 2024-08-24 03:13:04 -04:00
README.md update example config with a friendlier one 2024-08-24 03:16:44 -04:00

modbot

modbot is a seriously over-engineered program for querying different information about your system. Often used with a status bar like dzen, lemonbar, or even the dwm status bar via the -x flag.

Each part of the output is a module, and modbot is an agregator for these modules. You can query different information about your system like load average, CPU temperature, wireless SSID, and even the output of an arbitrary command or file.

The modules that are in the output are determined at compile time, within the config.go file.

Attributions

This project was inspired by gocaudices, which I've used in the past. I created this to be window manager and status bar agnostic, in addition to allowing more options for where the input comes from.

Some ideas for how special cases should be handled were taken from mblocks, which is another great project in the same vein as this.

Usage

Usage of modbot:
  -x    set x root window name

Example

Configuration

var (
        delim  = []byte("] [")
        prefix = []byte("[")
        suffix = []byte("]")
)

var modules = []Module{
        {
                Func:     readers.ReadCpuUsage(),
                Interval: 5 * time.Second,
                Template: `CPU {{printf "%.0f" .UsagePercent}}%`,
        },
        {
                Func:     readers.ReadBattery("BAT1"),
                Interval: 60 * time.Second,
                Template: "BAT {{.Capacity}}%",
        },
        {
                Func:     readers.ReadDate("15:04:05"),
                Interval: 1 * time.Second,
        },
        {
                Func:     readers.ReadLoad(),
                Interval: 5 * time.Second,
                Template: "{{.OneMinute}}",
        },
}

Output

[CPU 8%] [BAT 100%] [03:15:57] [0.62]