/
unity-tweak-tool
executable file
·72 lines (64 loc) · 2.43 KB
/
unity-tweak-tool
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Team:
# J Phani Mahesh <phanimahesh@gmail.com>
# Barneedhar (jokerdino) <barneedhar@ubuntu.com>
# Amith KK <amithkumaran@gmail.com>
# Georgi Karavasilev <motorslav@gmail.com>
# Sam Tran <samvtran@gmail.com>
# Sam Hewitt <hewittsamuel@gmail.com>
# Angel Araya <al.arayaq@gmail.com>
#
# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>
import argparse
import UnityTweakTool
import gettext
gettext.bindtextdomain('unity-tweak-tool')
_=gettext.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')
args=parser.parse_args()
if args.unity:
UnityTweakTool.Application(1)
elif args.winmng:
UnityTweakTool.Application(2)
elif args.appearance:
UnityTweakTool.Application(3)
elif args.system:
UnityTweakTool.Application(4)
elif args.reset_unity:
print(_("""
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':
UnityTweakTool.reset_all()
print(_("Please log out and log back in."))
else:
UnityTweakTool.Application()