Skip to content

Instantly share code, notes, and snippets.

@shellheim
Last active March 19, 2024 12:21
Show Gist options
  • Save shellheim/cf68ef18d5e4ec211e524e9feed6d64a to your computer and use it in GitHub Desktop.
Save shellheim/cf68ef18d5e4ec211e524e9feed6d64a to your computer and use it in GitHub Desktop.
Change the wallpaper according to the time of the day. (KDE only)
#!/usr/bin/env bash
time=$(date +%H | numfmt)
night=true
day_wallpaper="/path/to/image"
night_wallpaper="/path/to/image"
if [[ "$time" -ge 6 ]] && [[ "$time" -lt 17 ]]; then
night=false
fi
if [[ "$night" = true ]]; then
plasma-apply-wallpaperimage "$night_wallpaper"
else
plasma-apply-wallpaperimage "$day_wallpaper"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment