migrate to codeberg

This commit is contained in:
2025-11-10 20:52:06 +01:00
parent d64c1ddcc0
commit 22835c081a
33 changed files with 56 additions and 75 deletions

View File

@@ -1,47 +0,0 @@
name: build-and-test
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
version: ['1.22']
os: [ubuntu-latest, windows-latest, macos-latest]
name: Build
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '${{ matrix.version }}'
id: go
- name: checkout
uses: actions/checkout@v3
- name: build
run: go build
# - name: test
# run: make test
# - name: Update coverage report
# uses: ncruces/go-coverage-report@main
# with:
# report: true
# chart: true
# amend: true
# if: |
# matrix.os == 'ubuntu-latest' &&
# github.event_name == 'push'
# continue-on-error: true
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.22
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3

29
.woodpecker/build.yaml Normal file
View File

@@ -0,0 +1,29 @@
matrix:
platform:
- linux/amd64
goversion:
- 1.24
labels:
platform: ${platform}
steps:
build:
when:
event: [push]
image: golang:${goversion}
commands:
- cd v1
- go get
- go build
linter:
when:
event: [push]
image: golang:${goversion}
commands:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.5.0
- cd v1
- golangci-lint --version
- golangci-lint run ./...
depends_on: [build]

View File

@@ -1,7 +1,6 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/tlinden/swayipc)](https://goreportcard.com/report/github.com/tlinden/swayipc)
[![Actions](https://github.com/tlinden/swayipc/actions/workflows/ci.yaml/badge.svg)](https://github.com/tlinden/swayipc/actions)
![GitHub License](https://img.shields.io/github/license/tlinden/swayipc)
[![GoDoc](https://godoc.org/github.com/tlinden/swayipc?status.svg)](https://godoc.org/github.com/tlinden/swayipc)
[![Go Report Card](https://goreportcard.com/badge/codeberg.org/scip/swayipc/v1)](https://goreportcard.com/report/codeberg.org/scip/swayipc/v1)
[![License](https://img.shields.io/badge/license-GPL-blue.svg)](https://codeberg.org/scip/swayipc/raw/branch/main/LICENSE)
[![GoDoc](https://godoc.org/codeberg.org/scip/swayipc?status.svg)](https://godoc.org/codeberg.org/scip/swayipc/v1)
# swayipc - go bindings to control sway and swayfx
@@ -26,7 +25,7 @@ haven't tested it on i3wm.
The module uses the i3-IPC proctocol as outlined in sway-ipc(7).
For details on how to use the library, see the
[reference documentation](https://godoc.org/github.com/tlinden/swayipc).
[reference documentation](https://godoc.org/codeberg.org/scip/swayipc/v1).
## Example usage
@@ -39,7 +38,7 @@ import (
"fmt"
"log"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {
@@ -69,17 +68,17 @@ func main() {
Also take a look into the **_examples** folder for more examples.
For a more comprehensive and practical example look at the
[descratch](https://github.com/TLINDEN/sway-descratch) program which
[descratch](https://codeberg.org/scip/sway-descratch) program which
you can use to selectively retrieve a window from the scratchpad.
You may also take a look at the [tool swaycycle](https://github.com/tlinden/swaycycle)
You may also take a look at the [tool swaycycle](https://codeberg.org/scip/swaycycle)
which is using this module.
## Installation
Execute this to add the module to your project:
```sh
go get github.com/tlinden/swayipc
go get codeberg.org/scip/swayipc/v1
```
## Acknowledgements
@@ -95,7 +94,7 @@ best way for me to forget to do something.
In order to report a bug, unexpected behavior, feature requests or to
submit a patch, please open an issue on github:
https://github.com/TLINDEN/swayipc/issues.
https://codeberg.org/scip/swayipc/issues.
## Copyright and license
@@ -107,7 +106,7 @@ T.v.Dein <tom AT vondein DOT org>
## Project homepage
https://github.com/TLINDEN/swayipc
https://codeberg.org/scip/swayipc
## Copyright and License

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"log"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -10,7 +10,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
// Event callback function, needs to implement each subscribed events,

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"log"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -9,7 +9,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"fmt"
"log"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -4,7 +4,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -8,7 +8,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -10,7 +10,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -9,7 +9,7 @@ import (
"log"
"github.com/alecthomas/repr"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

@@ -12,7 +12,7 @@ import (
"log"
"os"
"github.com/tlinden/swayipc"
"codeberg.org/scip/swayipc/v1"
)
func main() {

View File

View File

View File

@@ -1,4 +1,4 @@
module github.com/tlinden/swayipc
module codeberg.org/scip/swayipc/v1
go 1.23

View File

View File

View File

View File

View File

View File

@@ -5,7 +5,7 @@ import (
)
const (
VERSION = "v0.3.0"
VERSION = "v1.0.0"
IPC_HEADER_SIZE = 14
IPC_MAGIC = "i3-ipc"