{"id":13634783,"url":"https://github.com/sidorares/node-x11","last_synced_at":"2025-05-15T15:07:15.003Z","repository":{"id":534020,"uuid":"1858155","full_name":"sidorares/node-x11","owner":"sidorares","description":"X11 node.js network protocol client","archived":false,"fork":false,"pushed_at":"2024-08-04T11:12:01.000Z","size":1194,"stargazers_count":524,"open_issues_count":47,"forks_count":73,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-11T22:38:12.371Z","etag":null,"topics":["gui","x11","xlib"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sidorares.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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":"roadmap.txt","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-06-07T04:03:20.000Z","updated_at":"2025-03-28T17:23:14.000Z","dependencies_parsed_at":"2024-06-18T12:42:40.086Z","dependency_job_id":"fb74160c-5f4f-4f9d-8894-005d92326540","html_url":"https://github.com/sidorares/node-x11","commit_stats":{"total_commits":553,"total_committers":40,"mean_commits":13.825,"dds":0.3960216998191681,"last_synced_commit":"5a1fb644d5257cdf1b3df70d39c81bcfbe7d853d"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidorares%2Fnode-x11","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidorares%2Fnode-x11/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidorares%2Fnode-x11/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidorares%2Fnode-x11/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sidorares","download_url":"https://codeload.github.com/sidorares/node-x11/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"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","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":["gui","x11","xlib"],"created_at":"2024-08-02T00:00:34.048Z","updated_at":"2025-05-15T15:07:09.994Z","avatar_url":"https://github.com/sidorares.png","language":"JavaScript","readme":"# node-x11\n\nX11 protocol client for Node.js: implements the core X11 protocol, as well as Xrender, Damage, Composite, Big-Requests, Dpms, Screensaver, XFixes, Shape, XTest, XC-Misc, GLX, and Apple-WM extensions.\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sidorares/node-x11?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Build Status](https://secure.travis-ci.org/sidorares/node-x11.png)](http://travis-ci.org/sidorares/node-x11)\n\n## Install\n\n    npm install x11\n\nWindows users:\n\n1.  install [XMing](http://www.straightrunning.com/XmingNotes/) or [Cygwin/X](http://x.cygwin.com/)\n2.  get node-x11 copy (using [git](http://code.google.com/p/msysgit/downloads/list?can=3) or from [Github](https://github.com/sidorares/node-x11/archives/master))\n\n## Example\n\nCore requests usage:\n\n```js\nvar x11 = require('x11');\n\nvar Exposure = x11.eventMask.Exposure;\nvar PointerMotion = x11.eventMask.PointerMotion;\n\nx11.createClient(function(err, display) {\n  if (!err) {\n    var X = display.client;\n    var root = display.screen[0].root;\n    var wid = X.AllocID();\n    X.CreateWindow(\n      wid,\n      root, // new window id, parent\n      0,\n      0,\n      500,\n      500, // x, y, w, h\n      0,\n      0,\n      0,\n      0, // border, depth, class, visual\n      { eventMask: Exposure | PointerMotion } // other parameters\n    );\n    X.MapWindow(wid);\n    var gc = X.AllocID();\n    X.CreateGC(gc, wid);\n    var white = display.screen[0].white_pixel;\n    var black = display.screen[0].black_pixel;\n    cidBlack = X.AllocID();\n    cidWhite = X.AllocID();\n    X.CreateGC(cidBlack, wid, { foreground: black, background: white });\n    X.CreateGC(cidWhite, wid, { foreground: white, background: black });\n    X.on('event', function(ev) {\n      if (ev.type == 12) {\n        X.PolyFillRectangle(wid, cidWhite, [0, 0, 500, 500]);\n        X.PolyText8(wid, cidBlack, 50, 50, ['Hello, Node.JS!']);\n      }\n    });\n    X.on('error', function(e) {\n      console.log(e);\n    });\n  } else {\n    console.log(err);\n  }\n});\n```\n\n## Screenshots\n\n![tetris game](https://lh6.googleusercontent.com/-RCRY9A7WwnA/Tlww0FHP7NI/AAAAAAAAAwo/nxfSxsw6xow/s400/tetris.png)\n![XRENDER gradients](https://lh4.googleusercontent.com/-VS0BMYYmq6M/Tlww0Y1ij0I/AAAAAAAAAws/pVWsPZ63Yeo/s400/render-gradients.png)\n![OpenGL glxgears](http://img-fotki.yandex.ru/get/4123/37511094.30/0_81712_6c2ebb11_L)\n![OpenGL teapot](http://img-fotki.yandex.ru/get/4132/37511094.30/0_81713_82a5ac48_L)\n\n## In use\n\n- [ntk](https://github.com/sidorares/ntk) - higher level toolkit on top of X11\n- [node-remote](https://github.com/AndrewSwerlick/node-remote) - media center controller\n- [tiles](https://github.com/dominictarr/tiles) - tiling window manager\n- [vnc](https://github.com/sidorares/node-vnc) - vnc client.\n- [node-ewmh](https://github.com/santigimeno/node-ewmh) - set of EWMH helpers.\n- [OdieWM](https://github.com/bu/OdieWM) - window manager\n- [Dbusmenu](https://github.com/sidorares/node-dbusmenu) - unity global menu client.\n- [AirWM](https://github.com/AirWM/AirWM) - tiling window manager\n- [npdf](https://github.com/sidorares/npdf) - pdf viewer\n- [tinywm](https://github.com/Airblader/node-tinywm) The famous [TinyWM](https://github.com/mackstann/tinywm) written in node.js\n- [basedwm](https://github.com/anko/basedwm) Infinite-desktop panning X window manager in LiveScript\n\n## X11 resources/documentation:\n\n- [Xplain](https://github.com/magcius/xplain) - A series of articles to help explain the X Window System http://magcius.github.io/xplain/article/\n- [Official X11 docs](http://www.x.org/releases/X11R7.6/doc/)\n- [protocol specification](http://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.pdf)\n- C Xlib to X11 request mapping table http://tronche.com/gui/x/xlib/appendix/a.html\n- [How to write composite manager](http://www.talisman.org/~erlkonig/misc/x11-composite-tutorial/)\n- [Extended Window Manager Hints specification](http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html)\n\n## Other implementations\n\n- C: XLib - http://www.sbin.org/doc/Xlib/ http://www.tronche.com/gui/x/xlib/ http://www.x.org/docs/X11/xlib.pdf\n- C: XCB - http://xcb.freedesktop.org/\n- Python: http://sourceforge.net/projects/python-xlib/ ( github fork: https://github.com/Ademan/python-xlib-branch pypi: http://pypi.python.org/pypi/Python%20Xlib )\n- https://github.com/alexer/python-xlib-render\n- Python/twisted: https://launchpad.net/twisted-x11\n- Perl: http://search.cpan.org/~smccam/X11-Protocol-0.56/Protocol.pm\n- Go: https://github.com/BurntSushi/xgb\n- Java: https://github.com/xderoche/J11\n- Java: https://github.com/moaxcp/x11\n- Ruby: https://github.com/dj2/x-ruby-bindings\n- Clojure: https://github.com/noodlewiz/xcljb\n- Guile: https://github.com/mwitmer/guile-xcb\n- Emacs lisp: https://github.com/ch11ng/xelb ( autogenerated from XCB XML )\n\n## Server side (protocol + functionality) implementations for js + DOM\n\nwould be really great to make completely web based playground page, connecting node-x11 api to DOM based implementation\n\n- https://github.com/GothAck/javascript-x-server\n- https://github.com/ttaubert/x-server-js\n","funding_links":[],"categories":["JavaScript","net protocol (网络库)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidorares%2Fnode-x11","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidorares%2Fnode-x11","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidorares%2Fnode-x11/lists"}