diff --git a/19-temps b/19-temps index 9aaa8a7..fcf86fb 100644 --- a/19-temps +++ b/19-temps @@ -6,6 +6,7 @@ const config = require('./config.json'), ex('sensors -j').then(out => { out = JSON.parse(out) + console.log() console.log(`Temperatures:`) for(let adapter in out){ console.log(` \x1b[96m${adapter}\x1b[0m`) @@ -18,8 +19,8 @@ ex('sensors -j').then(out => { console.log(` \x1b[34m${prop}:\x1b[0m ${ stat > 1 ? '\x1b[1m\x1b[31m' : - stat > .85 ? '\x1b[31m' : - stat > .5 ? '\x1b[93m' : '' + stat > config.warn ? '\x1b[31m' : + stat > config.high ? '\x1b[93m' : '' }${out[adapter][prop][tmp]}°C\x1b[0m`) } } diff --git a/config.json b/config.json index fbc0325..f6080c3 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,9 @@ { "publicip": "/home/mathias/git/ovh-dynhost/logs/short.log", "theme": "\\e[32m", - "hostname": "odin" + "hostname": "odin", + "temps": { + "warn": 0.85, + "high": 0.6 + } } \ No newline at end of file