Last active
November 15, 2018 15:30
-
-
Save jaredpalmer/47d905601616f84e35070ef3673671c4 to your computer and use it in GitHub Desktop.
Hyperterm x Philips Hue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Hue = require('node-hue-api') | |
exports.decorateConfig = (config) => { | |
const { host, username, light } = config.hyperhue | |
const api = new Hue.HueApi(host, username) | |
api | |
.lightStatus(1) | |
.then(status => { | |
const { on, hue, sat, bri } = status | |
const color = `hsb(${hue},${sat},${bri})` | |
return Object.assign({}, config, { | |
borderColor: color, | |
cursorColor: color, | |
css: ` | |
${config.css || ''} | |
.tabs_nav .tabs_list .tab_text { | |
color: ${color}; | |
} | |
.tabs_nav .tabs_title { | |
color: ${color}; | |
} | |
` | |
}); | |
}) | |
.catch(e => { | |
console.log(e) | |
return config | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment