diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2017-07-18 16:01:15 +0200 | 
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2017-07-18 16:01:15 +0200 | 
| commit | de32a50421f75816e1685e3d7a4cd317ba881898 (patch) | |
| tree | 0c23e9711c3d5fdc9457f7bd6153c71bf5bf73cf | |
| parent | 1da5274175ad542d0ca2e41b8565470cb163938e (diff) | |
compiz-profile-selector: use ligther syntax for updating env variables
And fixes badly set variables in systemd too (bzr r4245.2.16)
| -rw-r--r-- | tools/compiz-profile-selector.in | 24 | 
1 files changed, 11 insertions, 13 deletions
| diff --git a/tools/compiz-profile-selector.in b/tools/compiz-profile-selector.in index b5451bfea..6b87e2a5a 100644 --- a/tools/compiz-profile-selector.in +++ b/tools/compiz-profile-selector.in @@ -29,23 +29,21 @@ fi  echo "Using compiz profile '$compiz_profile:$settings_profile'" +export COMPIZ_CONFIG_PROFILE="$compiz_profile" +export UNITY_HAS_3D_SUPPORT="$supports_3d" +export UNITY_DEFAULT_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" + initctl set-env -g COMPIZ_CONFIG_PROFILE + initctl set-env -g UNITY_HAS_3D_SUPPORT + initctl set-env -g UNITY_DEFAULT_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" + update_env_args="--systemd"  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" +dbus-update-activation-environment $update_env_args --verbose COMPIZ_CONFIG_PROFILE +dbus-update-activation-environment $update_env_args --verbose UNITY_HAS_3D_SUPPORT +dbus-update-activation-environment $update_env_args --verbose UNITY_DEFAULT_PROFILE  @UNITY_LIBDIR@/compiz-config-profile-setter $settings_profile  @UNITY_LIBDIR@/unity-active-plugins-safety-check | 
