From a177575779ece032710f2af45dc066e0fcf34c2b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 1 Mar 2007 00:00:16 +0000 Subject: [PATCH] * Handle windowManager == "compiz". Load Compiz's GConf settings automatically and turn on most plugins. svn path=/nixos/trunk/; revision=8122 --- system/upstart.nix | 2 +- upstart-jobs/xserver.nix | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/system/upstart.nix b/system/upstart.nix index 83d4663563ae..7cd384ede53a 100644 --- a/system/upstart.nix +++ b/system/upstart.nix @@ -119,7 +119,7 @@ import ../upstart-jobs/gather.nix { ++ optional ["services" "xserver" "enable"] (import ../upstart-jobs/xserver.nix { inherit config; - inherit (pkgs) stdenv writeText lib xterm slim xorg mesa; + inherit (pkgs) stdenv writeText lib xterm slim xorg mesa compiz; inherit (pkgs.gnome) metacity GConf; fontDirectories = import ./fonts.nix {inherit pkgs;}; }) diff --git a/upstart-jobs/xserver.nix b/upstart-jobs/xserver.nix index 33c426481137..b06decf06e4a 100644 --- a/upstart-jobs/xserver.nix +++ b/upstart-jobs/xserver.nix @@ -1,4 +1,4 @@ -{ stdenv, writeText, lib, xorg, mesa, xterm, slim, metacity, GConf +{ stdenv, writeText, lib, xorg, mesa, xterm, slim, metacity, GConf, compiz , config @@ -67,11 +67,24 @@ let clientScript = writeText "xclient" " ${if windowManager == "twm" then " ${xorg.twm}/bin/twm & - " else if windowManager == "metacity" then " + " + + else if windowManager == "metacity" then " # !!! Hack: load the schemas for Metacity. GCONF_CONFIG_SOURCE=xml::~/.gconf ${GConf}/bin/gconftool-2 --makefile-install-rule ${metacity}/etc/gconf/schemas/*.schemas ${metacity}/bin/metacity & - " else abort ("unknown window manager "+ windowManager)} + " + + else if windowManager == "compiz" then " + # !!! Hack: load the schemas for Compiz. + GCONF_CONFIG_SOURCE=xml::~/.gconf ${GConf}/bin/gconftool-2 --makefile-install-rule ${compiz}/etc/gconf/schemas/*.schemas + ${GConf}/bin/gconftool-2 -t list --list-type=string --set /apps/compiz/general/allscreens/options/active_plugins [gconf,png,decoration,fade,minimize,move,resize,cube,switcher,rotate,place,scale,water,wobbly,zoom] + ${compiz}/bin/compiz gconf & + /nix/store/n4wkqkl9l1bikdq39hcxg1rwywavzzh9-compiz-0.3.6/bin/gtk-window-decorator & + " + + else abort ("unknown window manager "+ windowManager)} + ${xterm}/bin/xterm -ls ";