-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathprefs.js
2241 lines (1989 loc) · 81.4 KB
/
prefs.js
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* V-Shell (Vertical Workspaces)
* prefs.js
*
* @author GdH <[email protected]>
* @copyright 2022 - 2024
* @license GPL-3.0
*/
'use strict';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import Gtk from 'gi://Gtk';
import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
import * as Settings from './lib/settings.js';
import * as OptionsFactory from './lib/optionsFactory.js';
// gettext
let _;
export default class VShell extends ExtensionPreferences {
_getPageList() {
const itemFactory = new OptionsFactory.ItemFactory();
const pageList = [
{
title: _('Profiles'),
iconName: 'open-menu-symbolic',
optionList: this._getProfilesOptionList(itemFactory),
},
{
title: _('Layout'),
iconName: 'view-grid-symbolic',
optionList: this._getLayoutOptionList(itemFactory),
},
{
title: _('Appearance'),
iconName: 'view-reveal-symbolic',
optionList: this._getAppearanceOptionList(itemFactory),
},
{
title: _('Behavior'),
iconName: 'system-run-symbolic',
optionList: this._getBehaviorOptionList(itemFactory),
},
{
title: _('App Grid'),
iconName: 'view-app-grid-symbolic',
optionList: this._getAppGridOptionList(itemFactory),
},
{
title: _('Modules'),
iconName: 'application-x-addon-symbolic',
optionList: this._getModulesOptionList(itemFactory),
},
{
title: _('Misc'),
iconName: 'preferences-other-symbolic',
optionList: this._getMiscOptionList(itemFactory),
},
{
title: _('About'),
iconName: 'preferences-system-details-symbolic',
optionList: this._getAboutOptionList(itemFactory),
},
];
return pageList;
}
fillPreferencesWindow(window) {
this.Me = {};
this.Me.Settings = Settings;
this.Me.gSettings = this.getSettings();
this.Me.gettext = this.gettext.bind(this);
_ = this.Me.gettext;
this.Me.metadata = this.metadata;
this.opt = new this.Me.Settings.Options(this.Me);
this.Me.opt = this.opt;
OptionsFactory.init(this.Me);
window = new OptionsFactory.AdwPrefs(this.opt).getFilledWindow(window, this._getPageList());
window.connect('close-request', () => {
this.opt.destroy();
this.opt = null;
this.Me = null;
_ = null;
});
window.set_default_size(840, 800);
}
// ////////////////////////////////////////////////////////////////////
_getProfilesOptionList(itemFactory) {
const optionList = [];
// options item format:
// (text, caption, widget, settings-variable, [options for combo], sensitivity-depends-on-bool-variable)
optionList.push(itemFactory.getRowWidget(
_('Custom Profiles'),
null
));
optionList.push(itemFactory.getRowWidget(
_('Save your configurations'),
_("The predefined sets of settings, which can help you with the initial configuration and exploring V-Shell's possibilities, can be renamed and overridden by your own configurations"),
itemFactory.newLabel()
));
optionList.push(itemFactory.getRowWidget(
_('Profile 1'),
null,
itemFactory.newPresetButton(this.opt, 1)
));
optionList.push(itemFactory.getRowWidget(
_('Profile 2'),
null,
itemFactory.newPresetButton(this.opt, 2)
));
optionList.push(itemFactory.getRowWidget(
_('Profile 3'),
null,
itemFactory.newPresetButton(this.opt, 3)
));
optionList.push(itemFactory.getRowWidget(
_('Profile 4'),
null,
itemFactory.newPresetButton(this.opt, 4)
));
return optionList;
}
_getLayoutOptionList(itemFactory) {
const optionList = [];
// options item format:
// (text, caption, widget, settings-variable, [options for combo], sensitivity-depends-on-bool-variable)
optionList.push(
itemFactory.getRowWidget(
_('Dash')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Dash Position'),
null,
itemFactory.newDropDown(),
'dashPosition',
[
[_('Bottom'), 2],
[_('Left'), 3],
[_('Top'), 0],
[_('Right'), 1],
[_('Hide'), 4],
],
'dashModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Center Horizontal Dash to Workspace'),
_('If the Dash Position is set to Top or Bottom, the position will be recalculated relative to the workspace preview instead of the screen'),
itemFactory.newSwitch(),
'centerDashToWs',
null,
'dashModule'
)
);
const dashPositionAdjustment = new Gtk.Adjustment({
upper: 100,
lower: -100,
step_increment: 1,
page_increment: 10,
});
const dashPositionScale = itemFactory.newScale(dashPositionAdjustment);
dashPositionScale.add_mark(0, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Fine Tune Dash Position'),
_('Adjusts the position of the dash on the axis given by the orientation of the workspaces'),
dashPositionScale,
'dashPositionAdjust',
null,
'dashModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Show Apps Icon Position'),
_('Sets the position of the "Show Applications" icon in the Dash'),
itemFactory.newDropDown(),
'showAppsIconPosition',
[
[_('Hide'), 2],
[_('Start'), 0],
[_('End'), 1],
],
'dashModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Thumbnails / Orientation')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Thumbnails Position / Workspaces Orientation'),
_('Position of the workspace thumbnails on the screen also sets orientation of the workspaces to vertical or horizontal. You have two options to disable workspace thumbnails, one sets workspaces to vertical orientation, the second one to horizontal.'),
itemFactory.newDropDown(),
'workspaceThumbnailsPosition',
// this mess is just because of backward compatibility
[
[_('Left \t Vertical Orientation'), 0],
[_('Right \t Vertical Orientation'), 1],
[_('Hide \t Vertical Orientation'), 4],
[_('Top \t Horizontal Orientation'), 5],
[_('Bottom \t Horizontal Orientation'), 6],
[_('Hide \t Horizontal Orientation'), 9],
]
)
);
const wstPositionAdjustment = new Gtk.Adjustment({
upper: 100,
lower: -100,
step_increment: 1,
page_increment: 10,
});
const wstPositionScale = itemFactory.newScale(wstPositionAdjustment);
wstPositionScale.add_mark(0, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Fine Tune Workspace Thumbnails Position'),
_('Adjusts the position of the thumbnails on the axis given by the orientation of the workspaces'),
wstPositionScale,
'wsTmbPositionAdjust'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Reserve Full Screen Height/Width for Thumbnails'),
_('The whole screen height/width will be reserved for workspace thumbnails at the expense of space available for Dash (if the Dash is oriented in a different axis).'),
itemFactory.newSwitch(),
'wsThumbnailsFull'
)
);
const wsThumbnailScaleAdjustment = new Gtk.Adjustment({
upper: 30,
lower: 0,
step_increment: 1,
page_increment: 1,
});
const wsThumbnailScale = itemFactory.newScale(wsThumbnailScaleAdjustment);
wsThumbnailScale.add_mark(13, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Thumbnails Max Scale - Window Picker'),
_('Adjusts the maximum size of the workspace thumbnails in the overview (percentage relative to display width)'),
wsThumbnailScale,
'wsThumbnailScale'
)
);
const wsThumbnailAppScaleAdjustment = new Gtk.Adjustment({
upper: 30,
lower: 0,
step_increment: 1,
page_increment: 1,
});
const wsThumbnailAppScale = itemFactory.newScale(wsThumbnailAppScaleAdjustment);
wsThumbnailAppScale.add_mark(13, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Thumbnails Max Scale - App View'),
_('Allows you to set different thumbnails scale for the Applications view'),
wsThumbnailAppScale,
'wsThumbnailScaleAppGrid'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Preview')
)
);
const wsScaleAdjustment = new Gtk.Adjustment({
upper: 100,
lower: 30,
step_increment: 1,
page_increment: 10,
});
const wsScaleScale = itemFactory.newScale(wsScaleAdjustment);
wsScaleScale.add_mark(100, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Workspaces Scale'),
_('Allows to shrink workspace previews to adjust spacing or fit more of the adjacent workspaces on the screen. Default size is calculated to use all available space with minimal spacing'),
wsScaleScale,
'wsPreviewScale'
)
);
const wsSpacingAdjustment = new Gtk.Adjustment({
upper: 500,
lower: 10,
step_increment: 1,
page_increment: 10,
});
const wsSpacingScale = itemFactory.newScale(wsSpacingAdjustment);
wsSpacingScale.add_mark(this.opt.WS_MAX_SPACING_OFF_SCREEN, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Workspaces Spacing'),
_('Adjusts spacing in pixels between workspace previews, allowing you to control how much the adjacent workspaces overlap in the current workspace overview. Setting the value above 349 pixels disables the visibility of workspaces other than the current one during transitions to/from the app grid view, which can also save some graphical resources if many windows are open on other workspaces'),
wsSpacingScale,
'wsMaxSpacing'
)
);
optionList.push(
itemFactory.getRowWidget(
_('App Grid')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Center App Grid'),
_('Centers the app grid relative to the display instead of available space'),
itemFactory.newSwitch(),
'centerAppGrid'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Search View')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Center Search View'),
_('Centers the search view relative to the display instead of available space'),
itemFactory.newSwitch(),
'centerSearch'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Always Show Search Entry'),
_('If disabled, the search entry field will be hidden when not in use, so the workspace preview and app grid may take up more space'),
itemFactory.newSwitch(),
'showSearchEntry'
)
);
const searchViewScaleAdjustment = new Gtk.Adjustment({
upper: 150,
lower: 50,
step_increment: 1,
page_increment: 1,
});
const searchViewScale = itemFactory.newScale(searchViewScaleAdjustment);
searchViewScale.add_mark(100, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Search Results Width'),
_('Adjusts the maximum width of search results view (percentage relative to default). This allows to fit more (or less) app icons into the app search result'),
searchViewScale,
'searchViewScale',
null,
'searchModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Panel')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Main Panel Position'),
_('Allows to place the main panel at the bottom of the primary display'),
itemFactory.newDropDown(),
'panelPosition',
[
[_('Top (Default)'), 0],
[_('Bottom'), 1],
],
'panelModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Main Panel Visibility'),
_('Allows to hide main panel when not needed'),
itemFactory.newDropDown(),
'panelVisibility',
[
[_('Always Visible (Default)'), 0],
[_('Overview Only'), 1],
[_('Always Hidden'), 2],
// [_('Desktop View Only'), 3],
],
'panelModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Switcher Popup')
)
);
const hAdjustment = new Gtk.Adjustment({
lower: 0,
upper: 100,
step_increment: 1,
page_increment: 1,
});
const hScale = itemFactory.newScale(hAdjustment);
hScale.add_mark(50, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Horizontal Position (percentage from the left)'),
_('This popup shows up when you switch workspace using a keyboard shortcut or gesture outside of the overview. You can disable it on the "Behavior" tab. If you want more control over the popup, try the "Workspace Switcher Manager" extension'),
hScale,
'wsSwPopupHPosition',
null,
'workspaceSwitcherPopupModule'
)
);
const vAdjustment = new Gtk.Adjustment({
lower: 0,
upper: 100,
step_increment: 1,
page_increment: 1,
});
const vScale = itemFactory.newScale(vAdjustment);
vScale.add_mark(50, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Vertical Position (percentage from the top)'),
null,
vScale,
'wsSwPopupVPosition',
null,
'workspaceSwitcherPopupModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Notifications and OSD')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Notification Banner Position'),
_('Choose where the notification banners appear on the screen'),
itemFactory.newDropDown(),
'notificationPosition',
[
[_('Top Left'), 0],
[_('Top Center (Default)'), 1],
[_('Top Right'), 2],
[_('Bottom Left'), 3],
[_('Bottom Center'), 4],
[_('Bottom Right'), 5],
],
'messageTrayModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('OSD Popup Position'),
_('Choose where the OSD pop-ups (like sound volume level) appear on the screen'),
itemFactory.newDropDown(),
'osdPosition',
[
[_('Disable'), 0],
[_('Top Left'), 1],
[_('Top Center'), 2],
[_('Top Right'), 3],
[_('Center'), 4],
[_('Bottom Left'), 5],
[_('Bottom Center (Default)'), 6],
[_('Bottom Right'), 7],
],
'osdWindowModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Secondary Monitors')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Thumbnails Position'),
_('Allows to place workspace thumbnails of secondary monitors on the opposite side than on the primary monitor'),
itemFactory.newDropDown(),
'secWsThumbnailsPosition',
[
[_('Same as Primary'), 2],
[_('Left / Top'), 0],
[_('Right / Bottom'), 1],
[_('Hide'), 3],
]
)
);
const secWstPositionAdjustment = new Gtk.Adjustment({
upper: 100,
lower: -100,
step_increment: 1,
page_increment: 10,
});
const secWstPositionScale = itemFactory.newScale(secWstPositionAdjustment);
secWstPositionScale.add_mark(0, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Fine Tune Workspace Thumbnails Position'),
_('Adjusts the position of the thumbnails on the axis given by the orientation of the workspaces'),
secWstPositionScale,
'secWsTmbPositionAdjust'
)
);
const secWsThumbnailScaleAdjustment = new Gtk.Adjustment({
upper: 30,
lower: 0,
step_increment: 1,
page_increment: 1,
});
const secWsThumbnailScale = itemFactory.newScale(secWsThumbnailScaleAdjustment);
secWsThumbnailScale.add_mark(13, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Thumbnails Max Scale'),
_('Adjusts maximum size of the workspace thumbnails (percentage relative to the display width / height) for secondary monitors'),
secWsThumbnailScale,
'secWsThumbnailScale'
)
);
const wsSecScaleAdjustment = new Gtk.Adjustment({
upper: 100,
lower: 30,
step_increment: 1,
page_increment: 10,
});
const wsSecScaleScale = itemFactory.newScale(wsSecScaleAdjustment);
wsScaleScale.add_mark(95, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Preview Scale'),
_('Allows to scale down workspace previews on secondary monitors'),
wsSecScaleScale,
'secWsPreviewScale'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Shift Overview by Panel Height'),
_('This option can help align the overview of the secondary monitor with the primary one'),
itemFactory.newSwitch(),
'secWsPreviewShift'
)
);
return optionList;
}
_getAppearanceOptionList(itemFactory) {
const optionList = [];
// options item format:
// (text, caption, widget, settings-variable, [options for combo], sensitivity-depends-on-bool-variable)
// ----------------------------------------------------------------
optionList.push(
itemFactory.getRowWidget(
_('Dash')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Dash Max Icon Size'),
_('Maximum size of Dash icons in pixels. Adaptive option switches between default 64 and 48 for low resolution displays'),
itemFactory.newDropDown(),
'dashMaxIconSize',
[
[_('Adaptive (Default)'), 0],
[_('128'), 128],
[_('112'), 112],
[_('96'), 96],
[_('80'), 80],
[_('64'), 64],
[_('48'), 48],
[_('32'), 32],
],
'dashModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Dash Background Style'),
_('Allows you to change the background color of the dash to match the search results an app folders'),
itemFactory.newDropDown(),
'dashBgColor',
[
[_('Default'), 0],
[_('Light'), 1],
],
'dashModule'
)
);
const dashBgAdjustment = new Gtk.Adjustment({
upper: 100,
lower: 0,
step_increment: 1,
page_increment: 10,
});
const dashBgOpacityScale = itemFactory.newScale(dashBgAdjustment);
optionList.push(
itemFactory.getRowWidget(
_('Dash Background Opacity'),
_('Adjusts the opacity of the Dash background'),
dashBgOpacityScale,
'dashBgOpacity',
null,
'dashModule'
)
);
const dashRadAdjustment = new Gtk.Adjustment({
upper: 50,
lower: 0,
step_increment: 1,
page_increment: 1,
});
const dashBgRadiusScale = itemFactory.newScale(dashRadAdjustment);
optionList.push(
itemFactory.getRowWidget(
_('Dash Background Radius'),
_('Adjusts the border radius of the Dash background in pixels. 0 means the default value given by the current theme style'),
dashBgRadiusScale,
'dashBgRadius',
null,
'dashModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Dash Background GNOME 3 Style'),
_('Background of the vertically oriented dash will imitate the GNOME 3 style'),
itemFactory.newSwitch(),
'dashBgGS3Style',
null,
'dashModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Running App Indicator'),
_('Allows you to change style of the running app indicator under the app icon'),
itemFactory.newDropDown(),
'runningDotStyle',
[
[_('Dot (Default)'), 0],
[_('Line'), 1],
],
'dashModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Thumbnails')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Show Workspace Thumbnail Labels'),
_('Each workspace thumbnail can show label with its index and name (if defined in the system settings) or name/title of its most recently used app/window'),
itemFactory.newDropDown(),
'showWsTmbLabels',
[
[_('Disable'), 0],
[_('Index'), 1],
[_('Index + WS Name'), 2],
[_('Index + App Name'), 3],
[_('Index + Window Title'), 4],
]
)
);
optionList.push(
itemFactory.getRowWidget(
_('Show WS Thumbnail Label on Hover'),
_('Show the label only when the mouse pointer hovers over the thumbnail'),
itemFactory.newSwitch(),
'showWsTmbLabelsOnHover'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Show Wallpaper in Workspace Thumbnails'),
_('All workspace thumbnails will include the current desktop background'),
itemFactory.newSwitch(),
'showWsSwitcherBg'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Window Preview')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Window Preview App Icon Size'),
null,
itemFactory.newDropDown(),
'winPreviewIconSize',
[
[_('64 (Default)'), 0],
[_('48'), 1],
[_('32'), 2],
[_('22'), 3],
[_('Disable'), 4],
],
'windowPreviewModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Window Title Position / Visibility'),
_('Sets the position of the window title that is displayed when the mouse hovers over the window or can always be visible'),
itemFactory.newDropDown(),
'winTitlePosition',
[
[_('Inside Window'), 0],
[_('Inside Window Always Visible'), 1],
[_('Below Window (Default)'), 2],
],
'windowPreviewModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Show Close Window Button'),
_('Allows you to hide close window button'),
itemFactory.newSwitch(),
'winPreviewShowCloseButton',
null,
'windowPreviewModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Preview')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Show Workspace Preview Background'),
_('Allows to hide the background of the workspace preview'),
itemFactory.newSwitch(),
'showWsPreviewBg'
)
);
const wsPreviewBgRadiusAdjustment = new Gtk.Adjustment({
upper: 60,
lower: 5,
step_increment: 1,
page_increment: 5,
});
const wsPreviewBgRadiusSpinButton = itemFactory.newScale(wsPreviewBgRadiusAdjustment);
wsPreviewBgRadiusSpinButton.add_mark(30, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Workspace Background Corner Radius'),
_('Adjusts the corner radius of the workspace preview in the overview'),
wsPreviewBgRadiusSpinButton,
'wsPreviewBgRadius'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Search')
)
);
optionList.push(
itemFactory.getRowWidget(
_('App Search Icon Size'),
_('Size of results provided by the App Search Provider - smaller size allows to fit more results. Adaptive option switches between default 96 and 64 for low resolution displays'),
itemFactory.newDropDown(),
'searchIconSize',
[
[_('Adaptive'), 0],
[_('128'), 128],
[_('112'), 112],
[_('96 (Default)'), 96],
[_('80'), 80],
[_('64'), 64],
[_('48'), 48],
[_('32'), 32],
],
'searchModule'
)
);
const maxSearchResultsAdjustment = new Gtk.Adjustment({
upper: 50,
lower: 5,
step_increment: 1,
page_increment: 5,
});
const maxSearchResultsSpinButton = itemFactory.newScale(maxSearchResultsAdjustment);
maxSearchResultsSpinButton.add_mark(10, Gtk.PositionType.TOP, null);
maxSearchResultsSpinButton.add_mark(20, Gtk.PositionType.TOP, null);
maxSearchResultsSpinButton.add_mark(30, Gtk.PositionType.TOP, null);
maxSearchResultsSpinButton.add_mark(40, Gtk.PositionType.TOP, null);
optionList.push(
itemFactory.getRowWidget(
_('Max Search Results Rows'),
_('Sets the maximum number of rows for result lists of all search providers except the window search provider which always lists all results'),
maxSearchResultsSpinButton,
'searchMaxResultsRows',
null,
'searchModule'
)
);
optionList.push(
itemFactory.getRowWidget(
_('Highlighting'),
_('The GNOME default highlighting style (bold) causes strings to be "randomly" ellipsized, often preventing you from seeing the whole string, even if there is space for it. The selected style will be applied to all search results globally. If you are using other extensions that offer this option, make sure you set the same setting in all of them.'),
itemFactory.newDropDown(),
'highlightingStyle',
[
[_('Bold (Default)'), 0],
[_('Underline'), 1],
[_('None'), 2],
]
)
);
optionList.push(
itemFactory.getRowWidget(
_('Overview Background')
)
);
optionList.push(
itemFactory.getRowWidget(
_('Show Wallpaper'),
_('Replaces the solid grey background in the overview with the current desktop wallpaper'),
itemFactory.newSwitch(),
'showBgInOverview'
)
);
const brightnessBgAdjustment = new Gtk.Adjustment({
upper: 100,
lower: 0,
step_increment: 1,
page_increment: 10,
});
const bgBrightnessScale = itemFactory.newScale(brightnessBgAdjustment);
optionList.push(
itemFactory.getRowWidget(
_('Brightness'),
_('Brightness of the background wallpaper in the overview'),
bgBrightnessScale,
'overviewBgBrightness'
)
);
const searchBrightnessBgAdjustment = new Gtk.Adjustment({
upper: 100,
lower: 0,
step_increment: 1,
page_increment: 10,
});
const searchBgBrightnessScale = itemFactory.newScale(searchBrightnessBgAdjustment);
optionList.push(
itemFactory.getRowWidget(
_('Brightness for Search View'),
_('Allows you to set a lower background brightness for search view mode where text visibility is more important'),
searchBgBrightnessScale,
'searchBgBrightness'
)
);
const blurBgAdjustment = new Gtk.Adjustment({
upper: 100,
lower: 0,
step_increment: 1,
page_increment: 10,
});
const bgBlurScale = itemFactory.newScale(blurBgAdjustment);
optionList.push(
itemFactory.getRowWidget(
_('Blur Window Picker Background'),
_('Sets the amount of background blur in the window picker view'),
bgBlurScale,
'overviewBgBlurSigma'
)
);
const blurAppBgAdjustment = new Gtk.Adjustment({
upper: 100,
lower: 0,
step_increment: 1,
page_increment: 10,
});
const bgAppBlurScale = itemFactory.newScale(blurAppBgAdjustment);
optionList.push(
itemFactory.getRowWidget(
_('Blur App Grid/Search View Background'),
_('Sets the amount of background blur in the app grid and search results views'),
bgAppBlurScale,
'appGridBgBlurSigma'