Thanks to visit codestin.com
Credit goes to github.com

Skip to content

consider to use ntk instead of node-x11  #1

@sidorares

Description

@sidorares

Hi Dominic!
I've always wanted to implement functional wm with node-x11, very happy to see that you actually found time to do this! I'll be happy to collaborate

node-x11 is intentionally very low level and only exposes X11 requests / events. I created wrapper library around it - https://github.com/sidorares/ntk - what do you think about using it instead x11 directly?

This is simplest possible wm in ntk:

require('ntk').createClient(function (err, app) {
  app.rootWindow()
    .on('configure_request', function(ev) {
      // add code to resize target window 
     })
   .on('map_request', function(ev) {
    ev.window.map();
    });
})

or with coffee:

require('ntk').createClient (err, app) ->
  app.rootWindow()
    .on 'configure_request' (ev)->
       // resize
    .on 'map_request' (ev)->
      ev.window.map()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions