hyper-active-session

1.0.0 • Public • Published

Hyper Active Session

Facilitates writing commands to the active terminal in Hyper.

Install

To install, edit ~/.hyper.js and add "hyper-active-session" to the plugins list.

plugins: [
  "hyper-active-session",
],

Usage

As new sessions are created or activated (i.e. the user switches to it), the UID is stored in window.ACTIVE_SESSION. Hyper plugin developers can also run commands in the current terminal using the following code in their plugins.

window.rpc.emit('run command', {
  cmd: 'echo Hello World',
});

The object parameter accepts the following properties:

  • cmd - the string command to run in the terminal
  • exec - a boolean to execute the command automatically (defaults to true)
  • uid - the UID of a known session (defaults to window.ACTIVE_SESSION)

/hyper-active-session/

    Package Sidebar

    Install

    npm i hyper-active-session

    Weekly Downloads

    4

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    7.16 kB

    Total Files

    4

    Last publish

    Collaborators

    • van-ibm