From b11e8903a3949cc83e84faab08c69c90a89902f1 Mon Sep 17 00:00:00 2001 From: Joshua Rubin Date: Sun, 14 Apr 2019 21:56:30 -0600 Subject: [PATCH] add LICENSE and README Signed-off-by: Joshua Rubin --- LICENSE | 21 +++++++++++++++++++++ README.md | 18 ++++++++++++++++++ socket_test.go => sway_test.go | 0 3 files changed, 39 insertions(+) create mode 100644 LICENSE create mode 100644 README.md rename socket_test.go => sway_test.go (100%) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4162467 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Joshua Rubin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..796859b --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +[![Go Report Card](https://goreportcard.com/badge/github.com/joshuarubin/go-sway)](https://goreportcard.com/report/github.com/joshuarubin/go-sway) [![GoDoc](https://godoc.org/github.com/joshuarubin/go-sway?status.svg)](https://godoc.org/github.com/joshuarubin/go-sway) + +This package simplifies working with the [sway](https://swaywm.org/) IPC from Go. +It was highly influenced by the [i3 package](https://github.com/i3/go-i3). + +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 diff --git a/socket_test.go b/sway_test.go similarity index 100% rename from socket_test.go rename to sway_test.go