Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spacebro/idle-bro
send an event when idle
https://github.com/spacebro/idle-bro
Last synced: 3 days ago
JSON representation
send an event when idle
- Host: GitHub
- URL: https://github.com/spacebro/idle-bro
- Owner: spacebro
- Created: 2018-10-23T17:19:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-14T10:06:41.000Z (about 6 years ago)
- Last Synced: 2024-11-21T04:11:40.379Z (2 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# idle-bro
Utility for monitoring a spacebro events and notify state update with a `idle-start` or `idle-stop`.
### Usage
idle-bro is meant to be used as is. You install it, provide a custom configuration file and run it.
You can send a `'get-idle-status'` event to get the idle status in response from `idle-bro`.
Each time a new spacebro client connects, `idle-bro` will broadcast its status.
##### Install
```sh
$ git clone [email protected]:spacebro/idle-bro.git
$ cd idle-bro/
$ npm i
```##### Eventually use custom settings
```sh
$ cp settings/settings.default.js settings/settings.js
$ vim settings/settings.js
```### Run
```sh
$ node index.js
```### Settings
```js
{
"threshold": 1000, // time (in ms) before state update (must be > 100)
"verbose": false, // does idle-bro logs everything or not
"events": ["*"],
// an array of event names to listen to. you can use a wildcard
"spacebro": {
"host": "127.0.0.1", // host of your spacebro server
"port": 8888, // port of your spacebro server
"channelName": "idle-bro" // channel name you want to use (optionnal)
}
}
```