aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2026-01-04 14:22:09 -0300
committerSilvio Rhatto <rhatto@riseup.net>2026-01-04 14:22:09 -0300
commit41e2bd88d74b8b749dd0e75ad0a3951ab82f8a68 (patch)
tree2330e49fb092a7991aa8f051d406941d5f3ac88e
parent39eb70873b4796f3a6054d3caa6ce0a21f561f45 (diff)
downloadutils-x11-master.tar.gz
utils-x11-master.tar.bz2
Fix: xnm-tray: Debian trixie supportHEADmaster
-rwxr-xr-xxnm-tray32
1 files changed, 27 insertions, 5 deletions
diff --git a/xnm-tray b/xnm-tray
index 42af5c9..203b3e1 100755
--- a/xnm-tray
+++ b/xnm-tray
@@ -8,11 +8,33 @@ if laptop-detect; then
# Sleep a while until a tray should be available
sleep 5
- # Then start nm-tray with a fix
+ # Get basic system info
+ source /etc/os-release
+
+ # Set QT_QPA_PLATFORMTHEME
+ #
+ # References:
+ #
+ # * https://doc.qt.io/qt-6/qpa.html
+ # * https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications
+ # * https://wiki.gentoo.org/wiki/GTK_themes_in_Qt_applications
+ # * https://itsfoss.gitlab.io/blog/how-to-add-qtqpaplatformthemeqt5ct-environment-variable-in-arch-linux/
+ # * https://unix.stackexchange.com/questions/680483/how-to-add-qt-qpa-platformtheme-qt5ct-environment-variable-in-arch-linux
+ # * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983536
#
- # Check https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications
- # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983536
- #XDG_CURRENT_DESKTOP="GNOME" nm-tray
- QT_QPA_PLATFORMTHEME="gnome" nm-tray
+ # May use a theme such as https://packages.debian.org/stable/breeze-icon-theme
+ #
+ #export XDG_CURRENT_DESKTOP="GNOME"
+ #export QT_QPA_PLATFORMTHEME="gnome"
+ if [ "$VERSION_ID" == "12" ]; then
+ # nm-tray on Debian bookworm is linked against Qt5
+ export QT_QPA_PLATFORMTHEME="qt5ct"
+ else
+ # nm-tray on Debian trixie is linked against Qt6
+ export QT_QPA_PLATFORMTHEME="qt6ct"
+ fi
+
+ # Then start nm-tray
+ nm-tray
fi
fi