Fork the desktop off Omarchy as a self-contained system
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Temperatures below the identity point count as night light. Keep in sync
|
||||
// with bin/blob-toggle-nightlight, which applies the same threshold.
|
||||
var IDENTITY_TEMPERATURE = 6000
|
||||
|
||||
function temperatureFromOutput(output) {
|
||||
var match = String(output === undefined || output === null ? "" : output).match(/[0-9]+/)
|
||||
return match ? Number(match[0]) : null
|
||||
}
|
||||
|
||||
function isNightlight(temperature) {
|
||||
return temperature !== null && temperature !== undefined && temperature < IDENTITY_TEMPERATURE
|
||||
}
|
||||
|
||||
if (typeof module !== "undefined") {
|
||||
module.exports = {
|
||||
IDENTITY_TEMPERATURE: IDENTITY_TEMPERATURE,
|
||||
temperatureFromOutput: temperatureFromOutput,
|
||||
isNightlight: isNightlight
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user