globalshortcut

0.0.6 • Public • Published

Global shortcut

Bind global shortcut to go to url or run command. For example with config.json below when pressing CommandOrControl+Shift+Z it will return your IP as HTML5 notification and in terminal.

Requirements

  • Linux, MacOsX or Windows
  • node.js
  • Basic knowledge of terminal, editor

Installation

$ npm install -g globalshortcut

Configure config.json

To get started you have to create a config file, with for example for MacOsX:

$ mkdir -p ~/.config/electron-shortcut && touch ~/.config/electron-shortcut/config.json && open -t ~/.config/electron-shortcut/config.json;

With content in the following format:

{
  "CommandOrControl+Shift+Z": "https://api.ipify.org",
  "CommandOrControl+Shift+X": "whoami"
}
 

Where first you specify accelerator which gets mapped to an url or a command.

Usage

$ globalshortcut

will use default config file ~/.config/electron-shortcut/config.json.

$ globalshortcut --config=<config>

will use config file as specified with <config>. This is interesting for example if you want to create multiple configurations.

Readme

Keywords

none

Package Sidebar

Install

npm i globalshortcut

Weekly Downloads

7

Version

0.0.6

License

ISC

Last publish

Collaborators

  • alfredwesterveld