Documentation ¶
Index ¶
- type Battery
- type ManagedDevice
- func (manDev *ManagedDevice) Add(chunk string)
- func (manDev *ManagedDevice) BatteryPercent() int64
- func (manDev *ManagedDevice) BluetoothDevice() bool
- func (manDev *ManagedDevice) BuiltIn() bool
- func (manDev *ManagedDevice) Dump() string
- func (manDev *ManagedDevice) HasBattery() bool
- func (manDev *ManagedDevice) Product() string
- type ManagedDevices
- type Settings
- type Widget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Battery ¶
func NewBattery ¶
func NewBattery() *Battery
type ManagedDevice ¶ added in v0.40.0
ManagedDevice represents an entry in the output returned by ioreg when passed AppleDeviceManagementHIDEventService
func NewManagedDevice ¶ added in v0.40.0
func NewManagedDevice() *ManagedDevice
func (*ManagedDevice) Add ¶ added in v0.40.0
func (manDev *ManagedDevice) Add(chunk string)
Add takes a chunk of raw text and attempts to parse it as managed device data and create an attribute map from it.
A typical chunk will look like: "LowBatteryNotificationPercentage" = 2 "BatteryFaultNotificationType" = "TPBatteryFault" ... "VersionNumber" = 0 which should become: { "LowBatteryNotificationPercentage": 2, "BatteryFaultNotificationType": "TPBatteryFault", "VersionNumber": 0, }
func (*ManagedDevice) BatteryPercent ¶ added in v0.40.0
func (manDev *ManagedDevice) BatteryPercent() int64
BatteryPercent returns the percent of the device battery
func (*ManagedDevice) BluetoothDevice ¶ added in v0.40.0
func (manDev *ManagedDevice) BluetoothDevice() bool
BluetoothDevice returns whether or not the device supports bluetooth
func (*ManagedDevice) BuiltIn ¶ added in v0.40.0
func (manDev *ManagedDevice) BuiltIn() bool
BuiltIn returns whether or not the device is built into the computer
func (*ManagedDevice) Dump ¶ added in v0.40.0
func (manDev *ManagedDevice) Dump() string
Dump writes out all the device attributes as a single string
func (*ManagedDevice) HasBattery ¶ added in v0.40.0
func (manDev *ManagedDevice) HasBattery() bool
HasBattery returns whether or not the device has a battery
func (*ManagedDevice) Product ¶ added in v0.40.0
func (manDev *ManagedDevice) Product() string
Product returns the name of the device
type ManagedDevices ¶ added in v0.40.0
type ManagedDevices struct { Devices []*ManagedDevice // contains filtered or unexported fields }
ManageDevices are ...
func NewManagedDevices ¶ added in v0.40.0
func NewManagedDevices() *ManagedDevices
func (*ManagedDevices) Refresh ¶ added in v0.40.0
func (manDevices *ManagedDevices) Refresh()
type Widget ¶
type Widget struct { view.TextWidget Battery *Battery ManagedDevices *ManagedDevices // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.