Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Battery ¶
type Battery struct{}
func NewBattery ¶
func NewBattery() *Battery
NewBattery creates a new instance of the batter driver.
func (*Battery) Get ¶
Get returns the current battery level (between 0 and 1) or an error if there was a problem.
type Brightness ¶
type Brightness struct {
// contains filtered or unexported fields
}
Brightness is a type that handles querying screen brightness. It supports brightnessctl and xbacklight supported devices.
func NewBrightness ¶
func NewBrightness() *Brightness
func (*Brightness) Get ¶
func (b *Brightness) Get() (float64, error)
Get returns the current screen brightness (between 0 and 1) or an error if there was a problem.
func (*Brightness) Set ¶
func (b *Brightness) Set(value float64) error
Set attempts to set the screen brightness - 1 for maximum and 0 for off. An error is returned in the case of a problem.
Click to show internal directories.
Click to hide internal directories.