Last active
March 19, 2024 12:21
-
-
Save shellheim/cf68ef18d5e4ec211e524e9feed6d64a to your computer and use it in GitHub Desktop.
Change the wallpaper according to the time of the day. (KDE only)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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