Find file
616fdef Nov 27, 2013
@phanimahesh @jokerdino
executable file 80 lines (71 sloc) 2.73 KB
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Team:
# J Phani Mahesh <>
# Barneedhar (jokerdino) <>
# Amith KK <>
# Georgi Karavasilev <>
# Sam Tran <>
# Sam Hewitt <>
# Angel Araya <>
# Description:
# A One-stop configuration tool for Unity.
# Legal Stuff:
# This file is a part of Unity Tweak Tool
# Unity Tweak Tool 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; version 3.
# Unity Tweak Tool 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 <>
import argparse
import UnityTweakTool
import os
import gettext
parser = argparse.ArgumentParser()
optgrp = parser.add_mutually_exclusive_group()
optgrp.add_argument('-u', '--unity', help=_('Start in the Unity tab'), action='store_true')
optgrp.add_argument('-w', '--winmng', help=_('Start in the WindowManager tab'), action='store_true')
optgrp.add_argument('-a', '--appearance', help=_('Start in the appearance tab'), action='store_true')
optgrp.add_argument('-s', '--system', help=_('Start in the system tab'), action='store_true')
optgrp.add_argument('--reset-unity', help=_('Reset Unity, wiping all configuration changes.'), action='store_true')
# DBUS crashes if DISPLAY is not set.
# Make a safe bet that it is :0.
# If you have multi display/ ssh -X, you can prolly debug if there's an issue.
if "DISPLAY" not in os.environ:
os.environ["DISPLAY"] = ":0"
if args.unity:
elif args.winmng:
elif args.appearance:
elif args.system:
elif args.reset_unity:
WARNING: You are about to reset Unity to its default configuration.
This will result in loss of configuration.
It is normal for your desktop to flicker during the process.
Type yes to continue, anything else to exit.
prompt = input(_("Do you wish to continue?"))
if prompt.lower() == 'yes':
print(_("Please log out and log back in."))