v0.0.0-...-87682d9 Latest Latest

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 10 Imported by: 12



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.



This section is empty.


This section is empty.


This section is empty.


type Info

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

func (i Info) Connected() bool

Connected returns true if connected to a wireless network.

func (Info) Connecting

func (i Info) Connecting() bool

Connecting returns true if a connection is in progress.

func (Info) Enabled

func (i Info) Enabled() bool

Enabled returns true if the wireless card is enabled.

type Module

type Module struct {
	// contains filtered or unexported fields

Module represents a wlan bar module.

func Any

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

func Named(iface string) *Module

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

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

Jump to

Keyboard shortcuts

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