barista.run: barista.run/modules/wlan Index | Files

package wlan

import "barista.run/modules/wlan"

Package wlan provides an i3bar module for wireless information. NOTE: This module REQUIRES the external command "iwgetid", because getting the SSID is a privileged operation.

Index

Package Files

wlan.go

type Info Uses

type Info struct {
    Name           string
    State          netlink.OperState
    IPs            []net.IP
    SSID           string
    AccessPointMAC string
    Channel        int
    Frequency      unit.Frequency
}

Info represents the wireless card status.

func (Info) Connected Uses

func (i Info) Connected() bool

Connected returns true if connected to a wireless network.

func (Info) Connecting Uses

func (i Info) Connecting() bool

Connecting returns true if a connection is in progress.

func (Info) Enabled Uses

func (i Info) Enabled() bool

Enabled returns true if the wireless card is enabled.

type Module Uses

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

Module represents a wlan bar module.

func Any Uses

func Any() *Module

Any constructs an instance of the wlan module that uses any available wireless interface, choosing the 'best' state from all available.

func Named Uses

func Named(iface string) *Module

Named constructs an instance of the wlan module for the specified interface.

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 starts the module.

Package wlan imports 10 packages (graph) and is imported by 2 packages. Updated 2018-11-15. Refresh now. Tools for package owners.