aboutsummaryrefslogtreecommitdiff
path: root/bin/blind.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/blind.sh')
-rwxr-xr-xbin/blind.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/blind.sh b/bin/blind.sh
new file mode 100755
index 0000000..431967c
--- /dev/null
+++ b/bin/blind.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env dash
+
+now=$(TZ=Iran date +%H)
+night=21
+morning=5
+
+if [ "$now" -ge "$night" ] || [ "$now" -le "$morning" ]
+then
+ brightnessctl -q set 200
+else
+ brightnessctl -q set 900
+fi