diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-13 03:34:10 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-13 03:34:10 +0000 |
commit | 6a8e496233a6f6d632bdc7551a5fbda3543c27bb (patch) | |
tree | 28479fd17cf5a19838108ab4a17b6f3fb1e5cd88 /FusionIcon/start.py | |
download | fusion-icon-6a8e496233a6f6d632bdc7551a5fbda3543c27bb.tar.gz fusion-icon-6a8e496233a6f6d632bdc7551a5fbda3543c27bb.zip |
Added KDE3 version of fusion-icon for Compiz
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/fusion-icon@1102634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'FusionIcon/start.py')
-rw-r--r-- | FusionIcon/start.py | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/FusionIcon/start.py b/FusionIcon/start.py new file mode 100644 index 0000000..7dafdad --- /dev/null +++ b/FusionIcon/start.py @@ -0,0 +1,68 @@ +# This file is part of Fusion-icon. + +# Fusion-icon is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# Fusion-icon is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# Author(s): crdlb, nesl247 +# +# Copyright 2007 Christopher Williams <[email protected]> + +from parser import options as parser_options +from util import env, config, apps, options, wms, decorators + +def init(): + 'Final start function, should be called once when fusion-icon starts' + + if not parser_options.no_start: + # Do not restart the wm if it's already running + if wms.active == wms.active == wms.old != 'compiz': + #always restart compiz since we can't know compiz was started correctly + print ' * %s is already running' %wms[wms.active].label + else: + print ' * Starting %s' %wms[wms.active].label + wms.start() + +config.check() + +# Make some changes + +if not parser_options.force_compiz: + if wms.active not in wms: + print ' * "%s" not installed' %wms.active + if wms.fallback: + print ' ... setting to fallback...' + else: + print ' ... No fallback window manager chosen' + wms.active = wms.fallback +# if in a failsafe session, don't start with compiz (provides an easy way to make sure metacity starts for gnome users if compiz breaks) + if wms.active == 'compiz' and env.failsafe: + if wms.fallback: + print ' * Failsafe session, setting to fallback...' + else: + print ' ... No fallback window manager chosen' + + wms.active = wms.fallback + +elif 'compiz' in wms: + wms.active = 'compiz' + +else: + raise SystemExit, ' *** Error: "--force-compiz" used and compiz not installed!' + +# Set True if using Xorg AIGLX since the '--indirect-rendering' option has no effect in that situation. +env.set() +if env.tfp == 'indirect' and 'indirect rendering' in options: + options['indirect rendering'].sensitive = False + if not options['indirect rendering'].enabled: + options['indirect rendering'].enabled = True + |