aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/service.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/service.c b/src/service.c
index fe69c6d..7fead79 100644
--- a/src/service.c
+++ b/src/service.c
@@ -693,12 +693,16 @@ on_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
gpointer gself G_GNUC_UNUSED)
{
gchar *path;
-
- path = g_find_program_in_path ("unity-control-center");
- if (path != NULL)
- execute_command ("unity-control-center power");
- else
- execute_command ("gnome-control-center power");
+ if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity"))
+ {
+ path = g_find_program_in_path ("unity-control-center");
+ if (path != NULL)
+ execute_command ("unity-control-center power");
+ else
+ execute_command ("gnome-control-center power");
+ }
+ else if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "xubuntu"))
+ execute_command ("xfce4-power-manager-settings");
g_free (path);
}