From fcb90ac932960ffcafde66cdceda8269ed5108c5 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 22 Jul 2024 15:06:04 +0300 Subject: [PATCH] profile & darkman: attempt to find a working configuration --- etc/profile.d/99-wayland.sh | 7 +++--- .../00-do-not-repeat-yourself.bash | 24 +++++++++---------- .../dark-mode.d/10-adwaita-breeze-dark.bash | 13 ++++++---- local/share/light-mode.d/10-breeze.bash | 2 +- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/etc/profile.d/99-wayland.sh b/etc/profile.d/99-wayland.sh index 320e96bb..98fb240d 100644 --- a/etc/profile.d/99-wayland.sh +++ b/etc/profile.d/99-wayland.sh @@ -1,6 +1,7 @@ -# Visit qt6ct and set theme to kvantum for darkman! -export QT_QPA_PLATFORMTHEME=qt6ct -export QT_STYLE_OVERRIDE=kvantum +unset QT_QPA_PLATFORMTHEME +unset QT_STYLE_OVERRIDE +export XDG_CURRENT_DESKTOP=KDE +export XDG_SESSION_DESKTOP=KDE # Strongly imply these that wayland is preferred export GDK_BACKEND=wayland export QT_QPA_PLATFORM=wayland 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 8c499bc2..214e4cb7 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 @@ -9,12 +9,12 @@ if ! hash lsb_release 2> /dev/null; then 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 +#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 export DISTROID="$(lsb_release -si)" export DISTROREL="$(lsb_release -sr)" @@ -33,9 +33,9 @@ else 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 +#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 96d6cc2c..b7ee522b 100755 --- a/local/share/dark-mode.d/10-adwaita-breeze-dark.bash +++ b/local/share/dark-mode.d/10-adwaita-breeze-dark.bash @@ -5,15 +5,18 @@ # This is all adapted from /usr/share/doc/darkman/examples/dark-mode.d/ # GTK Theme -(gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' &) -(gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark &) -(dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:Adwaita-dark" &) +(sleep 3 && gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' &) +(sleep 1 && gsettings set org.gnome.desktop.interface gtk-theme Breeze &) +(sleep 2 && gsettings set org.gnome.desktop.interface gtk-theme Breeze-dark &) +(sleep 1 && dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:Breeze" &) +(sleep 2 && dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:Breeze-dark" &) # Xfce theme? -(xfconf-query --channel xsettings --create --type string --property /Net/ThemeName --set Adwaita-dark &) +(sleep 1 && xfconf-query --channel xsettings --create --type string --property /Net/ThemeName --set Breeze &) +(sleep 2 && xfconf-query --channel xsettings --create --type string --property /Net/ThemeName --set Breeze-dark &) # Plasma (lookandfeeltool --apply "org.kde.breezedark.desktop" &) # Kvantum Qt -(sleep 3 && kvantummanager --set KvGnomeDark --noAssign-All &) +#(sleep 3 && kvantummanager --set KvGnomeDark --noAssign-All &) diff --git a/local/share/light-mode.d/10-breeze.bash b/local/share/light-mode.d/10-breeze.bash index c6f0131e..ab00ded8 100755 --- a/local/share/light-mode.d/10-breeze.bash +++ b/local/share/light-mode.d/10-breeze.bash @@ -16,4 +16,4 @@ (lookandfeeltool --apply "org.kde.breeze.desktop" &) # Kvantum Qt -(sleep 3 && kvantummanager --set KvGnome --noAssign-All &) +#(sleep 3 && kvantummanager --set KvGnome --noAssign-All &)