Documentation
¶
Index ¶
- type ApplyLayoutPayload
- type Client
- func (c *Client) ApplyLayout(layoutName string, tileNow bool) error
- func (c *Client) ApplyLayoutWithOrder(layoutName string, windowOrder []uint32) error
- func (c *Client) GetMonitors() (*MonitorsData, error)
- func (c *Client) GetStatus() (*StatusData, error)
- func (c *Client) ListLayouts() (*LayoutsData, error)
- func (c *Client) Ping() error
- func (c *Client) PreviewLayout(layoutName string, durationSeconds int) error
- func (c *Client) Reload() error
- func (c *Client) SetDefaultLayout(layoutName string, tileNow bool) error
- func (c *Client) Undo() error
- type CommandType
- type LayoutsData
- type MonitorInfo
- type MonitorsData
- type PreviewLayoutPayload
- type Request
- type Response
- type Server
- type SetDefaultLayoutPayload
- type StatusData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyLayoutPayload ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles IPC communication with the daemon
func (*Client) ApplyLayout ¶
ApplyLayout sets the daemon's active layout (optionally tiles immediately).
func (*Client) ApplyLayoutWithOrder ¶
ApplyLayoutWithOrder sets the daemon's active layout and tiles with a specific window order. This is used by workspace load to ensure windows end up in the correct slots.
func (*Client) GetMonitors ¶
func (c *Client) GetMonitors() (*MonitorsData, error)
GetMonitors retrieves monitor information
func (*Client) GetStatus ¶
func (c *Client) GetStatus() (*StatusData, error)
GetStatus retrieves daemon status
func (*Client) ListLayouts ¶
func (c *Client) ListLayouts() (*LayoutsData, error)
ListLayouts retrieves available layouts and current selection.
func (*Client) PreviewLayout ¶
PreviewLayout temporarily applies a layout for preview
func (*Client) SetDefaultLayout ¶
SetDefaultLayout updates default_layout in config (optionally tiles immediately).
type CommandType ¶
type CommandType string
CommandType represents different IPC command types
const ( CommandReload CommandType = "RELOAD" CommandGetStatus CommandType = "GET_STATUS" CommandGetMonitors CommandType = "GET_MONITORS" CommandPreviewLayout CommandType = "PREVIEW_LAYOUT" CommandListLayouts CommandType = "LIST_LAYOUTS" CommandApplyLayout CommandType = "APPLY_LAYOUT" CommandSetDefaultLayout CommandType = "SET_DEFAULT_LAYOUT" CommandUndo CommandType = "UNDO" )
type LayoutsData ¶
type MonitorInfo ¶
type MonitorInfo struct {
ID int `json:"id"`
Name string `json:"name"`
X int `json:"x"`
Y int `json:"y"`
Width int `json:"width"`
Height int `json:"height"`
}
MonitorInfo represents information about a single monitor
type MonitorsData ¶
type MonitorsData struct {
Monitors []MonitorInfo `json:"monitors"`
}
MonitorsData represents the data returned by GET_MONITORS
type PreviewLayoutPayload ¶
type PreviewLayoutPayload struct {
LayoutName string `json:"layout_name"`
DurationSeconds int `json:"duration_seconds"`
}
PreviewLayoutPayload represents the payload for PREVIEW_LAYOUT command
type Request ¶
type Request struct {
Command CommandType `json:"command"`
Payload json.RawMessage `json:"payload,omitempty"`
}
Request represents an IPC request from client to server
func ParseRequest ¶
ParseRequest parses a request from JSON bytes
type Response ¶
type Response struct {
Status string `json:"status"` // "OK" or "ERROR"
Data json.RawMessage `json:"data,omitempty"`
Error string `json:"error,omitempty"`
}
Response represents an IPC response from server to client
func NewErrorResponse ¶
NewErrorResponse creates an error response with a message
func NewOKResponse ¶
NewOKResponse creates a successful response with optional data
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server handles IPC requests from clients
func NewServer ¶
func NewServer(cfg *config.Config, tiler *tiling.Tiler, backend platform.Backend, reloadChan chan struct{}) (*Server, error)
NewServer creates a new IPC server
func (*Server) UpdateConfig ¶
UpdateConfig updates the config (thread-safe)