diff --git a/local/share/dark-mode.d/00-do-not-repeat-yourself.bash b/local/share/dark-mode.d/00-do-not-repeat-yourself.bash index e45793e1..b240de1a 100755 --- a/local/share/dark-mode.d/00-do-not-repeat-yourself.bash +++ b/local/share/dark-mode.d/00-do-not-repeat-yourself.bash @@ -2,12 +2,12 @@ set -x -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 --app-name=darkman --icon=error "$ERRORMESSAGE" - exit 0 -fi +#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 --app-name=darkman --icon=error "$ERRORMESSAGE" +# exit 0 +#fi #if ! hash kvantummanager 2> /dev/null; then # ERRORMESSAGE="kvantummanager wasn't found, Qt theme switching won't work!" @@ -16,12 +16,16 @@ fi # exit 0 #fi -export DISTROID="$(lsb_release -si)" -export DISTROREL="$(lsb_release -sr)" +#export DISTROID="$(lsb_release -si)" +#export DISTROREL="$(lsb_release -sr)" + +if [ -f /etc/os-release ]; then + . /etc/os-release +fi export DARKMANGET="$(darkman get)" -printf "Distribution: $DISTROID\nRelease: $DISTROREL\nMode: $DARKMANGET\n" +printf "Distribution: $ID\nRelease: $VERSION_ID\nMode: $DARKMANGET\n" if [[ "$DARKMANGET" -eq "light" ]]; then notify-send --app-name="darkman" --urgency=low --icon=weather-clear-night "Teema: $DARKMANGET" diff --git a/local/share/dark-mode.d/13-plasma-distro-themes.bash b/local/share/dark-mode.d/13-plasma-distro-themes.bash index f92b36cd..1e76fe2d 100755 --- a/local/share/dark-mode.d/13-plasma-distro-themes.bash +++ b/local/share/dark-mode.d/13-plasma-distro-themes.bash @@ -2,6 +2,6 @@ . ~/.local/share/dark-mode.d/00-do-not-repeat-yourself.bash -if [[ "$DISTROID" == "Kali" ]]; then +if [[ "$ID" == "kali" ]]; then lookandfeeltool --platform offscreen --apply "Kali-Purple-Dark" fi diff --git a/local/share/dark-mode.d/15-wallpaper-dark.bash b/local/share/dark-mode.d/15-wallpaper-dark.bash index 028b9b51..fcdefb8b 100755 --- a/local/share/dark-mode.d/15-wallpaper-dark.bash +++ b/local/share/dark-mode.d/15-wallpaper-dark.bash @@ -4,15 +4,15 @@ if [ -f ~/.wallpaper.dark ]; then export WALLPAPER_PATH="$HOME/.wallpaper.dark" -elif [ "$DISTROID" == "Fedora" ]; then - export WALLPAPER_PATH="/usr/share/wallpapers/F$DISTROREL/contents/images_dark/3840x2160.png" -elif [ "$DISTROID" == "Kali" ]; then +elif [ "$ID" == "fedora" ]; then + export WALLPAPER_PATH="/usr/share/wallpapers/F$VERSION_ID/contents/images_dark/3840x2160.png" +elif [ "$ID" == "kali" ]; then export WALLPAPER_PATH="/usr/share/wallpapers/KaliMetalDark/contents/images/3840x2160.png" fi echo "Wallpaper: $WALLPAPER_PATH" -if [ "$DISTROID" == "Arch" ]; then +if [ "$ID" == "arch" ]; then qdbus6 org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i