Update systemd

This commit is contained in:
iFargle 2024-01-03 09:10:42 +09:00
parent bc9373dbdb
commit 8db23e14e7

View file

@ -49,7 +49,8 @@
SUNRISE=`fx /tmp/wttr.in .weather[0].astronomy[0].sunrise`
NOW=`date +'%I:%M %p'`
if [[ $SUNRISE == $NOW ]] ; then
plasma-apply-colorscheme -platform offscreen ArcDark
echo "Setting Arc colorscheme"
plasma-apply-colorscheme -platform offscreen Arc
fi
'';
serviceConfig.Type = "oneshot";
@ -59,13 +60,8 @@
path = [ pkgs.at pkgs.fx pkgs.nodejs pkgs.bash ];
script = ''
SUNSET=`fx /tmp/wttr.in .weather[0].astronomy[0].sunset`
NOW="04:56 PM"
echo "Sunset: $SUNSET."
echo "Now : $NOW."
if [[ $SUNSET != $NOW ]] ; then
echo "Not sunset."
fi
if [[ $SUNET == $NOW ]] ; then
NOW=`date +'%I:%M %p'`
if [[ $SUNSET == $NOW ]] ; then
echo "Setting ArcDark colorscheme"
plasma-apply-colorscheme -platform offscreen ArcDark
fi
@ -78,12 +74,12 @@
"light-theme" = {
enable = false;
partOf = [ "light-theme.service" ];
timerConfig.OnCalendar = [ "*-*-* *:*:00" ];
timerConfig.OnCalendar = [ "*-*-* *:*:*" ];
};
"dark-theme" = {
enable = false;
partOf = [ "dark-theme.service" ];
timerConfig.OnCalendar = [ "*-*-* *:*:00" ];
timerConfig.OnCalendar = [ "*-*-* *:*:*" ];
};
};
}