Index | Files

package sysinfo

import ""

Package sysinfo implements i3bar modules that show system information.


Package Files


func RefreshInterval Uses

func RefreshInterval(interval time.Duration)

RefreshInterval configures the polling frequency.

type Info Uses

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 Uses

type Module struct {
    // contains filtered or unexported fields

Module represents a bar.Module that displays memory information.

func New Uses

func New() *Module

New creates a new sysinfo module.

func (*Module) Output Uses

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 Uses

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

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

Package sysinfo imports 9 packages (graph) and is imported by 3 packages. Updated 2018-11-25. Refresh now. Tools for package owners.