From 2f8df9de1e8bce3896c5ad17bc3a7bb5ca9c125d Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Thu, 10 Dec 2020 18:37:27 +0100 Subject: [PATCH] Add basic sct 'night time' wrapper --- .bin/dusk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 .bin/dusk diff --git a/.bin/dusk b/.bin/dusk new file mode 100755 index 0000000..37584ad --- /dev/null +++ b/.bin/dusk @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +max_temperature=6500 +min_temperature=4500 +temperature=$max_temperature +step_size=100 + +if [ ! -e "/usr/bin/sct" ]; then echo "sct not found"; exit 1; fi + +until [ $temperature -eq $min_temperature ]; do + temperature=$((${temperature}-${step_size})) + sct "$temperature" + sleep 0.5 +done