[gnome-flashback/wip/muktupavels/compiz] data: install compiz configuration
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/wip/muktupavels/compiz] data: install compiz configuration
- Date: Sun, 17 Feb 2019 14:10:37 +0000 (UTC)
commit 01930dfdb98b51df238aa9b6deba8956c1569199
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Feb 17 16:09:38 2019 +0200
data: install compiz configuration
configure.ac | 32 ++++++++++++++++++++++++++++++++
data/Makefile.am | 23 ++++++++++++++++-------
data/compizconfig/Makefile.am | 24 ++++++++++++++++++++++++
data/compizconfig/gnome-flashback.conf | 5 +++++
data/compizconfig/gnome-flashback.ini | 2 ++
data/sessions/Makefile.am | 19 ++++++++++++-------
data/xsessions/Makefile.am | 10 ++++++++--
gnome-flashback/gf-main.c | 5 +++++
8 files changed, 104 insertions(+), 16 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a92b40d..cd6fd39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -269,6 +269,35 @@ PKG_CHECK_EXISTS([xrandr >= 1.5.0],
AC_DEFINE([HAVE_XRANDR15], [1],
[Define if XRandR is 1.5.0 or newer]))
+dnl **************************************************************************
+dnl Compiz session
+dnl **************************************************************************
+
+AC_ARG_WITH([compiz-session],
+ [AS_HELP_STRING([--with-compiz-session], [build with Compiz session support])],
+ [with_compiz_session="$withval"], [with_compiz_session="auto"])
+
+AS_IF([test "x$with_compiz_session" != "xno"], [
+ PKG_CHECK_EXISTS([libcompizconfig >= 0.9.14.0],
+ [found_compiz="yes"], [found_compiz="no"])
+
+ AS_IF([test "x$found_compiz" = "xyes"], [
+ AC_DEFINE([HAVE_COMPIZ_SESSION], [1], [Define if built with compiz session support])
+
+ COMPIZCONFIG_CONFIG_DIR=`$PKG_CONFIG --variable=configdir libcompizconfig`
+ AC_SUBST([COMPIZCONFIG_CONFIG_DIR], [$COMPIZCONFIG_CONFIG_DIR])
+
+ COMPIZCONFIG_UPGRADES_DIR=`$PKG_CONFIG --variable=upgradesdir libcompizconfig`
+ AC_SUBST([COMPIZCONFIG_UPGRADES_DIR], [$COMPIZCONFIG_UPGRADES_DIR])
+ ], [
+ AS_IF([test "x$with_compiz_session" = "xyes"], [
+ AC_MSG_ERROR([Compiz session requested but libcompizconfig not found])
+ ])
+ ])
+], [found_compiz=no])
+
+AM_CONDITIONAL(WITH_COMPIZ_SESSION, [test "x$found_compiz" = "xyes"])
+
dnl **************************************************************************
dnl Process .in files
dnl **************************************************************************
@@ -281,6 +310,7 @@ AC_CONFIG_FILES([
data/Makefile
data/applications/Makefile
data/autostart/Makefile
+ data/compizconfig/Makefile
data/directories/Makefile
data/menus/Makefile
data/schemas/Makefile
@@ -337,3 +367,5 @@ echo " libdir ......................: ${libdir}"
echo " sysconfdir ..................: ${sysconfdir}"
echo " libexecdir ..................: ${libexecdir}"
echo ""
+echo " Compiz session ..............: ${found_compiz}"
+echo ""
diff --git a/data/Makefile.am b/data/Makefile.am
index 4479e5b..3b48df0 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,6 +3,7 @@ NULL =
SUBDIRS = \
applications \
autostart \
+ compizconfig \
directories \
menus \
schemas \
@@ -13,29 +14,37 @@ SUBDIRS = \
$(NULL)
libexec_SCRIPTS = \
- gnome-flashback-compiz \
gnome-flashback-metacity \
$(NULL)
-gnome-flashback-compiz: Makefile
+gnome-flashback-metacity: Makefile
$(AM_V_GEN) (echo '#!/bin/sh' && echo '' && \
echo 'if [ -z $$XDG_CURRENT_DESKTOP ]; then' && \
echo ' export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"' && \
echo 'fi' && echo '' && \
- echo 'exec gnome-session --session=gnome-flashback-compiz "$$@"') > $@
+ echo 'exec gnome-session --session=gnome-flashback-metacity --disable-acceleration-check
"$$@"') > $@
$(AM_V_at) chmod a+x $@
-gnome-flashback-metacity: Makefile
+CLEANFILES = \
+ gnome-flashback-metacity \
+ $(NULL)
+
+if WITH_COMPIZ_SESSION
+libexec_SCRIPTS += \
+ gnome-flashback-compiz \
+ $(NULL)
+
+gnome-flashback-compiz: Makefile
$(AM_V_GEN) (echo '#!/bin/sh' && echo '' && \
echo 'if [ -z $$XDG_CURRENT_DESKTOP ]; then' && \
echo ' export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"' && \
echo 'fi' && echo '' && \
- echo 'exec gnome-session --session=gnome-flashback-metacity --disable-acceleration-check
"$$@"') > $@
+ echo 'exec gnome-session --session=gnome-flashback-compiz "$$@"') > $@
$(AM_V_at) chmod a+x $@
-CLEANFILES = \
+CLEANFILES += \
gnome-flashback-compiz \
- gnome-flashback-metacity \
$(NULL)
+endif
-include $(top_srcdir)/git.mk
diff --git a/data/compizconfig/Makefile.am b/data/compizconfig/Makefile.am
new file mode 100644
index 0000000..7542278
--- /dev/null
+++ b/data/compizconfig/Makefile.am
@@ -0,0 +1,24 @@
+NULL =
+
+config_files = \
+ gnome-flashback.conf \
+ gnome-flashback.ini \
+ $(NULL)
+
+upgrade_files = \
+ $(NULL)
+
+if WITH_COMPIZ_SESSION
+configdir = $(COMPIZCONFIG_CONFIG_DIR)
+config_DATA = $(config_files)
+
+upgradedir = $(COMPIZCONFIG_UPGRADES_DIR)
+upgrade_DATA = $(upgrade_files)
+endif
+
+EXTRA_DIST = \
+ $(config_files) \
+ $(upgrade_files) \
+ $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/compizconfig/gnome-flashback.conf b/data/compizconfig/gnome-flashback.conf
new file mode 100644
index 0000000..7ec7206
--- /dev/null
+++ b/data/compizconfig/gnome-flashback.conf
@@ -0,0 +1,5 @@
+[general_gnome-flashback]
+backend = gsettings
+integration = true
+plugin_list_autosort = true
+profile = gnome-flashback
diff --git a/data/compizconfig/gnome-flashback.ini b/data/compizconfig/gnome-flashback.ini
new file mode 100644
index 0000000..a989125
--- /dev/null
+++ b/data/compizconfig/gnome-flashback.ini
@@ -0,0 +1,2 @@
+[core]
+s0_active_plugins =
animation;commands;compiztoolbox;composite;core;decor;expo;ezoom;fade;gnomecompat;grid;imgpng;mousepoll;move;opengl;place;regex;resize;scale;session;vpswitch;wall
diff --git a/data/sessions/Makefile.am b/data/sessions/Makefile.am
index 3b2a452..be65ec8 100644
--- a/data/sessions/Makefile.am
+++ b/data/sessions/Makefile.am
@@ -42,12 +42,6 @@ space = $(NULL) $(NULL)
compiz = $(subst $(space),;,$(strip $(required_components_compiz)))
metacity = $(subst $(space),;,$(strip $(required_components_metacity)))
-gnome-flashback-compiz.session: Makefile.am gnome-flashback.session.in
- $(AM_V_GEN) sed \
- -e 's,[@]NAME[@],Compiz,g' \
- -e 's,[@]REQUIRED_COMPONENTS[@],$(compiz),g' \
- < $(srcdir)/gnome-flashback.session.in > $@
-
gnome-flashback-metacity.session: Makefile.am gnome-flashback.session.in
$(AM_V_GEN) sed \
-e 's,[@]NAME[@],Metacity,g' \
@@ -55,10 +49,21 @@ gnome-flashback-metacity.session: Makefile.am gnome-flashback.session.in
< $(srcdir)/gnome-flashback.session.in > $@
sessions = \
- gnome-flashback-compiz.session \
gnome-flashback-metacity.session \
$(NULL)
+if WITH_COMPIZ_SESSION
+gnome-flashback-compiz.session: Makefile.am gnome-flashback.session.in
+ $(AM_V_GEN) sed \
+ -e 's,[@]NAME[@],Compiz,g' \
+ -e 's,[@]REQUIRED_COMPONENTS[@],$(compiz),g' \
+ < $(srcdir)/gnome-flashback.session.in > $@
+
+sessions += \
+ gnome-flashback-compiz.session \
+ $(NULL)
+endif
+
sessiondir = $(datadir)/gnome-session/sessions
session_DATA = $(sessions)
diff --git a/data/xsessions/Makefile.am b/data/xsessions/Makefile.am
index 5e36dbd..a808885 100644
--- a/data/xsessions/Makefile.am
+++ b/data/xsessions/Makefile.am
@@ -1,10 +1,15 @@
NULL =
xsession_in_in_files = \
- gnome-flashback-compiz.desktop.in.in \
gnome-flashback-metacity.desktop.in.in \
$(NULL)
+if WITH_COMPIZ_SESSION
+xsession_in_in_files += \
+ gnome-flashback-compiz.desktop.in.in \
+ $(NULL)
+endif
+
xsessiondir = $(datadir)/xsessions
xsession_in_files = $(xsession_in_in_files:.desktop.in.in=.desktop.in)
xsession_DATA = $(xsession_in_files:.desktop.in=.desktop)
@@ -17,7 +22,8 @@ xsession_DATA = $(xsession_in_files:.desktop.in=.desktop)
-d $(top_srcdir)/po && mv $@-t $@
EXTRA_DIST = \
- $(xsession_in_in_files) \
+ gnome-flashback-compiz.desktop.in.in \
+ gnome-flashback-metacity.desktop.in.in \
$(NULL)
CLEANFILES = \
diff --git a/gnome-flashback/gf-main.c b/gnome-flashback/gf-main.c
index eebd53c..0e6aa33 100644
--- a/gnome-flashback/gf-main.c
+++ b/gnome-flashback/gf-main.c
@@ -132,6 +132,11 @@ session_ready_cb (GfSession *session,
if (initialize)
{
gf_session_set_environment (session, "XDG_MENU_PREFIX", "gnome-flashback-");
+
+#ifdef HAVE_COMPIZ_SESSION
+ gf_session_set_environment (session, "COMPIZ_CONFIG_PROFILE", "gnome-flashback");
+#endif
+
gf_session_register (session);
g_main_loop_quit (loop);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]