1
0
mirror of https://github.com/joshuarubin/go-sway synced 2024-11-22 12:02:00 +01:00
sway client for Go
Go to file
aajonusonline b56ddd2124
add input subscribe event, update bar_status_event to bar_state_event (#2)
* add input subscribe event, update bar_status_event to bar_state_event

* Add missing documentation, update to recent IPC

* Added deprecated API back for backwards compatibility

Co-authored-by: wtl <wtl144000@gmail.com>
2021-09-23 08:20:55 -06:00
client.go fix a missed error check 2019-04-15 10:11:13 -06:00
go.mod update docs 2019-04-14 20:21:31 -06:00
go.sum update docs 2019-04-14 20:21:31 -06:00
internal.go add input subscribe event, update bar_status_event to bar_state_event (#2) 2021-09-23 08:20:55 -06:00
LICENSE add LICENSE and README 2019-04-14 21:56:30 -06:00
README.md add LICENSE and README 2019-04-14 21:56:30 -06:00
subscribe.go add input subscribe event, update bar_status_event to bar_state_event (#2) 2021-09-23 08:20:55 -06:00
sway_test.go add LICENSE and README 2019-04-14 21:56:30 -06:00
types.go add input subscribe event, update bar_status_event to bar_state_event (#2) 2021-09-23 08:20:55 -06:00

Go Report Card GoDoc

This package simplifies working with the sway IPC from Go. It was highly influenced by the i3 package.

While the i3 and sway IPCs share much in common, they are not identical. This package provides the complete sway api.

Differences from the i3 package

  • Retries are not handled. Use tools like systemd to automatically restart apps that use this library.
  • A much simpler interface for subscriptions and handling events.
  • No global state.
  • Use of Context throughout.

Assumptions

  • The $SWAYSOCK variable must be set properly in the environment
  • sway is running on a machine with the same byteorder as the client