summaryrefslogtreecommitdiffstats
path: root/extensions/45/vertical-workspaces/prefs.js
blob: 1369c8300ca334c6bb79f92c8c2cc567d7fb88b7 (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
/**
 * V-Shell (Vertical Workspaces)
 * prefs.js
 *
 * @author     GdH <G-dH@github.com>
 * @copyright  2022 - 2023
 * @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 = [
            {
                name: 'profiles',
                title: _('Profiles'),
                iconName: 'open-menu-symbolic',
                optionList: this._getProfilesOptionList(itemFactory),
            },
            {
                name: 'layout',
                title: _('Layout'),
                iconName: 'view-grid-symbolic',
                optionList: this._getLayoutOptionList(itemFactory),
            },
            {
                name: 'appearance',
                title: _('Appearance'),
                iconName: 'view-reveal-symbolic',
                optionList: this._getAppearanceOptionList(itemFactory),
            },
            {
                name: 'behavior',
                title: _('Behavior'),
                iconName: 'system-run-symbolic',
                optionList: this._getBehaviorOptionList(itemFactory),
            },
            {
                name: 'modules',
                title: _('Modules'),
                iconName: 'application-x-addon-symbolic',
                optionList: this._getModulesOptionList(itemFactory),
            },
            {
                name: 'misc',
                title: _('Misc'),
                iconName: 'preferences-other-symbolic',
                optionList: this._getMiscOptionList(itemFactory),
            },
            {
                name: 'about',
                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'),
                _('Sets of settings that can help you with the initial customization')
            )
        );

        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.newComboBox(),
                itemFactory.newDropDown(),
                'dashPosition',
                [
                    [_('Top'), 0],
                    [_('Right'), 1],
                    [_('Bottom'), 2],
                    [_('Left'), 3],
                    [_('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.newComboBox(),
                itemFactory.newDropDown(),
                'showAppsIconPosition',
                [
                    [_('Hide'), 2],
                    [_('Start'), 0],
                    [_('End'), 1],
                ],
                'dashModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Open Windows Icon Position'),
                _('Allows to add "Search Open Windows" icon into Dash (if window search provider enabled on the Modules tab) so you can directly toggle window search provider results. You can also use the secondary mouse button click on the Show Apps Icon, or the Space hotkey'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'dashShowWindowsIcon',
                [
                    [_('Hide'), 0],
                    [_('Start'), 1],
                    [_('End'), 2],
                ],
                'dashModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Recent Files Icon Position'),
                _('Allows to add "Search Recent Files" icon into Dash (if recent files search provider enabled on the Modules tab) so you can directly toggle recent files search provider results. You can also use Ctrl + Space hotkey'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'dashShowRecentFilesIcon',
                [
                    [_('Hide'), 0],
                    [_('Start'), 1],
                    [_('End'), 2],
                ],
                'dashModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Extensions Icon Position'),
                _('Allows to add "Search Extensions" icon into Dash (if extensions search provider enabled on the Module tab) so you can directly toggle extensions search provider results. You can also use the Ctrl + Shift + Space hotkey'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'dashShowExtensionsIcon',
                [
                    [_('Hide'), 0],
                    [_('Start'), 1],
                    [_('End'), 2],
                ],
                '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.newComboBox(),
                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 maximum size of the workspace thumbnails in the overview (% 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(350, Gtk.PositionType.TOP, null);
        optionList.push(
            itemFactory.getRowWidget(
                _('Workspaces Spacing'),
                _('Adjusts spacing between workspace previews so you can control how much of the adjacent workspaces overlap to the current workspace overview. Default value should set the adjacent workspaces off-screen.'),
                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'
            )
        );

        const agPageAdjustment = new Gtk.Adjustment({
            upper: 100,
            lower: 50,
            step_increment: 1,
            page_increment: 10,
        });

        const agPageWidthScale = itemFactory.newScale(agPageAdjustment);
        agPageWidthScale.add_mark(90, Gtk.PositionType.TOP, null);
        optionList.push(
            itemFactory.getRowWidget(
                _('App Grid Page Width Scale'),
                _('Adjusts max app grid page width relative to the available space.'),
                agPageWidthScale,
                'appGridPageWidthScale',
                null,
                'appDisplayModule'
            )
        );

        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 maximum width of search results view (% 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.newComboBox(),
                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.newComboBox(),
                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 (% from 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 (% from 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.newComboBox(),
                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.newComboBox(),
                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.newComboBox(),
                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 (% relative to 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(100, 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 Workspace Preview by Panel Height'),
                _('This option can help align overview of the secondary monitor with the primary monitor'),
                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'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'dashMaxIconSize',
                [
                    [_('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.newComboBox(),
                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.newComboBox(),
                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.newComboBox(),
                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.newComboBox(),
                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.newComboBox(),
                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(
                _('App Grid')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Icon Size'),
                _('Allows to set a fixed app grid icon size and bypass the default adaptive algorithm'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'appGridIconSize',
                [
                    [_('Adaptive (Default)'), -1],
                    [_('256'), 256],
                    [_('224'), 224],
                    [_('208'), 208],
                    [_('192'), 192],
                    [_('176'), 176],
                    [_('160'), 160],
                    [_('144'), 144],
                    [_('128'), 128],
                    [_('112'), 112],
                    [_('96'), 96],
                    [_('80'), 80],
                    [_('64'), 64],
                    [_('48'), 48],
                // [_('32'), 32],
                ],
                'appDisplayModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Folder Icon Size'),
                _('Allows to set a fixed icon size and bypass the default adaptive algorithm in the open folder dialog'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'appGridFolderIconSize',
                [
                    [_('Adaptive (Default)'), -1],
                    [_('128'), 128],
                    [_('112'), 112],
                    [_('96'), 96],
                    [_('80'), 80],
                    [_('64'), 64],
                    [_('48'), 48],
                    [_('32'), 32],
                ],
                'appDisplayModule'
            )
        );

        const folderIconGridCombo = itemFactory.newDropDown();
        optionList.push(
            itemFactory.getRowWidget(
                _('Max App Folder Icon Grid Size'),
                _('Sets a grid size (number of icons) in the folder preview. 3x3 options automatically switches between 2x2 and 3x3 grid depending on the number of icons in the folder'),
                folderIconGridCombo,
                'appGridFolderIconGrid',
                [
                    [_('2x2 (Default)'), 2],
                    [_('3x3 for 5+ apps'), 3],
                    [_('3x3 for 9+ apps'), 4],
                ],
                'appDisplayModule'
            )
        );

        const columnsAdjustment = new Gtk.Adjustment({
            upper: 15,
            lower: 0,
            step_increment: 1,
            page_increment: 1,
        });

        const columnsSpinBtn = itemFactory.newSpinButton(columnsAdjustment);
        optionList.push(itemFactory.getRowWidget(
            _('Columns per Page (0 for adaptive grid)'),
            _('Number of columns in the application grid. If set to 0 (the default), the number will be set automatically to fit the available width'),
            columnsSpinBtn,
            'appGridColumns',
            null,
            'appDisplayModule'
        ));

        const rowsAdjustment = new Gtk.Adjustment({
            upper: 15,
            lower: 0,
            step_increment: 1,
            page_increment: 1,
        });

        const rowsSpinBtn = itemFactory.newSpinButton(rowsAdjustment);
        optionList.push(itemFactory.getRowWidget(
            _('Rows per Page (0 for adaptive grid)'),
            _('Number of rows in the application grid. If set to 0 (the default), the number will be set automatically to fit the available height'),
            rowsSpinBtn,
            'appGridRows',
            null,
            'appDisplayModule'
        ));

        const folderColumnsAdjustment = new Gtk.Adjustment({
            upper: 15,
            lower: 0,
            step_increment: 1,
            page_increment: 1,
        });

        const folderColumnsSpinBtn = itemFactory.newSpinButton(folderColumnsAdjustment);
        optionList.push(itemFactory.getRowWidget(
            _('Folder Columns per Page (0 for adaptive grid)'),
            _('Number of columns in folder grid. If you leave the value at 0, the number of columns will be calculated to fit all the folder icons on one page'),
            folderColumnsSpinBtn,
            'appGridFolderColumns',
            null,
            'appDisplayModule'
        ));

        const folderRowsAdjustment = new Gtk.Adjustment({
            upper: 15,
            lower: 0,
            step_increment: 1,
            page_increment: 1,
        });

        const folderRowsSpinBtn = itemFactory.newSpinButton(folderRowsAdjustment);
        optionList.push(itemFactory.getRowWidget(
            _('Folder Rows per Page (0 for adaptive grid)'),
            _('Number of rows in folder grid. If you leave the value at 0, the number of rows will be calculated to fit all the folder icons on one page'),
            folderRowsSpinBtn,
            'appGridFolderRows',
            null,
            'appDisplayModule'
        ));

        const appGridSpacingAdjustment = new Gtk.Adjustment({
            upper: 30,
            lower: 5,
            step_increment: 1,
            page_increment: 5,
        });

        const appGridSpacingScale = itemFactory.newScale(appGridSpacingAdjustment);
        appGridSpacingScale.add_mark(12, Gtk.PositionType.TOP, null);
        optionList.push(
            itemFactory.getRowWidget(
                _('Grid Spacing'),
                _('Adjusts the spacing between icons in a grid, the real impact is on folders'),
                appGridSpacingScale,
                'appGridSpacing',
                null,
                'appDisplayModule'
            )
        );

        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'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'searchIconSize',
                [
                    [_('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(
                _('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'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Smooth Blur Transitions'),
                _('Allows for smoother blur transitions, but can affect the overall smoothness of overview animations on weak hardware'),
                itemFactory.newSwitch(),
                'smoothBlurTransitions'
            )
        );


        optionList.push(
            itemFactory.getRowWidget(
                _('Window Thumbnails (PIP)')
            )
        );

        const winTmbAdjustment = new Gtk.Adjustment({
            upper: 50,
            lower: 5,
            step_increment: 1,
            page_increment: 1,
        });

        const winTmbScale = itemFactory.newScale(winTmbAdjustment);
        winTmbScale.add_mark(15, Gtk.PositionType.TOP, null);
        optionList.push(
            itemFactory.getRowWidget(
                _('Default Window Thumbnail (PIP) Scale (% of screen height)'),
                _('Default scale of window thumbnail (like Picture In Picture) that you can create using the app icon menu or window preview action'),
                winTmbScale,
                'windowThumbnailScale'
            )
        );

        return optionList;
    }
    // ----------------------------------------------------------------

    _getBehaviorOptionList(itemFactory) {
        const optionList = [];

        optionList.push(
            itemFactory.getRowWidget(
                _('Overview')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Overview Mode'),
                _('The Expose Windows on Hover mode does not expose the workspace preview windows until the mouse pointer enters any window\nThe Static Workspace mode keeps the workspace static when you activate the overview, it only shows Dash, workspace thumbnails and search entry over the workspace and only clicking on an active workspace thumbnail activates the default overview'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'overviewMode',
                [
                    [_('Default'), 0],
                    [_('Expose Windows on Hover'), 1],
                    [_('Static Workspace'), 2],
                ]
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Startup State'),
                _('Allows to change the state in which GNOME Shell starts a session'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'startupState',
                [
                    [_('Overview (Default)'), 0],
                    [_('Desktop'), 1],
                    [_('Applications'), 2],
                ]
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Escape Key Behavior'),
                _('Allows you to close the overview with a single press of the Escape key, even from the application grid or from search, if the search entry field does not have focus'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'overviewEscBehavior',
                [
                    [_('Default'), 0],
                    [_('Close Overview'), 1],
                ],
                'searchControllerModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Overlay Key (Super/Windows)')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Single-Press Action'),
                _('Disable or change behavior when you press and release the Super key. The "Search Windows" options requires the WindowSearchProvider module to be activated'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'overlayKeyPrimary',
                [
                    [_('Disable'), 0],
                    [_('Follow Global Overview Mode'), 1],
                    [_('Overview (Default)'), 2],
                    [_('Applications'), 3],
                    [_('Overview - Static WS Preview'), 4],
                    [_('Overview - Static Workspace'), 5],
                    [_('Search Windows'), 6],
                // [_('Search Recent Files'), 7],
                ],
                'overlayKeyModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Double-Press Action'),
                _('Disable or change behavior when you double-press the Super key. The "Search Windows" option requires the WindowSearchProvider module to be activated. The "Static WS Overview - Expose Windows" option allows you to switch to default Activities Overview window picker view if you set static workspace (preview) for the single press/release Super key action'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'overlayKeySecondary',
                [
                    [_('Disable'), 0],
                    [_('Applications (Default)'), 1],
                    [_('Search Windows'), 2],
                    [_('Overview - Window Picker'), 3],
                // [_('Search Recent Files'), 4],
                ],
                'overlayKeyModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Hot Corner (Install Custom Hot Corners - Extended for more options)')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Hot Corner Action'),
                _('Disable or change behavior of the hot corner. Holding down the Ctrl key while hitting the hot corner switches between Overview/Applications actions'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'hotCornerAction',
                [
                    [_('Disable'), 0],
                    [_('Follow Global Overview Mode'), 1],
                    [_('Overview - Window Picker'), 2],
                    [_('Applications'), 3],
                    [_('Overview - Static WS Preview'), 4],
                    [_('Overview - Static Workspace'), 5],
                    [_('Search Windows'), 6],
                ],
                'layoutModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Hot Corner Position'),
                _('Choose which corner of your monitors will be active. If you choose "Follow Dash" option, the corner will be placed near the left or top edge of the Dash. The last option extends the hot corner trigger to cover the entire ege of the monitor where Dash is located'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'hotCornerPosition',
                [
                    [_('Default'), 0],
                    [_('Top Left'), 1],
                    [_('Top Right'), 2],
                    [_('Bottom Left'), 3],
                    [_('Bottom Right'), 4],
                    [_('Follow Dash'), 5],
                    [_('Follow Dash - Hot Edge'), 6],
                ],
                'layoutModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Enable Hot Corner in Full-Screen Mode'),
                _('If you often work with full-screen applications and want the hot corner to be usable'),
                itemFactory.newSwitch(),
                'hotCornerFullscreen',
                null,
                'layoutModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Show Ripples Animation'),
                _('The ripple animation is played when the hot corner is activated. The ripple size has been reduced to be less distracting'),
                itemFactory.newSwitch(),
                'hotCornerRipples',
                null,
                'layoutModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Dash')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Isolate Workspaces'),
                _('Dash will only show apps and windows from the current workspace'),
                itemFactory.newSwitch(),
                'dashIsolateWorkspaces',
                null,
                'dashModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('App Icon - Click Behavior'),
                _('Choose your preferred behavior when clicking on an app icon. The "Prefer Current Workspace" option opens a new app window if not present in the current workspace. The "Open New Window" option also switches behavior of the middle click to "Activate" since its default behavior is to open a new window'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'dashShowWindowsBeforeActivation',
                [
                    [_('Activate App Immediately'), 0],
                    [_('First Switch to Workspace'), 1],
                    [_('Open New Window (if supported)'), 2],
                    [_('Prefer Current Workspace'), 3],
                ],
                'dashModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('App Icon - Scroll Action'),
                _('Choose the behavior when scrolling over an app icon. The window cycler works with a list of windows sorted by the "Most Recently Used" and grouped by workspaces. Scrolling up cycles through previously used windows on the same workspace and then switches to another workspace, if any'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'dashIconScroll',
                [
                    [_('Default'), 0],
                    [_('Cycle App Windows - Highlight Selected'), 1],
                    [_('Cycle App Windows - Highlight App'), 2],
                ],
                'dashModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Search Windows Icon - Scroll Action'),
                _('Choose the behavior when scrolling over the Search Windows icon. The window cycler works with a list of windows sorted by "Most Recently Used" of the current workspace or all workspaces. Scrolling up cycles through previously used windows on the same workspace, or all windows regardless workspace. This option is mainly useful for the static workspace overview mode.'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'searchWindowsIconScroll',
                [
                    [_('Default'), 0],
                    [_('Cycle All Windows'), 1],
                    [_('Cycle Windows On Current WS'), 2],
                ],
                'dashModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Workspace Thumbnails')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Close Workspace Button'),
                _('The Close Workspace button appears on the workspace thumbnail when you hover over it and allows you to close all windows on the workspace. You can choose a "safety lock" to prevent accidental use'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'closeWsButtonMode',
                [
                    [_('Disable'), 0],
                    [_('Single Click'), 1],
                    [_('Double Click'), 2],
                    [_('Ctrl Key + Click'), 3],
                ]
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Window Preview')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Secondary Button Click Action'),
                _('Allows you to add a secondary mouse click action to the window preview'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'winPreviewSecBtnAction',
                [
                    [_('Activate Window (Default)'), 0],
                    [_('Close Window'), 1],
                    [_('Search For Same App Windows'), 2],
                    [_('Create Window Thumbnail - PIP'), 3],
                ],
                'windowPreviewModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Middle Button Click Action'),
                _('Allows you to add a middle mouse click action to the window preview'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'winPreviewMidBtnAction',
                [
                    [_('Activate Window (Default)'), 0],
                    [_('Close Window'), 1],
                    [_('Search For Same App Windows'), 2],
                    [_('Create Window Thumbnail - PIP'), 3],
                ],
                'windowPreviewModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('App Icon Click Action'),
                _('Select the action to take when the application icon on the window preview is clicked'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'windowIconClickAction',
                [
                    [_('Activate Window (Default)'), 0],
                    [_('Search For Same App Windows'), 1],
                    [_('Create Window Thumbnail - PIP'), 2],
                ],
                'windowPreviewModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Always Activate Selected'),
                _('If enabled, the currently selected window will be activated when leaving the Overview even without clicking. Usage example - press Super to open the Overview, place mouse pointer over a window, press Super again to activate the window'),
                itemFactory.newSwitch(),
                'alwaysActivateSelectedWindow',
                null,
                'windowPreviewModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('App Grid')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('App Grid Order'),
                _('Choose sorting method for the app grid. Note that sorting by usage ignores folders'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'appGridOrder',
                [
                    [_('Custom (Default)'), 0],
                    [_('Alphabet - Folders First'), 1],
                    [_('Alphabet - Folders Last'), 2],
                    [_('Usage - No Folders'), 3],
                ],
                'appDisplayModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('App Folder Order'),
                _('Choose sorting method for app folders'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'appFolderOrder',
                [
                    [_('Custom (Default)'), 0],
                    [_('Alphabet'), 1],
                    [_('Usage'), 2],
                ],
                'appDisplayModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('App Grid Content'),
                _('The default Shell removes favorite apps, this option allows to duplicate them in the grid or remove also running applications. Option "Favorites and Running First" only works with the Alphabet and Usage sorting'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'appGridContent',
                [
                    [_('Include All'), 0],
                    [_('Include All - Favorites and Running First'), 1],
                    [_('Exclude Favorites (Default)'), 2],
                    [_('Exclude Running'), 3],
                    [_('Exclude Favorites and Running'), 4],
                ],
                'appDisplayModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Active Icons in Folder Preview'),
                _('If enabled, icons in the folder review behaves like normal icons, you can activate or even drag them directly, without having to open the folder first'),
                itemFactory.newSwitch(),
                'appGridActivePreview',
                null,
                'appDisplayModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Center Open Folders'),
                _('App folder may open in the center of the screen or above the source folder icon'),
                itemFactory.newSwitch(),
                'appGridFolderCenter',
                null,
                'appDisplayModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Allow Incomplete Pages'),
                _('If disabled, icons from the next page (if any) are automatically moved to fill any empty slot left after an icon was (re)moved (to a folder for example)'),
                itemFactory.newSwitch(),
                'appGridIncompletePages',
                null,
                'appDisplayModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('App Labels Behavior'),
                _('Choose how and when to display app names'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'appGridNamesMode',
                [
                    [_('Ellipsized - Expand Selected (Default)'), 0],
                    [_('Always Expanded'), 1],
                    [_('Hidden - Show Selected Only'), 2],
                ],
                'appDisplayModule'
            )
        );

        optionList.push(itemFactory.getRowWidget(
            _('Reset App Grid Layout'),
            _('Removes all stored app grid positions, after reset icons will be sorted alphabetically, except folder contents'),
            itemFactory.newResetButton(() => {
                const settings = new Gio.Settings({ schema_id: 'org.gnome.shell' });
                settings.set_value('app-picker-layout', new GLib.Variant('aa{sv}', []));
            })
        ));

        optionList.push(itemFactory.getRowWidget(
            _('Remove App Grid Folders'),
            _('Removes all folders, folder apps will move to the root grid'),
            itemFactory.newResetButton(() => {
                const settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders' });
                settings.set_strv('folder-children', []);
            })
        ));


        optionList.push(
            itemFactory.getRowWidget(
                _('Search')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Window Search Provider - Sorting'),
                _('Choose the window sorting method'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'searchWindowsOrder',
                [
                    [_('Most Recently Used (MRU)'), 0],
                    [_('MRU - Current Workspace First'), 1],
                    [_('MRU - By Workspaces'), 2],
                    [_('Stable Sequence - By Workspaces'), 3],
                ],
                'windowSearchProviderModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Enable Fuzzy Match'),
                _('Enabling the fuzzy match allows you to skip letters in the pattern you are searching for and find "Firefox" even if you type "ffx". Works only for the App, Window and Recent files search providers'),
                itemFactory.newSwitch(),
                'searchFuzzy'
            )
        );

        /* const wspCommandSwitch = itemFactory.newSwitch();
    optionList.push(
        itemFactory.getRowWidget(
            _('Enable Commands in Search Entry'),
            _('You can use following commands separated by the space at the end of entered pattern:\n/x!   \t\t\t- close selected window\n/xa! \t\t\t- close all found windows\n/m[number] \t\t- (e.g. /m6) move selected window to workspace with given index\n/ma[number] \t- move all found windows to workspace with given index'),
            wspCommandSwitch,
            'searchWindowsCommands'
        )
    );*/

        optionList.push(
            itemFactory.getRowWidget(
                _('Animations - General')
            )
        );

        const animationSpeedAdjustment = new Gtk.Adjustment({
            upper: 500,
            lower: 1,
            step_increment: 10,
            page_increment: 100,
        });

        const animationSpeedScale = itemFactory.newScale(animationSpeedAdjustment);
        animationSpeedScale.add_mark(100, Gtk.PositionType.TOP, null);
        optionList.push(
            itemFactory.getRowWidget(
                _('Animation Speed'),
                _('Adjusts the global animation speed in % of the default duration - higher value means slower animation'),
                animationSpeedScale,
                'animationSpeedFactor'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Animations - Overview')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('App Grid Animation'),
                _('When entering the App Grid view, the app grid animates from the edge of the screen. You can choose the direction, keep the Default (direction will be selected automatically) or disable the animation if you don\'t like it'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'appGridAnimation',
                [
                    [_('Default'), 4],
                    [_('Disable'), 0],
                    [_('Right to Left'), 1],
                    [_('Left to Right'), 2],
                    [_('Bottom to Top'), 3],
                    [_('Top to Bottom'), 5],
                ]
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Search View Animation'),
                _('When search is activated the search view with search results can animate from the edge of the screen. You can choose the direction, keep the Default (currently Bottom to Top) or disable the animation if you don\'t like it.'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'searchViewAnimation',
                [
                    [_('Default'), 4],
                    [_('Disable'), 0],
                    [_('Right to Left'), 1],
                    [_('Left to Right'), 2],
                    [_('Bottom to Top'), 3],
                    [_('Top to Bottom'), 5],
                ]
            )
        );


        optionList.push(
            itemFactory.getRowWidget(
                _('Workspace Preview Animation'),
                _('When entering / leaving the App Grid / Search view, the workspace preview can animate to/from workspace thumbnail.'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'workspaceAnimation',
                [
                    [_('Disable'), 0],
                    [_('Enable'), 1],
                ]
            )
        );


        optionList.push(
            itemFactory.getRowWidget(
                _('Workspace Switcher')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Wraparound'),
                _('Continue from the last workspace to the first and vice versa'),
                itemFactory.newSwitch(),
                'wsSwitcherWraparound'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Ignore Last (empty) Workspace'),
                _('In Dynamic workspaces mode, there is always one empty workspace at the end. Switcher can ignore this last workspace'),
                itemFactory.newSwitch(),
                'wsSwitcherIgnoreLast'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Workspace Switcher Animation'),
                _('Allows you to disable movement of the desktop background during workspace switcher animation outside of the overview. The Static Background mode also keeps Conky and desktop icons on their place during switching.'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'workspaceSwitcherAnimation',
                [
                    [_('Default'), 0],
                    [_('Static Background'), 1],
                ],
                'workspaceAnimationModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Workspace Switcher Popup Mode'),
                _('This popup shows up when you switch workspace using a keyboard shortcut or gesture outside of the overview. You can to disable the popup at all, or show it on the current monitor (the one with mouse pointer) instead of the primary.'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'wsSwPopupMode',
                [
                    [_('Disable'), 0],
                    [_('Show on Primary Monitor (Default)'), 1],
                    [_('Show on Current Monitor'), 2],
                ],
                'workspaceSwitcherPopupModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Notifications')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Window Attention Handler'),
                _('When a window requires attention (often a new window), GNOME Shell shows you a notification about it. You can disable popups of these messages (notification will be pushed into the message tray silently) or focus the source window immediately instead'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'windowAttentionMode',
                [
                    [_('Show Notifications (Default)'), 0],
                    [_('Disable Notification Popups'), 1],
                    [_('Immediately Focus Window'), 2],
                ],
                'windowAttentionHandlerModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Favorites'),
                _('Disable pin/unpin app notifications'),
                // itemFactory.newComboBox(),
                itemFactory.newDropDown(),
                'favoritesNotify',
                [
                    [_('Show Notifications (Default)'), 1],
                    [_('Disable Notifications'), 0],
                ],
                'appFavoritesModule'
            )
        );

        return optionList;
    }

    _getModulesOptionList(itemFactory) {
        const optionList = [];
        // options item format:
        // (text, caption, widget, settings-variable, [options for combo], sensitivity-depends-on-bool-variable)
        optionList.push(
            itemFactory.getRowWidget(
                _('V-Shell Modules (allows you to disable modules that conflict with another extension)')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('WindowSearchProvider'),
                _('Activates the window search provider that adds open windows to the search results. You can search app names and window titles. You can also use "wq//" prefix (also by pressing the Space hotkey in the overview, or clicking dash icon) to suppress results from other search providers'),
                itemFactory.newSwitch(),
                'windowSearchProviderModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('RecentFilesSearchProvider'),
                _('Activates the recent files search provider that can be triggered by a dash icon, Ctrl + Space hotkey or by typing "fq//" prefix in the search entry field. This option needs File History option enabled in the GNOME Privacy settings'),
                itemFactory.newSwitch(),
                'recentFilesSearchProviderModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('ExtensionsSearchProvider'),
                _('Activates the extensions search provider that adds extensions to the search results. You can also use "eq//" prefix (also by pressing the Ctrl + Shift + Space hotkey in the overview, or clicking dash icon) to suppress results from other search providers'),
                itemFactory.newSwitch(),
                'extensionsSearchProviderModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('AppDisplay / IconGrid'),
                _('App grid customization and options'),
                itemFactory.newSwitch(),
                'appDisplayModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('AppFavorites'),
                _('Pin/unpin app notification options'),
                itemFactory.newSwitch(),
                'appFavoritesModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Dash'),
                _('Dash customization and options, support for vertical orientation'),
                itemFactory.newSwitch(),
                'dashModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Layout'),
                _('Hot corner options'),
                itemFactory.newSwitch(),
                'layoutModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('MessageTray'),
                _('Notification position options'),
                itemFactory.newSwitch(),
                'messageTrayModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('OsdWindow'),
                _('OSD position options'),
                itemFactory.newSwitch(),
                'osdWindowModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('OverlayKey'),
                _('Overlay (Super/Window) key options'),
                itemFactory.newSwitch(),
                'overlayKeyModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Panel'),
                _('Panel options'),
                itemFactory.newSwitch(),
                'panelModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Search'),
                _('Search view and app search provider customization and options'),
                itemFactory.newSwitch(),
                'searchModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('SearchController'),
                _('Escape key behavior options in the overview'),
                itemFactory.newSwitch(),
                'searchControllerModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('SwipeTracker'),
                _('Gestures for vertical workspace orientation'),
                itemFactory.newSwitch(),
                'swipeTrackerModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('WindowAttentionHandler'),
                _('Window attention handler options'),
                itemFactory.newSwitch(),
                'windowAttentionHandlerModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('WindowManager'),
                _('Fixes an upstream bug in the minimization animation of a full-screen window'),
                itemFactory.newSwitch(),
                'windowManagerModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('WindowPreview'),
                _('Window preview options, fixes an upstream bug that fills the system log with errors when you close a window from the overview or exit the overview with a gesture when any window is selected'),
                itemFactory.newSwitch(),
                'windowPreviewModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('WindowThumbnail'),
                _('Create Window Thumbnail (PIP) option in the app icon menu and window preview actions'),
                itemFactory.newSwitch(),
                'windowThumbnailModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Workspace'),
                _('Fixes workspace preview allocations for vertical workspaces orientation and window scaling in static overview modes'),
                itemFactory.newSwitch(),
                'workspaceModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('WorkspaceAnimation'),
                _('Static workspace animation option'),
                itemFactory.newSwitch(),
                'workspaceAnimationModule'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('WorkspaceSwitcherPopup'),
                _('Workspace switcher popup position options'),
                itemFactory.newSwitch(),
                'workspaceSwitcherPopupModule'
            )
        );

        return optionList;
    }

    _getMiscOptionList(itemFactory) {
        const optionList = [];
        // options item format:
        // (text, caption, widget, settings-variable, [options for combo], sensitivity-depends-on-bool-variable)

        optionList.push(
            itemFactory.getRowWidget(
                _('Keyboard')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Override Page Up/Down Shortcuts'),
                _('This option automatically overrides the (Shift +) Super + Page Up/Down keyboard shortcuts for the current workspace orientation. If you encounter any issues, check the configuration in the dconf editor'),
                itemFactory.newSwitch(),
                'enablePageShortcuts'
            )
        );

        /* optionList.push(
        itemFactory.getRowWidget(
            _('Compatibility')
        )
    );

    optionList.push(
        itemFactory.getRowWidget(
            _('Improve compatibility with Dash to Dock'),
            _('With the default Ubuntu Dock and other Dash To Dock forks, you may experience issues with Activities overview after you change Dock position or re-enable the extension. This option is enabled automatically if a replacement for the Dash is detected. In any case, using Dash to Dock extension with V-Shell is problematic and not recommended.'),
            itemFactory.newSwitch(),
            'fixUbuntuDock'
        )
    );*/

        optionList.push(
            itemFactory.getRowWidget(
                _('Performance')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Smooth App Grid Animations'),
                _('This option allows V-Shell to pre-realize app grid and app folders during session startup in order to avoid stuttering animations when using them for the first time. If enabled, the session startup needs a little bit more time to finish and necessary memory will be allocated at this time'),
                itemFactory.newSwitch(),
                'appGridPerformance'
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Workarounds')
            )
        );

        optionList.push(
            itemFactory.getRowWidget(
                _('Fix New Window Not In Focus'),
                _('If you often find that the app window you open from the Activities overview does not get focus, try enabling this option.'),
                itemFactory.newSwitch(),
                'newWindowFocusFix'
            )
        );

        return optionList;
    }

    _getAboutOptionList(itemFactory) {
        const optionList = [];

        optionList.push(itemFactory.getRowWidget(
            this.Me.metadata.name
        ));

        const versionName = this.Me.metadata['version-name'] ?? '';
        let version = this.Me.metadata['version'] ?? '';
        version = versionName && version ? `/${version}` : version;
        const versionStr = `${versionName}${version}`;
        optionList.push(itemFactory.getRowWidget(
            _('Version'),
            null,
            itemFactory.newLabel(versionStr)
        ));

        optionList.push(itemFactory.getRowWidget(
            _('Reset all options'),
            _('Set all options to default values.'),
            itemFactory.newOptionsResetButton()
        ));


        optionList.push(itemFactory.getRowWidget(
            _('Links')
        ));

        optionList.push(itemFactory.getRowWidget(
            _('Homepage'),
            _('Source code and more info about this extension'),
            itemFactory.newLinkButton('https://github.com/G-dH/vertical-workspaces')
        ));

        optionList.push(itemFactory.getRowWidget(
            _('Changelog'),
            _("See what's changed."),
            itemFactory.newLinkButton('https://github.com/G-dH/vertical-workspaces/blob/main/CHANGELOG.md')
        ));

        optionList.push(itemFactory.getRowWidget(
            _('GNOME Extensions'),
            _('Rate and comment V-Shell on the GNOME Extensions site'),
            itemFactory.newLinkButton('https://extensions.gnome.org/extension/5177')
        ));

        optionList.push(itemFactory.getRowWidget(
            _('Report a bug or suggest new feature'),
            _('Help me to help you!'),
            itemFactory.newLinkButton('https://github.com/G-dH/vertical-workspaces/issues')
        ));

        optionList.push(itemFactory.getRowWidget(
            _('Buy Me a Coffee'),
            _('If you like V-Shell, you can help me with my coffee expenses'),
            itemFactory.newLinkButton('https://buymeacoffee.com/georgdh')
        ));

        return optionList;
    }
}