From 8d8fc068013ec1eeb5f391740ad764f916ab2e46 Mon Sep 17 00:00:00 2001 From: albert Date: Tue, 18 Jun 2024 12:46:01 +0900 Subject: [PATCH] Testing --- nixos/common/desktops/plasma6/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/common/desktops/plasma6/default.nix b/nixos/common/desktops/plasma6/default.nix index 9fc17856..09d87906 100644 --- a/nixos/common/desktops/plasma6/default.nix +++ b/nixos/common/desktops/plasma6/default.nix @@ -38,6 +38,7 @@ echo "Activating get-theme-times systemd service" curl -s "https://api.sunrise-sunset.org/json?lat=35.680&lng=135.03&tzid=Asia/Tokyo" | fx .results.sunrise > /tmp/wttr.sunrise curl -s "https://api.sunrise-sunset.org/json?lat=35.680&lng=135.03&tzid=Asia/Tokyo" | fx .results.sunset > /tmp/wttr.sunset + chmod ogu+rw /tmp/wttr.sunset /tmp/wttr.sunrise echo "get-theme-times - complete" ''; after = [ "networking-online.target" ]; @@ -47,14 +48,15 @@ set-theme = { enable = true; script = '' + #!/bin/env bash echo "set-theme.service - Checking for theme settings" if [ ! -f /tmp/wttr.sunrise ] ; then systemctl --user start get-theme-times.service - fi + fi echo "Getting dates:" - SUNRISE=`date $(cat /tmp/wttr.sunset) +%s` + SUNRISE=$(date -d "$(cat /tmp/wttr.sunset)" +%s) echo "Sunrise: $SUNRISE" - SUNSET=`date $(cat /tmp/wttr.sunset) +%s` + SUNSET=$(date -d "$(cat /tmp/wttr.sunset)" +%s) echo "Sunset: $SUNSET" CURRENT=`date +%s` echo "Current: $CURRENT"