wlan

package
Version: v0.0.0-...-acb5a1f Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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.

Source Files

Jump to

Keyboard shortcuts

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