diff --git a/etc/profile.d/99-wayland.sh b/etc/profile.d/99-wayland.sh index f7604889..24363576 100644 --- a/etc/profile.d/99-wayland.sh +++ b/etc/profile.d/99-wayland.sh @@ -1,3 +1,4 @@ +export QT_STYLE_OVERRIDE=kvantum export QT_QPA_PLATFORMTHEME="kde" export GDK_BACKEND=wayland export QT_QPA_PLATFORM=wayland diff --git a/local/share/dark-mode.d/00-do-not-repeat-yourself.sh b/local/share/dark-mode.d/00-do-not-repeat-yourself.sh index 64aa7e10..3e9302be 100644 --- a/local/share/dark-mode.d/00-do-not-repeat-yourself.sh +++ b/local/share/dark-mode.d/00-do-not-repeat-yourself.sh @@ -1,7 +1,14 @@ 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 + 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!" + echo $ERRORMESSAGE + notify-send --app-name="darkman" --icon=error $ERRORMESSAGE exit 0 fi @@ -17,5 +24,14 @@ if [[ "$DARKMANGET" == "dark" ]]; then elif [[ "$DARKMANGET" == "light" ]]; then (notify-send --app-name="darkman" --urgency=low --icon=weather-clear "Teema: $DARKMANGET" &) else - echo "darkman: Something went wrong?" + ERRORMESSAGE="Something went wrong?" + echo $ERRORMESSAGE + notify-send --app-name="darkman" --icon=error $ERRORMESSAGE +fi + +if [[ "$QT_STYLE_OVERRIDE" != "kvantum" ]]; then + ERRORMESSAGE="\$QT_STYLE_OVERRIDE is not 'kvantum', Qt theme switching has no effect!" + echo $ERRORMESSAGE + notify-send --app-name="darkman" --icon=error $ERRORMESSAGE + exit 0 fi diff --git a/local/share/dark-mode.d/10-adwaita-breeze-dark.bash b/local/share/dark-mode.d/10-adwaita-breeze-dark.bash index 4ad80a19..6c17d173 100755 --- a/local/share/dark-mode.d/10-adwaita-breeze-dark.bash +++ b/local/share/dark-mode.d/10-adwaita-breeze-dark.bash @@ -1,5 +1,7 @@ #!/usr/bin/env bash +. ~/.local/share/dark-mode.d/00-do-not-repeat-yourself.sh + # This is all adapted from /usr/share/doc/darkman/examples/dark-mode.d/ # GTK Theme @@ -12,3 +14,6 @@ # Plasma (lookandfeeltool --apply "org.kde.breezedark.desktop" &) + +# Kvantum Qt +(kvantummanager --set KvGnomeDark &) diff --git a/local/share/light-mode.d/10-breeze.bash b/local/share/light-mode.d/10-breeze.bash index 1724be0c..677b706c 100755 --- a/local/share/light-mode.d/10-breeze.bash +++ b/local/share/light-mode.d/10-breeze.bash @@ -1,5 +1,7 @@ #!/usr/bin/env bash +. ~/.local/share/dark-mode.d/00-do-not-repeat-yourself.sh + # This is all adapted from /usr/share/doc/darkman/examples/light-mode.d/ # GTK Theme @@ -12,3 +14,6 @@ # Plasma (lookandfeeltool --apply "org.kde.breeze.desktop" &) + +# Kvantum Qt +(kvantummanager --set KvGnome &)