39
39
from UnityTweakTool.elements.spin import SpinButton
40
40
from UnityTweakTool.elements.switch import Switch
42
from UnityTweakTool.section.sphagetti.unity import Unitysettings as SphagettiUnitySettings
42
from UnityTweakTool.section.spaghetti.unity import Unitysettings as SpaghettiUnitySettings
43
43
from UnityTweakTool.elements.option import Option,HandlerObject
45
from UnityTweakTool.backends import gsettings
45
47
from collections import defaultdict
48
from gi.repository import Gtk
47
50
Unity=Section(ui='unity.ui',id='nb_unitysettings')
80
83
'id' : 'radio_reveal_left',
81
84
'builder' : Unity.builder,
82
85
'schema' : 'org.compiz.unityshell',
83
'path' : '/org/compiz/profiles/unity/plugins/unityshell',
86
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
84
87
'key' : 'reveal-trigger',
86
89
'group' : 'radio_reveal_topleft',
92
95
'id' : 'radio_reveal_topleft',
93
96
'builder' : Unity.builder,
94
97
'schema' : 'org.compiz.unityshell',
95
'path' : '/org/compiz/profiles/unity/plugins/unityshell',
98
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
96
99
'key' : 'reveal-trigger',
98
101
'group' : 'radio_reveal_topleft',
103
sw_launcher_transparent= Switch({
104
'id' : 'sw_launcher_transparent',
105
'builder' : Unity.builder,
106
'schema' : 'org.compiz.unityshell',
107
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
108
'key' : 'launcher-opacity',
110
'map' : defaultdict(lambda:True,{1:True,0:False}),
111
'dependants': ['l_launcher_transparency_scale',
112
'sc_launcher_transparency']
115
106
radio_launcher_visibility_all=Radio({
116
107
'id' : 'radio_launcher_visibility_all',
117
108
'builder' : Unity.builder,
118
109
'schema' : 'org.compiz.unityshell',
119
'path' : '/org/compiz/profiles/unity/plugins/unityshell',
110
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
120
111
'key' : 'num-launchers',
122
113
'group' : 'radio_launcher_visibility_primary',
128
119
'id' : 'radio_launcher_visibility_primary',
129
120
'builder' : Unity.builder,
130
121
'schema' : 'org.compiz.unityshell',
131
'path' : '/org/compiz/profiles/unity/plugins/unityshell',
122
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
132
123
'key' : 'num-launchers',
134
125
'group' : 'radio_launcher_visibility_primary',
199
189
'id' : 'sc_reveal_sensitivity',
200
190
'builder': Unity.builder,
201
191
'schema' : 'org.compiz.unityshell',
202
'path' : '/org/compiz/profiles/unity/plugins/unityshell',
192
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
203
193
'key' : 'edge-responsiveness',
204
194
'type' : 'double',
207
'ticks' : [] #[2.0] XXX : Correct this or get rid of ticks altogether
197
'ticks' : [(2.0,Gtk.PositionType.BOTTOM,None)] # XXX : Correct this or get rid of ticks altogether
201
sc_launcher_transparency=Scale({
202
'id' : 'sc_launcher_transparency',
203
'builder': Unity.builder,
204
'schema' : 'org.compiz.unityshell',
205
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
206
'key' : 'launcher-opacity',
208
'min' : 0.2, # TODO : Check these min max. Most prolly wrong.
209
'max' : 8.0, # But fine since they are ignored anyway.
210
'ticks' : [(0.666, Gtk.PositionType.BOTTOM, None)]
211
216
LauncherIcons=Tab([sw_launcher_hidemode,
212
217
cbox_autohide_animation,
213
218
radio_reveal_left,
214
219
radio_reveal_topleft,
215
sw_launcher_transparent,
216
220
radio_launcher_visibility_primary,
217
221
radio_launcher_visibility_all,
218
222
cbox_urgent_animation,
219
223
cbox_launch_animation,
220
224
cbox_launcher_icon_colouring,
221
225
spin_launcher_icon_size,
222
# sc_reveal_sensitivity,
226
sc_reveal_sensitivity,
227
sc_launcher_transparency,
223
228
color_launcher_color_cus])
225
230
#=============== DASH ==========================
242
247
'id' : 'radio_dash_blur_smart',
243
248
'builder' : Unity.builder,
244
249
'schema' : 'org.compiz.unityshell',
245
'path' : '/org/compiz/profiles/unity/plugins/unityshell',
250
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
246
251
'key' : 'dash-blur-experimental',
248
253
'group' : 'radio_dash_blur_static',
254
259
'id' : 'radio_dash_blur_static',
255
260
'builder' : Unity.builder,
256
261
'schema' : 'org.compiz.unityshell',
257
'path' : '/org/compiz/profiles/unity/plugins/unityshell',
262
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
258
263
'key' : 'dash-blur-experimental',
260
265
'group' : 'radio_dash_blur_static',
337
sw_transparent_panel= Switch({
338
'id' : 'sw_transparent_panel',
339
'builder' : Unity.builder,
340
'schema' : 'org.compiz.unityshell',
341
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
342
'key' : 'panel-opacity',
344
'map' : defaultdict(lambda:True,{0.33:True,1:False}),
345
'dependants': ['sc_panel_transparency',
346
'l_transparent_panel',
347
'check_panel_opaque']
342
sc_panel_transparency=Scale({
343
'id' : 'sc_panel_transparency',
344
'builder': Unity.builder,
345
'schema' : 'org.compiz.unityshell',
346
'path' : '/org/compiz/profiles/unity/plugins/unityshell/',
347
'key' : 'panel-opacity',
349
'min' : 0.2, # TODO : Check these min max. Most prolly wrong.
350
'max' : 8.0, # But fine since they are ignored anyway.
351
'ticks' : [(0.666, Gtk.PositionType.BOTTOM, None)]
350
355
check_panel_opaque= CheckBox({
351
356
'id' : 'check_panel_opaque',
737
741
Unity.add_page(WebappsIcons)
738
742
Unity.add_page(AdditionalIcons)
740
# XXX : Sphagetti bridge
741
unitysettings=HandlerObject(SphagettiUnitySettings(Unity.builder))
744
# XXX : Spaghetti bridge
745
unitysettings=HandlerObject(SpaghettiUnitySettings(Unity.builder))
742
746
Unity.add_page(unitysettings)
743
747
# After all pages are added, the section needs to be registered to start listening for events