wlan

package
v0.0.0-...-1143ee3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

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 {
	State          State
	SSID           string
	AccessPointMAC string
	Channel        int
	Frequency      float64
}

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) Enabled

func (i Info) Enabled() bool

Enabled returns true if the wireless card is enabled.

type Module

type Module interface {
	base.WithClickHandler

	// OutputFunc configures a module to display the output of a user-defined function.
	OutputFunc(func(Info) bar.Output) Module

	// OutputTemplate configures a module to display the output of a template.
	OutputTemplate(func(interface{}) bar.Output) Module
}

Module represents a wlan bar module.

func New

func New(iface string) Module

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

type State

type State int

State represents the wireless card state.

const (
	Connected State = iota
	Disconnected
	Disabled
)

Valid states for the wireless card.

Jump to

Keyboard shortcuts

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