pongbox

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2021 License: MIT

README

PongBox

Shell command launcher inspired by MIDI drum pads.

Install

go install github.com/moutend/pongbox/cmd/pongbox@latest

Configuration

Before starting, create a configuration file named .pongbox at your home directory.

The configuration file looks like this:

{
  "commands": {
    "key_<key name>": {
      "name": "<command name>",
      "args": [
        "<arg1>",
        "<arg2>",
        "<argN>"
      ]
    }
  }
}
Example

NOTE: This configuration targets macOS.

{
  "commands": {
    "key_1": {
      "name": "say",
      "args": [
        "-r",
        "100",
        "One"
      ]
    },
    "key_2": {
      "name": "say",
      "args": [
        "-r",
        "100",
        "Two"
      ]
    },
    "key_3": {
      "name": "say",
      "args": [
        "-r",
        "100",
        "Three"
      ]
    },
    "key_arrow_left": {
      "name": "afplay",
      "args": [
        "/System/Library/Sounds/Glass.aiff"
      ]
    },
    "key_arrow_right": {
      "name": "afplay",
      "args": [
        "/System/Library/Sounds/Tink.aiff"
      ]
    }
  }
}

Usage

To launch the pongbox, just type:

pongbox

To quit pongbox, press ESC key or Ctrl-C.

LICENSE

MIT

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL