From 21685c538a10d9a9002204f70a67c70f3e303962 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Fri, 19 Jul 2024 21:56:45 +0300 Subject: [PATCH] darkman: simplify wallpaper scripts --- bash/darkman/dark-mode.d/{fedora.sh => breezedark.sh} | 0 bash/darkman/dark-mode.d/fedora-wallpaper.sh | 11 +++++------ bash/darkman/light-mode.d/{fedora.sh => breeze.sh} | 0 .../{fedora-wallpaper.sh => wallpaper.sh} | 8 +++++++- 4 files changed, 12 insertions(+), 7 deletions(-) rename bash/darkman/dark-mode.d/{fedora.sh => breezedark.sh} (100%) rename bash/darkman/light-mode.d/{fedora.sh => breeze.sh} (100%) rename bash/darkman/light-mode.d/{fedora-wallpaper.sh => wallpaper.sh} (68%) diff --git a/bash/darkman/dark-mode.d/fedora.sh b/bash/darkman/dark-mode.d/breezedark.sh similarity index 100% rename from bash/darkman/dark-mode.d/fedora.sh rename to bash/darkman/dark-mode.d/breezedark.sh diff --git a/bash/darkman/dark-mode.d/fedora-wallpaper.sh b/bash/darkman/dark-mode.d/fedora-wallpaper.sh index 9307d11..dab6f0e 100755 --- a/bash/darkman/dark-mode.d/fedora-wallpaper.sh +++ b/bash/darkman/dark-mode.d/fedora-wallpaper.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash -# To change the wallpaper on all desktops, you have to run a PlasmaShell script -# and iterate over all available desktops. This examples uses the default dark -# wallpaper on Manjaro (Bamboo). +export DISTROID=$(lsb_release -si) +export DISTROREL=$(lsb_release -sr) -# Script credit @mamantoha: https://gist.github.com/mamantoha/c01363e5c791e8324d6248b09cf29bbb - -WALLPAPER_PATH="/usr/share/wallpapers/F$(lsb_release -sr)/contents/images_dark/3840x2160.png" +if [ "$DISTROID" == "Fedora" ]; then + 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