sysinfo

package
Version: v0.0.0-...-71d05b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2021 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Overview

Package sysinfo implements i3bar modules that show system information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RefreshInterval

func RefreshInterval(interval time.Duration)

RefreshInterval configures the polling frequency.

Types

type Info

type Info struct {
	Uptime       time.Duration
	Loads        [3]float64
	TotalRAM     unit.Datasize
	FreeRAM      unit.Datasize
	SharedRAM    unit.Datasize
	BufferRAM    unit.Datasize
	TotalSwap    unit.Datasize
	FreeSwap     unit.Datasize
	Procs        uint16
	TotalHighRAM unit.Datasize
	FreeHighRAM  unit.Datasize
}

Info wraps the result of sysinfo and makes it more useful.

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module represents a bar.Module that displays memory information.

func New

func New() *Module

New creates a new sysinfo module.

func (*Module) Output

func (m *Module) Output(outputFunc func(Info) bar.Output) *Module

Output configures a module to display the output of a user-defined function.

func (*Module) Stream

func (m *Module) Stream(s bar.Sink)

Stream subscribes to sysinfo and updates the module's output.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL