From 6d75d397fcb9bd09a7a7edbb6b3b2fa18cc9c98c Mon Sep 17 00:00:00 2001 From: dataprolet Date: Sat, 25 May 2024 13:39:52 +0000 Subject: [PATCH] Update themer-sun.sh --- Scripts/plasma-theme-switcher/themer-sun.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Scripts/plasma-theme-switcher/themer-sun.sh b/Scripts/plasma-theme-switcher/themer-sun.sh index fe5379b..4e5d5ad 100644 --- a/Scripts/plasma-theme-switcher/themer-sun.sh +++ b/Scripts/plasma-theme-switcher/themer-sun.sh @@ -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