rename non-camel-case vars, refactor, satisfy linter

This commit is contained in:
2026-08-22 17:47:37 +02:00
parent 9e558e1f3c
commit d64f84c887
13 changed files with 220 additions and 206 deletions

View File

@@ -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
}