Skip to content

danielepolencic/node-zephyros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zephyros

Node.js adapter for Zephyros.

Usage

Include zephiros in your script and you're ready to go!

    var Zephyros = require('zephyros');

    var z = new Zephyros({
      port: 1235,
      host: 'localhost'
    });

    z.bind('t', ['Cmd', 'Shift']).thenClipboardContents().then(function(clipboard){
      console.log("clipboard: ", clipboard);
    });

API

Please note that this is a partial implementation of all the APIs available.

  • bind( key, Modifiers )
  • thenClipboardContents( callback ), the clipboard is passed as an argument to the callback
  • thenFocusedWindow( callback ), the window object with the id of the window is passed as an argument to the callback
  • thenGetWindowFrame( callback ), the window object with the id and the frame of the window are passed as an argument to the callback
  • thenSetWindowFrame( callback ), expect the callback to return a window object with id and frame properties.

Tests

Tests are written in Mocha. Simply run the test with:

~$ mocha