Update themer-sun.sh
This commit is contained in:
parent
a3fd527a7a
commit
6d75d397fc
|
@ -1,5 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Required the program 'jq'.
|
||||
|
||||
# Get your coordinates here: https://www.latlong.net/
|
||||
lat=52.520008
|
||||
long=13.404954
|
||||
|
@ -22,8 +24,8 @@ current_minute=$(date +%M)
|
|||
current_time=$((10#$current_hour * 60 + 10#$current_minute))
|
||||
|
||||
# Define the start times in minutes since midnight
|
||||
start_command1=$(($hour_sunset * 60 + $min_sunset))
|
||||
end_command1=$(($hour_sunrise * 60 + $min_sunrise))
|
||||
start_command1=$((10#$hour_sunset * 60 + 10#$min_sunset))
|
||||
end_command1=$((10#$hour_sunrise * 60 + 10#$min_sunrise))
|
||||
|
||||
if (( current_time >= start_command1 || current_time < end_command1 )); then
|
||||
# Execute command1 if the time is between sunset and sunrise
|
||||
|
|
Loading…
Reference in New Issue