This commit is contained in:
iFargle 2024-01-02 21:33:57 +09:00
parent a4d10d8ce3
commit 453383440d

View file

@ -35,11 +35,15 @@
tailscale-systray tailscale-systray
]; ];
# Schedule cronjobs for changing the theme
services.cron = { services.cron = {
enable = true; enable = true;
systemCronJobs = [ systemCronJobs = [
# Set the 'at' jobs for changing the theme # Set the 'at' jobs for changing the theme
''0 12 * * * albert curl -s wttr.in?format=j1 > /tmp/wttr.in'' ''0 12 * * * albert curl -s wttr.in?format=j1 > /tmp/wttr.in''
''0 * * * * albert sleep 10; echo "plasma-apply-colorscheme -platform offscreen Arc" | at `fx /tmp/wttr.in .weather[0].astronomy[0].sunrise`''
''0 * * * * albert sleep 10; echo "plasma-apply-colorscheme -platform offscreen ArcDark" | at `fx /tmp/wttr.in .weather[0].astronomy[0].sunset` ''
# At reboot as well
''@reboot albert curl -s wttr.in?format=j1 > /tmp/wttr.in'' ''@reboot albert curl -s wttr.in?format=j1 > /tmp/wttr.in''
''@reboot albert sleep 10; echo "plasma-apply-colorscheme -platform offscreen Arc" | at `fx /tmp/wttr.in .weather[0].astronomy[0].sunrise`'' ''@reboot albert sleep 10; echo "plasma-apply-colorscheme -platform offscreen Arc" | at `fx /tmp/wttr.in .weather[0].astronomy[0].sunrise`''
''@reboot albert sleep 10; echo "plasma-apply-colorscheme -platform offscreen ArcDark" | at `fx /tmp/wttr.in .weather[0].astronomy[0].sunset` '' ''@reboot albert sleep 10; echo "plasma-apply-colorscheme -platform offscreen ArcDark" | at `fx /tmp/wttr.in .weather[0].astronomy[0].sunset` ''