system

package
v0.0.0-...-e60c870 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FEH           external_app = "feh"
	PICOM         external_app = "picom"
	XSET          external_app = "xset"
	XSS_LOCK      external_app = "xss-lock"
	XSECURELOCK   external_app = "xsecurelock"
	ACPI          external_app = "acpi"
	TMUX          external_app = "tmux"
	TERMINAL      external_app = "alacritty"
	BRIGHTNESSCTL external_app = "brightnessctl"
	XRANDR        external_app = "xrandr"
	SETXKBMAP     external_app = "setxkbmap"
	PULSE_CTL     external_app = "pactl"
	BLUETOOTHCTL  external_app = "bluetoothctl"
	IWCTL         external_app = "iwctl"
	XDG_OPEN      external_app = "xdg-open"
	UDISKIE       external_app = "udiskie"
)

Variables

View Source
var Config config

Functions

func CurrentUserID

func CurrentUserID() string

func ExternalAppPath

func ExternalAppPath(app external_app) string

func HomeDir

func HomeDir() string

func InitConfig

func InitConfig()

func IsOnAC

func IsOnAC() bool

func LoadDesktopEntries

func LoadDesktopEntries(dirname string) []desktop.Entry

func LockScreen

func LockScreen() error

func OnPanic

func OnPanic(name string, errChn chan error)

func Reboot

func Reboot()

func Shutdown

func Shutdown()

func Suspend

func Suspend()

Types

type Battery

type Battery struct {
	Name  string
	State BatteryState
	Level int
}

func GetBatteries

func GetBatteries() []Battery

func (Battery) String

func (b Battery) String() string

type BatteryState

type BatteryState string
const (
	Full        BatteryState = "Full"
	Discharging BatteryState = "Discharging"
	Charging    BatteryState = "Charging"
	Unknown     BatteryState = "Unknown"
)

type Notification

type Notification interface {
	Show()
}

type NotificationEvent

type NotificationEvent struct {
	Title   string
	Message string
	Icon    string
}

func SimpleNotification

func SimpleNotification(message string) NotificationEvent

func TitleNotification

func TitleNotification(title, message string) NotificationEvent

func (NotificationEvent) Show

func (n NotificationEvent) Show() error

type Screen

type Screen struct {
	Name        string
	BestMode    string
	IsConnected bool
}

type Xorg

type Xorg struct {
	// contains filtered or unexported fields
}

func NewXorg

func NewXorg(display *string) *Xorg

func (*Xorg) Close

func (x *Xorg) Close()

func (*Xorg) DetectOutputs

func (x *Xorg) DetectOutputs() []*Screen

func (*Xorg) Subscribe

func (x *Xorg) Subscribe(chn chan xgb.Event, eventMask int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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