@@ -1,4 +1,4 @@
2# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 2 -*-
2# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 2 -*-
4# Ensure the shell always gets unthrottled touch events, so that applications
4# Ensure the shell always gets unthrottled touch events, so that applications
@@ -28,12 +28,46 @@ else
28 MODE=full-shell
28 MODE=full-shell
31+# Add options for settings
32+if [ -f ~/.unity8/configs.conf ]; then
33+ source ~/.unity8/configs.conf
37+isfloat='^[0-9]+([.][0-9]+)?$'
39+if [[ $SCALE =~ $isfloat ]]; then
40+ if ! [ $SCALE == "0" ]; then
41+ export GRID_UNIT_PX=$(LC_ALL=C printf %.0f $((8 * ${SCALE})))
42+ export QT_WAYLAND_FORCE_DPI=$(LC_ALL=C printf %.0f $((96 * ${SCALE})))
46+if [[ $GRID_UNIT_PX =~ $isint ]]; then
47+ dbus-update-activation-environment --systemd GRID_UNIT_PX=${GRID_UNIT_PX}
50+if [[ $QT_WAYLAND_FORCE_DPI =~ $isint ]]; then
31−dbus-update-activation-environment --systemd MIR_SOCKET=$MIR_SERVER_FILE
51+ dbus-update-activation-environment --systemd QT_WAYLAND_FORCE_DPI=${QT_WAYLAND_FORCE_DPI}
33# Tell unity-mir to raise SIGSTOP after we start, which we use to tell
54# Tell unity-mir to raise SIGSTOP after we start, which we use to tell
34# systemd when we are done starting up.
55# systemd when we are done starting up.
35export UNITY_MIR_EMITS_SIGSTOP=1
56export UNITY_MIR_EMITS_SIGSTOP=1
59+dbus-update-activation-environment --systemd QT_QPA_PLATFORM=wayland
60+dbus-update-activation-environment --systemd GDK_BACKEND=wayland
61+dbus-update-activation-environment --systemd SDL_VIDEODRIVER=wayland
62+dbus-update-activation-environment --systemd UNITY8_SHELL_QT_QPA_PLATFORM=mirserver
63+dbus-update-activation-environment --systemd QT_WAYLAND_DISABLE_WINDOWDECORATION=1
64+dbus-update-activation-environment --systemd QT_ACCESSIBILITY=1
65+dbus-update-activation-environment --systemd QT_AUTO_SCREEN_SCALE_FACTOR=0
66+dbus-update-activation-environment --systemd GTK_CSD=0
68+# We need to be sure we dont use mir-on-mir
69+unset MIR_SERVER_HOST_SOCKET
37${BINARY:-unity8} --mode=$MODE "$@" &
71${BINARY:-unity8} --mode=$MODE "$@" &
@@ -44,3 +78,4 @@ done
45kill -CONT $child
79kill -CONT $child