2024-07-19 21:59:09 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-07-22 12:11:47 +03:00
|
|
|
. ~/.local/share/dark-mode.d/00-do-not-repeat-yourself.bash
|
2024-07-19 21:59:09 +03:00
|
|
|
|
2024-07-20 07:27:54 +03:00
|
|
|
if [ -f ~/.wallpaper.dark ]; then
|
|
|
|
export WALLPAPER_PATH="$HOME/.wallpaper.dark"
|
2024-08-14 13:02:59 +03:00
|
|
|
elif [ "$ID" == "fedora" ]; then
|
|
|
|
export WALLPAPER_PATH="/usr/share/wallpapers/F$VERSION_ID/contents/images_dark/3840x2160.png"
|
|
|
|
elif [ "$ID" == "kali" ]; then
|
2024-07-20 08:01:17 +03:00
|
|
|
export WALLPAPER_PATH="/usr/share/wallpapers/KaliMetalDark/contents/images/3840x2160.png"
|
2024-07-19 21:59:09 +03:00
|
|
|
fi
|
|
|
|
|
2024-07-20 08:01:17 +03:00
|
|
|
echo "Wallpaper: $WALLPAPER_PATH"
|
|
|
|
|
2024-08-14 13:02:59 +03:00
|
|
|
if [ "$ID" == "arch" ]; then
|
2024-08-10 10:19:53 +03:00
|
|
|
qdbus6 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'")}'
|
|
|
|
else
|
|
|
|
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'")}'
|
|
|
|
fi
|