POSIX_Scripts/set_warmth

15 lines
287 B
Bash
Executable File

#!/bin/sh -e
# Get current hour.
x=$(date|cut -f5 -d' '|cut -f1 -d:)
# Get current minute.
y=$(date|cut -f5 -d' '|cut -f2 -d:)
brownout $(bc -e "define redlevel(x,y) {
if((x-12) <= 0)
return((83*(12-x)+(y*(83/60))))
else
return((83*(x-12)+(y*(83/60))))
} redlevel($x, $y)")