https://github.com/nukeop/is-tmux
Detect if your code is running inside a tmux session, and if so, which pane
https://github.com/nukeop/is-tmux
Last synced: over 1 year ago
JSON representation
Detect if your code is running inside a tmux session, and if so, which pane
- Host: GitHub
- URL: https://github.com/nukeop/is-tmux
- Owner: nukeop
- License: mit
- Created: 2018-06-14T12:33:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-14T13:19:23.000Z (about 8 years ago)
- Last Synced: 2025-03-13T04:34:24.550Z (over 1 year ago)
- Language: JavaScript
- Size: 47.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# is-tmux
Detect if your code is running inside a tmux session, and if so, which pane
## Installation
``` shell
$ npm install --save is-tmux
```
## Usage
```javascript
const isTmux = require('is-tmux');
console.log(isTmux.default); // Prints true in tmux, false otherwise
console.log(isTmux.pane()); // Prints pane number in tmux (e.g. "%138"), undefined otherwise
```
## About
### License
Copyright © 2018, [nukeop](https://github.com/nukeop).
Released under the [MIT License](LICENSE).