{"id":31481315,"url":"https://github.com/tlinden/swayipc","last_synced_at":"2025-10-02T06:37:13.940Z","repository":{"id":309906491,"uuid":"1037927682","full_name":"TLINDEN/swayipc","owner":"TLINDEN","description":"golang bindings to control sway and i3 via IPC communication","archived":false,"fork":false,"pushed_at":"2025-08-25T18:34:27.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-25T20:38:42.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TLINDEN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-14T10:41:40.000Z","updated_at":"2025-08-25T18:34:30.000Z","dependencies_parsed_at":"2025-08-16T19:21:44.678Z","dependency_job_id":"78128c3c-4e4b-4d95-a935-9b5302aa067b","html_url":"https://github.com/TLINDEN/swayipc","commit_stats":null,"previous_names":["tlinden/i3ipc","tlinden/swayipc"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/TLINDEN/swayipc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fswayipc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fswayipc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fswayipc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fswayipc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TLINDEN","download_url":"https://codeload.github.com/TLINDEN/swayipc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fswayipc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277968832,"owners_count":25907418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-02T02:00:08.890Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-02T06:37:11.220Z","updated_at":"2025-10-02T06:37:13.932Z","avatar_url":"https://github.com/TLINDEN.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/tlinden/swayipc)](https://goreportcard.com/report/github.com/tlinden/swayipc) \n[![Actions](https://github.com/tlinden/swayipc/actions/workflows/ci.yaml/badge.svg)](https://github.com/tlinden/swayipc/actions)\n![GitHub License](https://img.shields.io/github/license/tlinden/swayipc)\n[![GoDoc](https://godoc.org/github.com/tlinden/swayipc?status.svg)](https://godoc.org/github.com/tlinden/swayipc)\n\n# swayipc - go bindings to control sway and swayfx\n\nPackage swayipc can be used to control [sway](https://swaywm.org/),\n[swayfx](https://github.com/WillPower3309/swayfx) and possibly\n[i3wm](http://i3wm.org/) window managers via a unix domain socket.\n\n## About\n\nswaywm's interprocess  communication (or  ipc) is the  interface sway,\nswayfx and i3wm use to  receive commands from client applications such\nas  sway-msg.   It  also  features  a  publish/subscribe  mechanism  for\nnotifying interested parties of window manager events.\n\nswayipc is a go module for  controlling the window manager. This project\nis intended to  be useful for general scripting,  and for applications\nthat interact  with the  window manager  like status  line generators,\nnotification daemons, and window pagers. It is primarily designed to\nwork with sway and swayfx, but may also work with i3wm, although I\nhaven't tested it on i3wm.\n\nThe module uses the i3-IPC proctocol as outlined in sway-ipc(7).\n\nFor details on how to use the library, see the\n[reference documentation](https://godoc.org/github.com/tlinden/swayipc).\n\n## Example usage\n\nIn this example we retrieve the current focused window:\n\n```go\npackage main\n\nimport (\n        \"fmt\"\n        \"log\"\n\n        \"github.com/tlinden/swayipc\"\n)\n\nfunc main() {\n        ipc := swayipc.NewSwayIPC()\n\n        err := ipc.Connect()\n        if err != nil {\n                log.Fatal(err)\n        }\n        defer ipc.Close()\n\n        tree, err := ipc.GetTree()\n        if err != nil {\n                log.Fatal(err)\n        }\n\n        focused := tree.FindFocused()\n\n        if focused != nil {\n                fmt.Printf(\"focused node: %s\\n  id: %d\\n  Geometry: %dx%d\\n\",\n                        focused.Name, focused.Id, focused.Geometry.Width,\n                        focused.Geometry.Height)\n        }\n}\n```\n\nAlso take a look into the  **_examples** folder for more examples.\n\nFor  a   more  comprehensive  and   practical  example  look   at  the\n[descratch](https://github.com/TLINDEN/sway-descratch)  program  which\nyou can use to selectively retrieve a window from the scratchpad.\n\nYou may also take a look at the [tool swaycycle](https://github.com/tlinden/swaycycle)\nwhich is using this module.\n\n## Installation\n\nExecute this to add the module to your project:\n```sh\ngo get github.com/tlinden/swayipc\n```\n\n## Acknowledgements\n\nA  couple   of  ideas   have  been  taken   from  the   [i3ipc  python\nmodule](https://github.com/altdesktop/i3ipc-python/),   although  this\none is not just a port of it and has been written from scratch.\n\n## Getting help\n\nAlthough I'm happy to hear from swayipc users in private email, that's the\nbest way for me to forget to do something.\n\nIn order to report a bug,  unexpected behavior, feature requests or to\nsubmit    a    patch,    please    open   an    issue    on    github:\nhttps://github.com/TLINDEN/swayipc/issues.\n\n## Copyright and license\n\nThis software is licensed under the GNU GENERAL PUBLIC LICENSE version 3.\n\n## Authors\n\nT.v.Dein \u003ctom AT vondein DOT org\u003e\n\n## Project homepage\n\nhttps://github.com/TLINDEN/swayipc\n\n## Copyright and License\n\nLicensed under the GNU GENERAL PUBLIC LICENSE version 3.\n\n## Author\n\nT.v.Dein \u003ctom AT vondein DOT org\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlinden%2Fswayipc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlinden%2Fswayipc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlinden%2Fswayipc/lists"}