darkman & profile: use Kvantum for Qt dark mode switching

This commit is contained in:
Aminda Suomalainen 2024-07-22 11:39:29 +03:00
parent 8397ffdb8b
commit e56db14672
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
4 changed files with 29 additions and 2 deletions

View File

@ -1,3 +1,4 @@
export QT_STYLE_OVERRIDE=kvantum
export QT_QPA_PLATFORMTHEME="kde"
export GDK_BACKEND=wayland
export QT_QPA_PLATFORM=wayland

View File

@ -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

View File

@ -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 &)

View File

@ -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 &)