Documentation
¶
Index ¶
- type CommandReply
- type Conn
- func (c *Conn) GetMarks() (marks []string, err error)
- func (c *Conn) GetOutputs() (outputs []OutputMode, err error)
- func (c *Conn) GetTree() (tree Node, err error)
- func (c *Conn) GetVersion() (v Version, err error)
- func (c *Conn) GetWorkspaces() (ws []Workspace, err error)
- func (c *Conn) RegisterEventHandler(ev Handler)
- func (c *Conn) RunCommand(cmd string) (r []CommandReply, err error)
- func (c *Conn) SendTick(payload string) (status Status, err error)
- func (c *Conn) Subscribe(eventType ...EventType) (r Status, err error)
- type Event
- type EventType
- type Handler
- type HandlerFunc
- type Header
- type IdleInhibitors
- type MessageType
- type ModeEvent
- type Node
- type Output
- type OutputMode
- type Rect
- type Status
- type TickEvent
- type Version
- type WindowEvent
- type WindowProperties
- type Workspace
- type WorkspaceEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandReply ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) GetOutputs ¶
func (c *Conn) GetOutputs() (outputs []OutputMode, err error)
func (*Conn) GetVersion ¶
func (*Conn) GetWorkspaces ¶
func (*Conn) RegisterEventHandler ¶
func (*Conn) RunCommand ¶
func (c *Conn) RunCommand(cmd string) (r []CommandReply, err error)
type EventType ¶
type EventType uint32
const ( WorkspaceEventType EventType = 0x80000000 ModeEventType EventType = 0x80000002 WindowEventType EventType = 0x80000003 BarconfigUpdateEventType EventType = 0x80000004 BindingEventType EventType = 0x80000005 ShutdownEventType EventType = 0x80000006 TickEventType EventType = 0x80000007 BarStateUpdateEventType EventType = 0x80000014 InputEventType EventType = 0x80000015 )
type HandlerFunc ¶
type HandlerFunc func(e Event)
func (HandlerFunc) HandleEvent ¶
func (fn HandlerFunc) HandleEvent(e Event)
type Header ¶
type Header struct { Magic [6]byte Len int32 Type MessageType }
type IdleInhibitors ¶
type MessageType ¶
type MessageType uint32
type Node ¶
type Node struct { Id int `json:"id"` Name string `json:"name"` Type string `json:"type"` Border string `json:"border"` CurrentBorderWidth int `json:"current_border_width"` Layout string `json:"layout"` Orientation string `json:"orientation"` Percent float64 `json:"percent"` Rect Rect `json:"rect"` WindowRect Rect `json:"window_rect"` DecoRect Rect `json:"deco_rect"` Geometry Rect `json:"geometry"` Urgent bool `json:"urgent"` Sticky bool `json:"sticky"` Marks []string `json:"marks"` Focused bool `json:"focused"` Focus []int `json:"focus"` Nodes []Node `json:"nodes"` FloatingNodes []Node `json:"floating_nodes"` Representation string `json:"representation"` FullscreenMode int `json:"fullscreen_mode"` AppId string `json:"app_id"` Pid int `json:"pid"` Visible bool `json:"visible"` Shell string `json:"shell"` InhibitIdle bool `json:"inhibit_idle"` IdleInhibitors IdleInhibitors `json:"idle_inhibitors"` Window int `json:"window"` WindowProperties WindowProperties `json:"window_properties"` }
type Output ¶
type Output struct { Name string `json:"name"` Make string `json:"make"` Model string `json:"model"` Serial string `json:"serial"` Active bool `json:"active"` Dpms bool `json:"dpms"` Primary bool `json:"primary"` Scale float64 `json:"scale"` SubpixelHinting string `json:"subpixel_hinting"` Transform string `json:"transform"` CurrentWorkspace string `json:"current_workspace"` Modes []OutputMode `json:"modes"` CurrentMode OutputMode `json:"current_mode"` Rect Rect `json:"rect"` }
type OutputMode ¶
type WindowEvent ¶
func (*WindowEvent) EventType ¶
func (e *WindowEvent) EventType() EventType
type WindowProperties ¶
type WorkspaceEvent ¶
type WorkspaceEvent struct { Change string `json:"change"` Current Workspace `json:"current"` Old Workspace `json:"old"` }
func (*WorkspaceEvent) EventType ¶
func (e *WorkspaceEvent) EventType() EventType
Click to show internal directories.
Click to hide internal directories.