mirror of
https://codeberg.org/scip/swayipc.git
synced 2026-08-24 06:44:19 +02:00
rename non-camel-case vars, refactor, satisfy linter
This commit is contained in:
10
input.go
10
input.go
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// An input (keyboard, mouse, whatever)
|
||||
// Input represents an input (keyboard, mouse, whatever)
|
||||
type Input struct {
|
||||
Identifier string `json:"identifier"`
|
||||
Name string `json:"name"`
|
||||
@@ -19,7 +19,7 @@ type Input struct {
|
||||
Libinput *LibInput `json:"libinput"`
|
||||
}
|
||||
|
||||
// Holds the data associated with libinput
|
||||
// LibInput stores the data associated with libinput
|
||||
type LibInput struct {
|
||||
SendEvents string `json:"send_events"`
|
||||
Tap string `json:"tap"`
|
||||
@@ -41,7 +41,7 @@ type LibInput struct {
|
||||
CalibrationMatrix []float32 `json:"calibration_matrix"`
|
||||
}
|
||||
|
||||
// A key binding
|
||||
// Binding is a key binding
|
||||
type Binding struct {
|
||||
Command string `json:"command"`
|
||||
EventStateMask []string `json:"event_state_mask"`
|
||||
@@ -50,9 +50,9 @@ type Binding struct {
|
||||
InputType string `json:"input_type"`
|
||||
}
|
||||
|
||||
// Get a list of all currently supported inputs
|
||||
// GetInputs returns a list of all currently supported inputs
|
||||
func (ipc *SwayIPC) GetInputs() ([]*Input, error) {
|
||||
payload, err := ipc.get(GET_INPUTS)
|
||||
payload, err := ipc.get(MsgGetInputs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user