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