Documentation
¶
Index ¶
- Constants
- Variables
- func CurrentUserID() string
- func ExternalAppPath(app external_app) string
- func HomeDir() string
- func InitConfig()
- func IsOnAC() bool
- func LoadDesktopEntries(dirname string) []desktop.Entry
- func LockScreen() error
- func OnPanic(name string, errChn chan error)
- func Reboot()
- func Shutdown()
- func Suspend()
- type Battery
- type BatteryState
- type Notification
- type NotificationEvent
- type Screen
- type Xorg
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 InitConfig ¶
func InitConfig()
func LoadDesktopEntries ¶
func LockScreen ¶
func LockScreen() error
Types ¶
type Battery ¶
type Battery struct {
Name string
State BatteryState
Level int
}
func GetBatteries ¶
func GetBatteries() []Battery
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 ¶
func SimpleNotification ¶
func SimpleNotification(message string) NotificationEvent
func TitleNotification ¶
func TitleNotification(title, message string) NotificationEvent
func (NotificationEvent) Show ¶
func (n NotificationEvent) Show() error
type Xorg ¶
type Xorg struct {
// contains filtered or unexported fields
}
func (*Xorg) DetectOutputs ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.