Skip to content

Commit

Permalink
event: fix staticcheck warns
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Aug 31, 2024
1 parent e2b70b5 commit 9d3c4e0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
18 changes: 0 additions & 18 deletions event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,56 +93,45 @@ func processEvent(ev EventHandler, msg ReceivedData, events []EventType) {
case EventWorkspace:
// e.g. "1" (workspace number)
ev.Workspace(WorkspaceName(raw[0]))
break
case EventFocusedMonitor:
// idk
ev.FocusedMonitor(FocusedMonitor{
MonitorName: MonitorName(raw[0]),
WorkspaceName: WorkspaceName(raw[1]),
})
break
case EventActiveWindow:
// e.g. jetbrains-goland,hyprland-ipc-ipc – main.go
ev.ActiveWindow(ActiveWindow{
Name: raw[0],
Title: raw[1],
})

break
case EventFullscreen:
// e.g. "true" or "false"
ev.Fullscreen(raw[0] == "1")
break
case EventMonitorRemoved:
// e.g. idk
ev.MonitorRemoved(MonitorName(raw[0]))
break
case EventMonitorAdded:
// e.g. idk
ev.MonitorAdded(MonitorName(raw[0]))
break
case EventCreateWorkspace:
// e.g. "1" (workspace number)
ev.CreateWorkspace(WorkspaceName(raw[0]))
break
case EventDestroyWorkspace:
// e.g. "1" (workspace number)
ev.DestroyWorkspace(WorkspaceName(raw[0]))
break
case EventMoveWorkspace:
// e.g. idk
ev.MoveWorkspace(MoveWorkspace{
WorkspaceName: WorkspaceName(raw[0]),
MonitorName: MonitorName(raw[1]),
})
break
case EventActiveLayout:
// e.g. AT Translated Set 2 keyboard,Russian
ev.ActiveLayout(ActiveLayout{
Type: raw[0],
Name: raw[1],
})
break
case EventOpenWindow:
// e.g. 80864f60,1,Alacritty,Alacritty
ev.OpenWindow(OpenWindow{
Expand All @@ -151,38 +140,31 @@ func processEvent(ev EventHandler, msg ReceivedData, events []EventType) {
Class: raw[2],
Title: raw[3],
})
break
case EventCloseWindow:
// e.g. 5
ev.CloseWindow(CloseWindow{
Address: raw[0],
})
break
case EventMoveWindow:
// e.g. 5
ev.MoveWindow(MoveWindow{
Address: raw[0],
WorkspaceName: WorkspaceName(raw[1]),
})
break
case EventOpenLayer:
// e.g. wofi
ev.OpenLayer(OpenLayer(raw[0]))
break
case EventCloseLayer:
// e.g. wofi
ev.CloseLayer(CloseLayer(raw[0]))
break
case EventSubMap:
// e.g. idk
ev.SubMap(SubMap(raw[0]))
break
case EventScreencast:
ev.Screencast(Screencast{
Sharing: raw[0] == "1",
Owner: raw[1],
})
break
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions event/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"testing"
)

var ec *EventClient

var (
h = &FakeEventHandler{}
c = &FakeEventClient{}
Expand Down

0 comments on commit 9d3c4e0

Please sign in to comment.