display

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetBrightness

func SetBrightness(level int) error

SetBrightness sets the display brightness to a value between 0 and 100.

func SetNightShift

func SetNightShift(enable bool) error

SetNightShift enables or disables Night Shift.

Types

type BrightnessInfo

type BrightnessInfo struct {
	Level float64 `json:"level"`
}

BrightnessInfo holds brightness level.

func GetBrightness

func GetBrightness() (*BrightnessInfo, error)

GetBrightness returns the current display brightness.

type Info

type Info struct {
	Name        string `json:"name"`
	Resolution  string `json:"resolution"`
	RefreshRate string `json:"refresh_rate"`
	Vendor      string `json:"vendor"`
	Main        bool   `json:"main"`
}

Info holds display information.

func List

func List() ([]Info, error)

List returns information about connected displays.

type NightShiftInfo

type NightShiftInfo struct {
	Enabled bool   `json:"enabled"`
	Status  string `json:"status"`
}

NightShiftInfo holds Night Shift status.

func GetNightShift

func GetNightShift() (*NightShiftInfo, error)

GetNightShift returns the current Night Shift status.

Jump to

Keyboard shortcuts

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