diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2017-07-17 12:37:25 +0200 | 
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2017-07-17 12:37:25 +0200 | 
| commit | d9eafe09833fa544611f53858eb1b5c08d402626 (patch) | |
| tree | 813ae27dbd3fdfc72a6168574897e742a4d21ccd | |
| parent | c458d9147bfda80bca94aa69b912f61aeead3e92 (diff) | |
compiz-profile-selector: set UNITY_HAS_3D_SUPPORT based on unity_support_test result
(bzr r4245.2.13)
| -rw-r--r-- | tools/compiz-profile-selector.in | 18 | 
1 files changed, 15 insertions, 3 deletions
| diff --git a/tools/compiz-profile-selector.in b/tools/compiz-profile-selector.in index f82957eff..b5451bfea 100644 --- a/tools/compiz-profile-selector.in +++ b/tools/compiz-profile-selector.in @@ -14,26 +14,38 @@ fi  compiz_profile="ubuntu"  settings_profile="unity" +supports_3d=true  if ! /usr/lib/nux/unity_support_test -p; then - settings_profile="unity-lowgfx" + supports_3d=false  fi -if [ "$(gsettings get com.canonical.Unity lowgfx)" == "true" ]; then - settings_profile="unity-lowgfx" +if [ "$UNITY_LOW_GFX_MODE" != 0 ]; then + if [ "$supports_3d" == false ] || + [ "$(gsettings get com.canonical.Unity lowgfx)" == "true" ]; then + settings_profile="unity-lowgfx" + fi  fi  echo "Using compiz profile '$compiz_profile:$settings_profile'"  if [ -n "$UPSTART_SESSION" ]; then  initctl set-env -g COMPIZ_CONFIG_PROFILE="$compiz_profile" + initctl set-env -g UNITY_HAS_3D_SUPPORT="$supports_3d" + initctl set-env -g UNITY_DEFAULT_PROFILE="$settings_profile"  else  systemctl --user set-environment COMPIZ_CONFIG_PROFILE="$compiz_profile" + systemctl --user set-environment UNITY_HAS_3D_SUPPORT="$supports_3d" + systemctl --user set-environment UNITY_DEFAULT_PROFILE="$settings_profile"  fi  dbus-update-activation-environment --verbose COMPIZ_CONFIG_PROFILE="$compiz_profile" +dbus-update-activation-environment --verbose UNITY_HAS_3D_SUPPORT="$supports_3d" +dbus-update-activation-environment --verbose UNITY_DEFAULT_PROFILE="$settings_profile"  export COMPIZ_CONFIG_PROFILE="$compiz_profile" +export UNITY_HAS_3D_SUPPORT="$supports_3d" +export UNITY_DEFAULT_PROFILE="$settings_profile"  @UNITY_LIBDIR@/compiz-config-profile-setter $settings_profile  @UNITY_LIBDIR@/unity-active-plugins-safety-check | 
