Documentation ¶
Overview ¶
Package sway provides functions and structs to communicate with a sway IPC socket according to sway-ipc(7)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPC_command ¶
type IPC_command uint32
const ( RUN_COMMAND IPC_command = 0 GET_WORKSPACES IPC_command = 1 SUBSCRIBE IPC_command = 2 GET_OUTPUTS IPC_command = 3 GET_TREE IPC_command = 4 GET_MARKS IPC_command = 5 GET_BAR_COFIG IPC_command = 6 GET_VERSION IPC_command = 7 GET_BINDING_MODES IPC_command = 8 GET_CONFIG IPC_command = 9 SEND_TICK IPC_command = 10 // SYNC ommited cause it's only there for i3 compability GET_INPUTS IPC_command = 100 GET_SEATS IPC_command = 101 )
type Output ¶
type OutputsWithSelected ¶
type SwayAnswer ¶
type SwayAnswer struct {
// contains filtered or unexported fields
}
type SwayConnection ¶
type SwayConnection struct { Outputs []Output // contains filtered or unexported fields }
func CreateSwayConnection ¶
func CreateSwayConnection() (SwayConnection, error)
CreateSwayConnection creates the sway connection
func (*SwayConnection) ApplyOutputs ¶
func (s *SwayConnection) ApplyOutputs(o []Output) error
ApplyOutputs applies the Output Array to the sway sock
func (*SwayConnection) CloseConnection ¶
func (s *SwayConnection) CloseConnection()
func (*SwayConnection) GetOutputsFromSocket ¶
func (s *SwayConnection) GetOutputsFromSocket() error
Sets SwayConnection.Outputs to the outputs currently present on the Sway Socket
Click to show internal directories.
Click to hide internal directories.