aboutsummaryrefslogtreecommitdiff
path: root/bin/blind.sh
diff options
context:
space:
mode:
authorryo <ryo@nopwd.lol>2024-10-30 20:10:03 +0000
committerryo <ryo@nopwd.lol>2024-10-30 20:10:03 +0000
commitcc6d6fcfc6e8403e87dae9f092e61f0edf8e3cc6 (patch)
treef7f751a92c30b5ef7cf8770004c30479c516fdca /bin/blind.sh
Initial commit
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