2024-07-19 20:59:09 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-07-20 06:20:06 +02:00
|
|
|
if ! hash lsb_release 2> /dev/null; then
|
|
|
|
ERRORMESSAGE="lsb_release was not found, the wallpaper scripts cannot figure out the distribution"
|
|
|
|
echo $ERRORMESSAGE
|
|
|
|
notify-send $ERRORMESSAGE
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-07-19 20:59:09 +02:00
|
|
|
export DISTROID=$(lsb_release -si)
|
|
|
|
export DISTROREL=$(lsb_release -sr)
|
|
|
|
|
2024-07-20 06:27:54 +02:00
|
|
|
if [ -f ~/.wallpaper.dark ]; then
|
|
|
|
export WALLPAPER_PATH="$HOME/.wallpaper.dark"
|
|
|
|
elif [ "$DISTROID" == "Fedora" ]; then
|
2024-07-19 20:59:09 +02:00
|
|
|
export WALLPAPER_PATH="/usr/share/wallpapers/F$DISTROREL/contents/images_dark/3840x2160.png"
|
|
|
|
fi
|
|
|
|
|
|
|
|
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");d.writeConfig("Image", "file://'$WALLPAPER_PATH'")}'
|