2
# -*- coding: utf-8 -*-
5
# J Phani Mahesh <phanimahesh@gmail.com>
6
# Barneedhar (jokerdino) <barneedhar@ubuntu.com>
7
# Amith KK <amithkumaran@gmail.com>
8
# Georgi Karavasilev <motorslav@gmail.com>
9
# Sam Tran <samvtran@gmail.com>
10
# Sam Hewitt <hewittsamuel@gmail.com>
11
# Angel Araya <al.arayaq@gmail.com>
14
# A One-stop configuration tool for Unity.
18
# This file is a part of Unity Tweak Tool
20
# Unity Tweak Tool is free software; you can redistribute it and/or modify it under
21
# the terms of the GNU General Public License as published by the Free Software
22
# Foundation; version 3.
24
# Unity Tweak Tool is distributed in the hope that it will be useful, but WITHOUT
25
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
26
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
29
# You should have received a copy of the GNU General Public License along with
30
# this program; if not, see <https://www.gnu.org/licenses/gpl-3.0.txt>
33
from UnityTweakTool.section.skeletonpage import Section,Tab
34
from UnityTweakTool.elements.switch import Switch
35
from UnityTweakTool.elements.cbox import ComboBox
37
from UnityTweakTool.section.sphagetti.unity import Unitysettings as SphagettiUnitySettings
38
from UnityTweakTool.elements.option import Option,HandlerObject
40
from collections import defaultdict
42
Unity=Section(ui='unity.ui',id='nb_unitysettings')
44
sw_launcher_hidemode= Switch({
45
'id' : 'sw_launcher_hidemode',
46
'builder' : Unity.builder,
47
'schema' : 'org.compiz.unityshell',
48
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
49
'key' : 'launcher-hide-mode',
51
'map' : {1:True,0:False},
52
'dependants': ['radio_reveal_left',
53
'radio_reveal_topleft',
54
'sc_reveal_sensitivity',
56
'l_launcher_reveal_sensitivity',
57
'l_autohide_animation',
58
'cbox_autohide_animation']
61
cbox_autohide_animation=ComboBox({
62
'id' : 'cbox_autohide_animation',
63
'builder' : Unity.builder,
64
'schema' : 'org.compiz.unityshell',
65
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
66
'key' : 'autohide-animation',
68
'map' : {0:0,1:1,2:2,3:3}
71
LauncherIcons=Tab([sw_launcher_hidemode,
72
cbox_autohide_animation])
75
sw_dash_blur= Switch({
76
'id' : 'sw_dash_blur',
77
'builder' : Unity.builder,
78
'schema' : 'org.compiz.unityshell',
79
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
80
'key' : 'dash-blur-experimental',
82
'map' : defaultdict(lambda:True,{2:True,0:False}),
83
'dependants': ['radio_dash_blur_smart',
84
'radio_dash_blur_static',
87
DashIcons=Tab([sw_dash_blur])
89
sw_transparent_panel= Switch({
90
'id' : 'sw_transparent_panel',
91
'builder' : Unity.builder,
92
'schema' : 'org.compiz.unityshell',
93
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
94
'key' : 'panel-opacity',
96
'map' : defaultdict(lambda:True,{0.33:True,1:False}),
97
'dependants': ['sc_panel_transparency',
98
'l_transparent_panel',
101
PanelIcons=Tab([sw_transparent_panel])
103
switch_unity_webapps= Switch({
104
'id' : 'switch_unity_webapps',
105
'builder' : Unity.builder,
106
'schema' : 'com.canonical.unity.webapps',
108
'key' : 'integration-allowed',
110
'map' : {True:True,False:False},
113
WebappsIcons=Tab([switch_unity_webapps])
116
# Each page must be added using add_page
117
Unity.add_page(LauncherIcons)
118
Unity.add_page(DashIcons)
119
#Unity.add_page(PanelIcons)
120
Unity.add_page(WebappsIcons)
122
# XXX : Sphagetti bridge
123
unitysettings=HandlerObject(SphagettiUnitySettings(Unity.builder))
124
Unity.add_page(unitysettings)
125
# After all pages are added, the section needs to be registered to start listening for events