~ci-train-bot/unity/unity-ubuntu-disco-3336

« back to all changes in this revision

Viewing changes to tools/compiz-profile-selector.in

  • Committer: Bileto Bot
  • Author(s): Marco Trevisan (Treviño)
  • Date: 2017-04-25 17:58:05 UTC
  • mfrom: (4213.4.24 lowgfx-profile-setter)
  • Revision ID: ci-train-bot@canonical.com-20170425175805-gbceanvts5r3id6o
compiz-profile-setter: tool to update the current profile and use in systemd and Unity settings

Added a compiz-profile-setter tool that allows to change compiz profile, so we use
this to set the right profile when starting unity and when the gsettings key has changed.

So we can just toggle lowgfx profile on the fly by just doing
  gsettings set com.canonical.Unity lowgfx true|false (LP: #1668950)

Approved by: Andrea Azzarone

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
fi
14
14
 
15
15
compiz_profile="ubuntu"
 
16
settings_profile="unity"
16
17
 
17
18
if ! /usr/lib/nux/unity_support_test -p; then
18
 
  compiz_profile="ubuntu-lowgfx"
 
19
  settings_profile="unity-lowgfx"
19
20
fi
20
21
 
21
22
if [ "$(gsettings get com.canonical.Unity lowgfx)" == "true" ]; then
22
 
  compiz_profile="ubuntu-lowgfx"
 
23
  settings_profile="unity-lowgfx"
23
24
fi
24
25
 
25
 
echo "Using compiz profile '$compiz_profile'"
 
26
echo "Using compiz profile '$compiz_profile:$settings_profile'"
26
27
 
27
28
if [ -n "$UPSTART_SESSION" ]; then
28
29
  initctl set-env -g COMPIZ_CONFIG_PROFILE="$compiz_profile"
31
32
dbus-update-activation-environment --verbose --systemd COMPIZ_CONFIG_PROFILE="$compiz_profile"
32
33
 
33
34
export COMPIZ_CONFIG_PROFILE="$compiz_profile"
34
 
exec @UNITY_LIBDIR@/unity-active-plugins-safety-check
 
35
 
 
36
@UNITY_LIBDIR@/compiz-config-profile-setter $settings_profile
 
37
@UNITY_LIBDIR@/unity-active-plugins-safety-check