which-terminal
v1.1.3
Published
Check active terminal emulator
Downloads
15
Readme
which-terminal
Check active terminal emulator
Install
$ npm install which-terminal
Usage
Checkout example.js
const terminal = require('which-terminal');
//=> { program: String, command: String } or null
if (terminal) {
console.log('Using %s [cmd=%s]', terminal.program, terminal.command);
}
// Running in Hyper:
//=> "Using: hyper [cmd=/opt/Hyper/hyper]"
// Running in GNOME Terminal:
//=> "Using: gnome-terminal [cmd=gnome-terminal]"
// Running in Terminator:
//=> "Using: terminator [cmd=/usr/bin/terminator]"