Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backlight ¶
type Backlight struct { Max int // contains filtered or unexported fields }
Backlight defines a backlight class from /sys/class/backlight.
func NewBacklight ¶
NewBacklight sets up a backlight struct.
func (*Backlight) ActualPath ¶
ActualPath gets the sys-path to actual_brightness.
type Config ¶
type Config struct { StateFile string `toml:"statefile"` Backlight string `toml:"backlight"` IdleTime uint `toml:"idle"` }
Config defines the lis config struct.
func ReadConfig ¶
ReadConfig reads the config from filePath.
type DBusHandler ¶
DBusHandler handles a DBus connection to receive signal on suspend.
func NewDBusHandler ¶
func NewDBusHandler(lis *Lis) (*DBusHandler, error)
NewDBusHandler initializes a new DBusHandler.
func (*DBusHandler) Run ¶
func (d *DBusHandler) Run(errCh chan error)
Run starts the DBusHandler event loop.
type IPCClient ¶
IPCClient defines an IPC client for communicating with the lis IPC server.
type IPCCmd ¶
type IPCCmd struct {
// contains filtered or unexported fields
}
IPCCmd defines an IPC command.
type IPCCmdType ¶
type IPCCmdType int
IPCCmdType defines the type of IPC command.
const ( // IPCSet is the command for setting a brightness value. IPCSet IPCCmdType = iota // IPCSetUp is the command for increasing the brightness value. IPCSetUp // IPCSetDown is the command for decreasing the brightness value. IPCSetDown // IPCStatus is the command for getting current brightness value. IPCStatus // IPCDPMSOn is the command for enabling DPMS. IPCDPMSOn // IPCDPMSOff is the command for disabling DPMS. IPCDPMSOff )
type IPCServer ¶
IPCServer is a server for inter process communication on a unix socket.
func NewIPCServer ¶
NewIPCServer intializes a new IPC server.
type InputDevs ¶
type InputDevs struct { Activity chan struct{} // contains filtered or unexported fields }
InputDevs defines a map of valid input devices.
func GetInputDevices ¶
GetInputDevices return a InputDevs containing valid input devices.
type Lis ¶
type Lis struct { IPC chan IPCCmd // ipc channel used to communicate with the IPC server // contains filtered or unexported fields }
Lis defines the core state of the lis daemon.
func (*Lis) GetPercent ¶
GetPercent gets the current backlight value as a percent value. (max/current).
func (*Lis) SetPercent ¶
SetPercent sets the current value from a percent value. (max * value).