aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/CMakeLists.txt21
-rw-r--r--data/indicator-power.conf.in8
-rw-r--r--data/indicator-power.desktop.in4
-rw-r--r--data/indicator-power.upstart.desktop.in10
4 files changed, 36 insertions, 7 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 51fc415..0750128 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -55,6 +55,27 @@ install (FILES "${XDG_AUTOSTART_FILE}"
DESTINATION "${XDG_AUTOSTART_DIR}")
##
+## Upstart XDG Autostart Override
+##
+
+# where to install
+set (UPSTART_XDG_AUTOSTART_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/upstart/xdg/autostart")
+message (STATUS "${UPSTART_XDG_AUTOSTART_DIR} is the Upstart XDG autostart override dir")
+
+set (UPSTART_XDG_AUTOSTART_NAME "${CMAKE_PROJECT_NAME}.upstart.desktop")
+set (UPSTART_XDG_AUTOSTART_FILE "${CMAKE_CURRENT_BINARY_DIR}/${UPSTART_XDG_AUTOSTART_NAME}")
+set (UPSTART_XDG_AUTOSTART_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${UPSTART_XDG_AUTOSTART_NAME}.in")
+
+# build it
+set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}")
+configure_file ("${UPSTART_XDG_AUTOSTART_FILE_IN}" "${UPSTART_XDG_AUTOSTART_FILE}")
+
+# install it
+install (FILES "${UPSTART_XDG_AUTOSTART_FILE}"
+ DESTINATION "${UPSTART_XDG_AUTOSTART_DIR}"
+ RENAME "${XDG_AUTOSTART_NAME}")
+
+##
## Unity Indicator File
##
diff --git a/data/indicator-power.conf.in b/data/indicator-power.conf.in
index a2bc7aa..665fb35 100644
--- a/data/indicator-power.conf.in
+++ b/data/indicator-power.conf.in
@@ -1,11 +1,9 @@
-description "Indicator Power Backend"
+description "Indicator Power Service"
-# Want to move to indicator-services-[start|end], but that's not all
-# there yet. Use the signals that exist today for now.
-
-start on indicators-loaded or indicator-services-start
+start on indicator-services-start
stop on desktop-end or indicator-services-end
respawn
+respawn limit 2 10
exec @pkglibexecdir@/indicator-power-service
diff --git a/data/indicator-power.desktop.in b/data/indicator-power.desktop.in
index 28025a2..c2fd54c 100644
--- a/data/indicator-power.desktop.in
+++ b/data/indicator-power.desktop.in
@@ -2,8 +2,8 @@
Type=Application
Name=Indicator Power
Exec=@pkglibexecdir@/indicator-power-service
-NotShowIn=Unity;
+OnlyShowIn=Unity;GNOME;
NoDisplay=true
StartupNotify=false
Terminal=false
-
+AutostartCondition=GNOME3 unless-session gnome
diff --git a/data/indicator-power.upstart.desktop.in b/data/indicator-power.upstart.desktop.in
new file mode 100644
index 0000000..5f95f8e
--- /dev/null
+++ b/data/indicator-power.upstart.desktop.in
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=Indicator Power
+Exec=@pkglibexecdir@/indicator-power-service
+OnlyShowIn=Unity;GNOME;
+NoDisplay=true
+StartupNotify=false
+Terminal=false
+AutostartCondition=GNOME3 unless-session gnome
+Hidden=true