2024-07-13 17:44:00 +02:00
|
|
|
package i3
|
2021-12-21 19:43:46 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
// Standard
|
|
|
|
"net"
|
|
|
|
)
|
|
|
|
|
|
|
|
type I3Session struct {
|
|
|
|
Socket I3Socket
|
2021-12-23 09:06:43 +01:00
|
|
|
filename string
|
2021-12-28 09:31:56 +01:00
|
|
|
|
|
|
|
// workspace ID → output name
|
2021-12-28 10:57:18 +01:00
|
|
|
workspaces map[string]string
|
|
|
|
workspacesActive map[string]string
|
|
|
|
activeWorkspace string
|
2021-12-21 19:43:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type I3Socket struct {
|
|
|
|
filename string
|
|
|
|
socket string
|
|
|
|
conn net.Conn
|
|
|
|
}
|
|
|
|
|
|
|
|
type I3Output struct {
|
|
|
|
Name string
|
|
|
|
Active bool
|
|
|
|
CurrentWorkspace string `json:"current_workspace"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type I3Workspace struct {
|
|
|
|
Id int
|
|
|
|
Num int
|
|
|
|
Name string
|
|
|
|
Visible bool
|
|
|
|
Focused bool
|
|
|
|
Output string
|
|
|
|
}
|
|
|
|
|
|
|
|
type I3Config struct {
|
|
|
|
Config string
|
|
|
|
}
|
|
|
|
|
|
|
|
type I3EventBinding struct {
|
|
|
|
Change string
|
|
|
|
Binding struct {
|
|
|
|
InputCode int `json:"input_code"`
|
|
|
|
Symbol string
|
|
|
|
Command string
|
|
|
|
Mods []string
|
|
|
|
EventStateMask []string `json:"event_state_mask"`
|
|
|
|
}
|
|
|
|
}
|