forked from anticapitalista/desktop-defaults-xfce-mx
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path56xfce4-qtconfig
26 lines (26 loc) · 992 Bytes
/
56xfce4-qtconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Set QT variables to only pass to gtk2 Xfce environment
# /etc/X11/Xsession.d/56xfce4-qtconfig
#
BASESTARTUP=$(basename "$STARTUP" | cut -d\ -f1)
if [ "$BASESTARTUP" = x-session-manager ]; then
BASESTARTUP=$(basename $(readlink /etc/alternatives/x-session-manager))
fi
case "$BASESTARTUP" in
xfce4-session|startxfce4)
#set qt environment variables to follow user chosen platform
#default plugin is gtk2
#$HOME/.config/MX-Linux/qt_plugin.conf can hold a user settable value
file="$HOME/.config/MX-Linux/qt_plugin.conf"
plugin="gtk2"
if [ -e "$file" ]; then
plugin=$(cat "$file")
fi
export QT_QPA_PLATFORMTHEME="$plugin"
export QT_PLATFORMTHEME="$plugin"
export QT_PLATFORM_PLUGIN="$plugin"
if command -v xfconf-query >/dev/null; then
export QT_SCALE_FACTOR=$(xfconf-query -c xsettings -p /Gdk/WindowScalingFactor 2>/dev/null)
[ -z "${QT_SCALE_FACTOR}" ] && unset QT_SCALE_FACTOR
fi
;;
esac