diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-10 14:37:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-10 14:38:00 +0000 |
commit | 63dcc06bf83a178012909a708babedb71eeebd9a (patch) | |
tree | 7e1015b1f8ca941869e163d8d13fceb1036e202f /extensions/44/vertical-workspaces/prefs.js | |
parent | Releasing debian version 20230618-3. (diff) | |
download | gnome-shell-extensions-extra-63dcc06bf83a178012909a708babedb71eeebd9a.tar.xz gnome-shell-extensions-extra-63dcc06bf83a178012909a708babedb71eeebd9a.zip |
Merging upstream version 20231210.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | extensions/44/vertical-workspaces/prefs.js (renamed from extensions/vertical-workspaces/prefs.js) | 1039 |
1 files changed, 711 insertions, 328 deletions
diff --git a/extensions/vertical-workspaces/prefs.js b/extensions/44/vertical-workspaces/prefs.js index 6cea321..b757b91 100644 --- a/extensions/vertical-workspaces/prefs.js +++ b/extensions/44/vertical-workspaces/prefs.js @@ -9,115 +9,142 @@ 'use strict'; -const { Gtk, GLib } = imports.gi; +const Gtk = imports.gi.Gtk; +const GLib = imports.gi.GLib; +const Gio = imports.gi.Gio; const ExtensionUtils = imports.misc.extensionUtils; -const Me = ExtensionUtils.getCurrentExtension(); -const Settings = Me.imports.lib.settings; +const MyExtension = ExtensionUtils.getCurrentExtension(); +const OptionsFactory = MyExtension.imports.lib.optionsFactory; +const GObject = imports.gi.GObject; -const ItemFactory = Me.imports.lib.optionsFactory.ItemFactory; -const AdwPrefs = Me.imports.lib.optionsFactory.AdwPrefs; -const LegacyPrefs = Me.imports.lib.optionsFactory.LegacyPrefs; +let Me; +let _; +let opt; -const shellVersion = Settings.shellVersion; - -// gettext -const _ = Settings._; - -// libadwaita is available starting with GNOME Shell 42. -let Adw = null; -try { - Adw = imports.gi.Adw; -} catch (e) {} +function init() { + Me = {}; -let gOptions; -let pageList; -let itemFactory; + Me.shellVersion = parseFloat(imports.misc.config.PACKAGE_VERSION); + Me.imports = MyExtension.imports; + Me.metadata = MyExtension.metadata; + Me.gSettings = ExtensionUtils.getSettings(Me.metadata['settings-schema']); + Me.Settings = MyExtension.imports.lib.settings; + Me.gettext = imports.gettext.domain(Me.metadata['gettext-domain']).gettext; -function init() { - ExtensionUtils.initTranslations(Me.metadata['gettext-domain']); - gOptions = new Settings.Options(); + Me.opt = new Me.Settings.Options(Me); + _ = Me.gettext; + opt = Me.opt; - itemFactory = new ItemFactory(gOptions); + OptionsFactory.init(Me); +} - pageList = [ +function _getPageList() { + const itemFactory = new OptionsFactory.ItemFactory(); + const pageList = [ + { + name: 'profiles', + title: _('Profiles'), + iconName: 'open-menu-symbolic', + optionList: _getProfilesOptionList(itemFactory), + }, { name: 'layout', title: _('Layout'), iconName: 'view-grid-symbolic', - optionList: _getLayoutOptionList(), + optionList: _getLayoutOptionList(itemFactory), }, { name: 'appearance', title: _('Appearance'), iconName: 'view-reveal-symbolic', - optionList: _getAppearanceOptionList(), + optionList: _getAppearanceOptionList(itemFactory), }, { name: 'behavior', title: _('Behavior'), iconName: 'system-run-symbolic', - optionList: _getBehaviorOptionList(), + optionList: _getBehaviorOptionList(itemFactory), + }, + { + name: 'modules', + title: _('Modules'), + iconName: 'application-x-addon-symbolic', + optionList: _getModulesOptionList(itemFactory), }, { name: 'misc', title: _('Misc'), iconName: 'preferences-other-symbolic', - optionList: _getMiscOptionList(), - }, - { - name: 'profiles', - title: _('Profiles'), - iconName: 'open-menu-symbolic', - optionList: _getProfilesOptionList(), + optionList: _getMiscOptionList(itemFactory), }, { name: 'about', title: _('About'), iconName: 'preferences-system-details-symbolic', - optionList: _getAboutOptionList(), + optionList: _getAboutOptionList(itemFactory), }, ]; + + return pageList; } function fillPreferencesWindow(window) { - window = new AdwPrefs(gOptions).getFilledWindow(window, pageList); + window = new OptionsFactory.AdwPrefs(opt).getFilledWindow(window, _getPageList()); window.connect('close-request', () => { - gOptions.destroy(); - gOptions = null; - itemFactory = null; - pageList = null; + opt.destroy(); + opt = null; + Me = null; + _ = null; }); window.set_default_size(800, 800); } -function buildPrefsWidget() { - const prefsWidget = new LegacyPrefs(gOptions).getPrefsWidget(pageList); - - prefsWidget.connect('realize', widget => { - const window = widget.get_root ? widget.get_root() : widget.get_toplevel(); - const width = 800; - const height = 800; - window.set_default_size(width, height); - const headerbar = window.get_titlebar(); - headerbar.title_widget = prefsWidget._stackSwitcher; - - const signal = Gtk.get_major_version() === 3 ? 'destroy' : 'close-request'; - window.connect(signal, () => { - gOptions.destroy(); - gOptions = null; - }); - }); +// //////////////////////////////////////////////////////////////////// +function _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(opt, 1) + )); + + optionList.push(itemFactory.getRowWidget( + _('Profile 2'), + null, + itemFactory.newPresetButton(opt, 2) + )); + + optionList.push(itemFactory.getRowWidget( + _('Profile 3'), + null, + itemFactory.newPresetButton(opt, 3) + )); + + optionList.push(itemFactory.getRowWidget( + _('Profile 4'), + null, + itemFactory.newPresetButton(opt, 4) + )); - return prefsWidget; + return optionList; } -// //////////////////////////////////////////////////////////////////// -function _getLayoutOptionList() { +function _getLayoutOptionList(itemFactory) { const optionList = []; // options item format: - // [text, caption, widget, settings-variable, options for combo] + // (text, caption, widget, settings-variable, [options for combo], sensitivity-depends-on-bool-variable) optionList.push( itemFactory.getRowWidget( @@ -129,8 +156,8 @@ function _getLayoutOptionList() { itemFactory.getRowWidget( _('Dash Position'), null, - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'dashPosition', [ [_('Top'), 0], @@ -138,7 +165,8 @@ function _getLayoutOptionList() { [_('Bottom'), 2], [_('Left'), 3], [_('Hide'), 4], - ] + ], + 'dashModule' ) ); @@ -147,7 +175,9 @@ function _getLayoutOptionList() { _('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' + 'centerDashToWs', + null, + 'dashModule' ) ); @@ -165,7 +195,73 @@ function _getLayoutOptionList() { _('Fine Tune Dash Position'), _('Adjusts the position of the dash on the axis given by the orientation of the workspaces'), dashPositionScale, - 'dashPositionAdjust' + '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' ) ); @@ -180,17 +276,17 @@ function _getLayoutOptionList() { 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(), + // 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 Set Vertical Orientation'), 4], - [_('Top \t Horizontal Orientation'), 5], + [_('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 Set Horizontal Orientation'), 9], + [_('Hide \t Horizontal Orientation'), 9], ] ) ); @@ -233,7 +329,7 @@ function _getLayoutOptionList() { wsThumbnailScale.add_mark(13, Gtk.PositionType.TOP, null); optionList.push( itemFactory.getRowWidget( - _('Workspace Thumbnails Max Scale'), + _('Workspace Thumbnails Max Scale - Window Picker'), _('Adjusts maximum size of the workspace thumbnails in the overview (% relative to display width)'), wsThumbnailScale, 'wsThumbnailScale' @@ -248,11 +344,11 @@ function _getLayoutOptionList() { }); const wsThumbnailAppScale = itemFactory.newScale(wsThumbnailAppScaleAdjustment); - wsThumbnailAppScale.add_mark(0, Gtk.PositionType.TOP, null); + wsThumbnailAppScale.add_mark(13, Gtk.PositionType.TOP, null); optionList.push( itemFactory.getRowWidget( _('Workspace Thumbnails Max Scale - App View'), - _('Set to 0 to follow "Workspace Thumbnails Max Scale" scale. Allows you to set different thumbnails scale for the Applications view'), + _('Allows you to set different thumbnails scale for the Applications view'), wsThumbnailAppScale, 'wsThumbnailScaleAppGrid' ) @@ -330,7 +426,9 @@ function _getLayoutOptionList() { _('App Grid Page Width Scale'), _('Adjusts max app grid page width relative to the available space.'), agPageWidthScale, - 'appGridPageWidthScale' + 'appGridPageWidthScale', + null, + 'appDisplayModule' ) ); @@ -372,7 +470,9 @@ function _getLayoutOptionList() { _('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' + 'searchViewScale', + null, + 'searchModule' ) ); @@ -386,13 +486,14 @@ function _getLayoutOptionList() { itemFactory.getRowWidget( _('Main Panel Position'), _('Allows to place the main panel at the bottom of the primary display'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'panelPosition', [ [_('Top (Default)'), 0], [_('Bottom'), 1], - ] + ], + 'panelModule' ) ); @@ -400,15 +501,16 @@ function _getLayoutOptionList() { itemFactory.getRowWidget( _('Main Panel Visibility'), _('Allows to hide main panel when not needed'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'panelVisibility', [ [_('Always Visible (Default)'), 0], [_('Overview Only'), 1], [_('Always Hidden'), 2], // [_('Desktop View Only'), 3], - ] + ], + 'panelModule' ) ); @@ -434,7 +536,9 @@ function _getLayoutOptionList() { _('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' + 'wsSwPopupHPosition', + null, + 'workspaceSwitcherPopupModule' ) ); @@ -453,7 +557,9 @@ function _getLayoutOptionList() { _('Vertical Position (% from top)'), null, vScale, - 'wsSwPopupVPosition' + 'wsSwPopupVPosition', + null, + 'workspaceSwitcherPopupModule' ) ); @@ -467,17 +573,18 @@ function _getLayoutOptionList() { itemFactory.getRowWidget( _('Notification Banner Position'), _('Choose where the notification banners appear on the screen'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'notificationPosition', [ [_('Top Left'), 0], - [_('Top Center'), 1], - [_('Top Right (Default)'), 2], + [_('Top Center (Default)'), 1], + [_('Top Right'), 2], [_('Bottom Left'), 3], [_('Bottom Center'), 4], [_('Bottom Right'), 5], - ] + ], + 'messageTrayModule' ) ); @@ -485,8 +592,8 @@ function _getLayoutOptionList() { itemFactory.getRowWidget( _('OSD Popup Position'), _('Choose where the OSD pop-ups (like sound volume level) appear on the screen'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'osdPosition', [ [_('Disable'), 0], @@ -497,7 +604,8 @@ function _getLayoutOptionList() { [_('Bottom Left'), 5], [_('Bottom Center (Default)'), 6], [_('Bottom Right'), 7], - ] + ], + 'osdWindowModule' ) ); @@ -511,8 +619,8 @@ function _getLayoutOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'secWsThumbnailsPosition', [ [_('Same as Primary'), 2], @@ -543,7 +651,7 @@ function _getLayoutOptionList() { const secWsThumbnailScaleAdjustment = new Gtk.Adjustment({ upper: 30, - lower: 5, + lower: 0, step_increment: 1, page_increment: 1, }); @@ -591,10 +699,10 @@ function _getLayoutOptionList() { return optionList; } -function _getAppearanceOptionList() { +function _getAppearanceOptionList(itemFactory) { const optionList = []; // options item format: - // [text, caption, widget, settings-variable, options for combo] + // (text, caption, widget, settings-variable, [options for combo], sensitivity-depends-on-bool-variable) // ---------------------------------------------------------------- optionList.push( @@ -607,8 +715,8 @@ function _getAppearanceOptionList() { itemFactory.getRowWidget( _('Dash Max Icon Size'), _('Maximum size of Dash icons in pixels'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'dashMaxIconSize', [ [_('128'), 128], @@ -618,54 +726,23 @@ function _getAppearanceOptionList() { [_('64'), 64], [_('48'), 48], [_('32'), 32], - [_('24'), 24], - [_('16'), 16], - ] - ) - ); - - 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], - ] - ) - ); - - optionList.push( - itemFactory.getRowWidget( - _('Open Windows Icon Position'), - _('Allows to add "Search Open Windows" icon into Dash (if window search provider enabled on the Behavior 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 Behavior tab) so you can directly toggle recent files search provider results. You can also use Ctrl + Space hotkey'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), - 'dashShowRecentFilesIcon', + _('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', [ - [_('Hide'), 0], - [_('Start'), 1], - [_('End'), 2], - ] + [_('Default'), 0], + [_('Light'), 1], + ], + 'dashModule' ) ); @@ -682,7 +759,9 @@ function _getAppearanceOptionList() { _('Dash Background Opacity'), _('Adjusts the opacity of the Dash background'), dashBgOpacityScale, - 'dashBgOpacity' + 'dashBgOpacity', + null, + 'dashModule' ) ); @@ -699,7 +778,35 @@ function _getAppearanceOptionList() { _('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' + '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' ) ); @@ -713,8 +820,8 @@ function _getAppearanceOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'showWsTmbLabels', [ [_('Disable'), 0], @@ -754,8 +861,8 @@ function _getAppearanceOptionList() { itemFactory.getRowWidget( _('Window Preview App Icon Size'), null, - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'winPreviewIconSize', [ [_('64 (Default)'), 0], @@ -763,16 +870,35 @@ function _getAppearanceOptionList() { [_('32'), 2], [_('22'), 3], [_('Disable'), 4], - ] + ], + 'windowPreviewModule' ) ); optionList.push( itemFactory.getRowWidget( - _('Always Show Window Titles'), - _('All windows on the workspace preview will still show their titles, not only the one with the mouse pointer'), + _('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(), - 'alwaysShowWinTitles' + 'winPreviewShowCloseButton', + null, + 'windowPreviewModule' ) ); @@ -820,8 +946,8 @@ function _getAppearanceOptionList() { itemFactory.getRowWidget( _('Icon Size'), _('Allows to set a fixed app grid icon size and bypass the default adaptive algorithm'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'appGridIconSize', [ [_('Adaptive (Default)'), -1], @@ -839,7 +965,8 @@ function _getAppearanceOptionList() { [_('64'), 64], [_('48'), 48], // [_('32'), 32], - ] + ], + 'appDisplayModule' ) ); @@ -847,8 +974,8 @@ function _getAppearanceOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'appGridFolderIconSize', [ [_('Adaptive (Default)'), -1], @@ -859,23 +986,24 @@ function _getAppearanceOptionList() { [_('64'), 64], [_('48'), 48], [_('32'), 32], - ] + ], + 'appDisplayModule' ) ); - const folderIconGridCombo = itemFactory.newComboBox(); + 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, - // itemFactory.newDropDown(), 'appGridFolderIconGrid', [ [_('2x2 (Default)'), 2], [_('3x3 for 5+ apps'), 3], [_('3x3 for 9+ apps'), 4], - ] + ], + 'appDisplayModule' ) ); @@ -891,7 +1019,9 @@ function _getAppearanceOptionList() { _('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' + 'appGridColumns', + null, + 'appDisplayModule' )); const rowsAdjustment = new Gtk.Adjustment({ @@ -906,11 +1036,13 @@ function _getAppearanceOptionList() { _('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' + 'appGridRows', + null, + 'appDisplayModule' )); const folderColumnsAdjustment = new Gtk.Adjustment({ - upper: 8, + upper: 15, lower: 0, step_increment: 1, page_increment: 1, @@ -921,11 +1053,13 @@ function _getAppearanceOptionList() { _('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' + 'appGridFolderColumns', + null, + 'appDisplayModule' )); const folderRowsAdjustment = new Gtk.Adjustment({ - upper: 8, + upper: 15, lower: 0, step_increment: 1, page_increment: 1, @@ -936,7 +1070,9 @@ function _getAppearanceOptionList() { _('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' + 'appGridFolderRows', + null, + 'appDisplayModule' )); const appGridSpacingAdjustment = new Gtk.Adjustment({ @@ -951,9 +1087,11 @@ function _getAppearanceOptionList() { optionList.push( itemFactory.getRowWidget( _('Grid Spacing'), - _('Adjusts spacing between icons.'), + _('Adjusts the spacing between icons in a grid, the real impact is on folders'), appGridSpacingScale, - 'appGridSpacing' + 'appGridSpacing', + null, + 'appDisplayModule' ) ); @@ -967,8 +1105,8 @@ function _getAppearanceOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'searchIconSize', [ [_('128'), 128], @@ -978,7 +1116,8 @@ function _getAppearanceOptionList() { [_('64'), 64], [_('48'), 48], [_('32'), 32], - ] + ], + 'searchModule' ) ); @@ -999,7 +1138,9 @@ function _getAppearanceOptionList() { _('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' + 'searchMaxResultsRows', + null, + 'searchModule' ) ); @@ -1036,6 +1177,23 @@ function _getAppearanceOptionList() { ) ); + 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, @@ -1079,11 +1237,36 @@ function _getAppearanceOptionList() { ) ); + + 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 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; } // ---------------------------------------------------------------- -function _getBehaviorOptionList() { +function _getBehaviorOptionList(itemFactory) { const optionList = []; optionList.push( @@ -1096,8 +1279,8 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'overviewMode', [ [_('Default'), 0], @@ -1111,8 +1294,8 @@ function _getBehaviorOptionList() { itemFactory.getRowWidget( _('Startup State'), _('Allows to change the state in which GNOME Shell starts a session'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'startupState', [ [_('Overview (Default)'), 0], @@ -1124,23 +1307,61 @@ function _getBehaviorOptionList() { 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" options require the respective search provider to be activated'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + _('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], - [_('Search Recent Files'), 3], - ] + [_('Overview - Window Picker'), 3], + // [_('Search Recent Files'), 4], + ], + 'overlayKeyModule' ) ); @@ -1154,24 +1375,28 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'hotCornerAction', [ [_('Disable'), 0], - [_('Overview'), 1], - [_('Applications'), 2], - [_('Search Windows'), 3], - ] + [_('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 barrier to cover the entire ege of the monitor where Dash is located'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + _('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], @@ -1181,7 +1406,8 @@ function _getBehaviorOptionList() { [_('Bottom Right'), 4], [_('Follow Dash'), 5], [_('Follow Dash - Hot Edge'), 6], - ] + ], + 'layoutModule' ) ); @@ -1190,8 +1416,9 @@ function _getBehaviorOptionList() { _('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(), - // itemFactory.newDropDown(), - 'hotCornerFullscreen' + 'hotCornerFullscreen', + null, + 'layoutModule' ) ); @@ -1200,8 +1427,9 @@ function _getBehaviorOptionList() { _('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(), - // itemFactory.newDropDown(), - 'hotCornerRipples' + 'hotCornerRipples', + null, + 'layoutModule' ) ); @@ -1213,16 +1441,29 @@ function _getBehaviorOptionList() { 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'), - _('if the app you clicked on has more than one window and the recently used window is not on the current workspace, the overview can switch to the workspace with the recent window'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + _('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' ) ); @@ -1230,14 +1471,15 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'dashIconScroll', [ [_('Default'), 0], [_('Cycle App Windows - Highlight Selected'), 1], [_('Cycle App Windows - Highlight App'), 2], - ] + ], + 'dashModule' ) ); @@ -1245,14 +1487,15 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'searchWindowsIconScroll', [ [_('Default'), 0], [_('Cycle All Windows'), 1], [_('Cycle Windows On Current WS'), 2], - ] + ], + 'dashModule' ) ); @@ -1266,8 +1509,8 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'closeWsButtonMode', [ [_('Disable'), 0], @@ -1286,23 +1529,64 @@ function _getBehaviorOptionList() { 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(), - // itemFactory.newDropDown(), - 'alwaysActivateSelectedWindow' + _('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( + 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( - _('App Icon Activates Window Search'), - _('If enabled, clicking a window preview icon will activate a search view with the application name as the search term, so you can list all app windows from all workspaces and filter them by typing.'), + _('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(), - // itemFactory.newDropDown(), - 'windowIconClickSearch' + 'alwaysActivateSelectedWindow', + null, + 'windowPreviewModule' ) - );*/ + ); optionList.push( itemFactory.getRowWidget( @@ -1312,16 +1596,34 @@ function _getBehaviorOptionList() { optionList.push( itemFactory.getRowWidget( - _('Apps Order'), - _('Choose sorting method for the app grid. Note that sorting by alphabet and usage ignores folders'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + _('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' ) ); @@ -1329,8 +1631,8 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'appGridContent', [ [_('Include All'), 0], @@ -1338,7 +1640,8 @@ function _getBehaviorOptionList() { [_('Exclude Favorites (Default)'), 2], [_('Exclude Running'), 3], [_('Exclude Favorites and Running'), 4], - ] + ], + 'appDisplayModule' ) ); @@ -1347,8 +1650,9 @@ function _getBehaviorOptionList() { _('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(), - // itemFactory.newDropDown(), - 'appGridActivePreview' + 'appGridActivePreview', + null, + 'appDisplayModule' ) ); @@ -1357,8 +1661,9 @@ function _getBehaviorOptionList() { _('Center Open Folders'), _('App folder may open in the center of the screen or above the source folder icon'), itemFactory.newSwitch(), - // itemFactory.newDropDown(), - 'appGridFolderCenter' + 'appGridFolderCenter', + null, + 'appDisplayModule' ) ); @@ -1367,8 +1672,9 @@ function _getBehaviorOptionList() { _('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(), - // itemFactory.newDropDown(), - 'appGridIncompletePages' + 'appGridIncompletePages', + null, + 'appDisplayModule' ) ); @@ -1376,14 +1682,15 @@ function _getBehaviorOptionList() { itemFactory.getRowWidget( _('App Labels Behavior'), _('Choose how and when to display app names'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'appGridNamesMode', [ [_('Ellipsized - Expand Selected (Default)'), 0], [_('Always Expanded'), 1], [_('Hidden - Show Selected Only'), 2], - ] + ], + 'appDisplayModule' ) ); @@ -1391,7 +1698,7 @@ function _getBehaviorOptionList() { _('Reset App Grid Layout'), _('Removes all stored app grid positions, after reset icons will be sorted alphabetically, except folder contents'), itemFactory.newResetButton(() => { - const settings = ExtensionUtils.getSettings('org.gnome.shell'); + const settings = new Gio.Settings({ schema_id: 'org.gnome.shell' }); settings.set_value('app-picker-layout', new GLib.Variant('aa{sv}', [])); }) )); @@ -1400,7 +1707,7 @@ function _getBehaviorOptionList() { _('Remove App Grid Folders'), _('Removes all folders, folder apps will move to the root grid'), itemFactory.newResetButton(() => { - const settings = ExtensionUtils.getSettings('org.gnome.desktop.app-folders'); + const settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders' }); settings.set_strv('folder-children', []); }) )); @@ -1418,21 +1725,29 @@ function _getBehaviorOptionList() { ) );*/ - optionList.push( + /* optionList.push( itemFactory.getRowWidget( _('Enable Window Search Provider'), _('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(), 'searchWindowsEnable' ) - ); + );*/ optionList.push( itemFactory.getRowWidget( - _('Enable Recent Files Search Provider'), - _('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(), - 'searchRecentFilesEnable' + _('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' ) ); @@ -1489,8 +1804,8 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'appGridAnimation', [ [_('Default'), 4], @@ -1507,8 +1822,8 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'searchViewAnimation', [ [_('Default'), 4], @@ -1526,8 +1841,8 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'workspaceAnimation', [ [_('Disable'), 0], @@ -1545,15 +1860,34 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'workspaceSwitcherAnimation', [ [_('Default'), 0], [_('Static Background'), 1], - ] + ], + 'workspaceAnimationModule' ) ); @@ -1561,18 +1895,18 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'wsSwPopupMode', [ [_('Disable'), 0], [_('Show on Primary Monitor (Default)'), 1], [_('Show on Current Monitor'), 2], - ] + ], + 'workspaceSwitcherPopupModule' ) ); - optionList.push( itemFactory.getRowWidget( _('Notifications') @@ -1583,14 +1917,15 @@ function _getBehaviorOptionList() { 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(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'windowAttentionMode', [ [_('Show Notifications (Default)'), 0], [_('Disable Notification Popups'), 1], [_('Immediately Focus Window'), 2], - ] + ], + 'windowAttentionHandlerModule' ) ); @@ -1598,96 +1933,63 @@ function _getBehaviorOptionList() { itemFactory.getRowWidget( _('Favorites'), _('Disable pin/unpin app notifications'), - itemFactory.newComboBox(), - // itemFactory.newDropDown(), + // itemFactory.newComboBox(), + itemFactory.newDropDown(), 'favoritesNotify', [ [_('Show Notifications (Default)'), 1], [_('Disable Notifications'), 0], - ] - ) - ); - - return optionList; -} - -function _getProfilesOptionList() { - const optionList = []; - // options item format: - // [text, caption, widget, settings-variable, options for combo] - - optionList.push( - itemFactory.getRowWidget( - _('Custom Profiles'), - _('Sets of settings that can help you with the initial customization') + ], + 'appFavoritesModule' ) ); - optionList.push(itemFactory.getRowWidget( - _('Profile 1'), - null, - itemFactory.newPresetButton(gOptions, 1) - )); - - optionList.push(itemFactory.getRowWidget( - _('Profile 2'), - null, - itemFactory.newPresetButton(gOptions, 2) - )); - - optionList.push(itemFactory.getRowWidget( - _('Profile 3'), - null, - itemFactory.newPresetButton(gOptions, 3) - )); - - optionList.push(itemFactory.getRowWidget( - _('Profile 4'), - null, - itemFactory.newPresetButton(gOptions, 4) - )); - return optionList; } -function _getMiscOptionList() { +function _getModulesOptionList(itemFactory) { const optionList = []; // options item format: - // [text, caption, widget, settings-variable, options for combo] - + // (text, caption, widget, settings-variable, [options for combo], sensitivity-depends-on-bool-variable) optionList.push( itemFactory.getRowWidget( - _('Keyboard') + _('V-Shell Modules (allows you to disable modules that conflict with another extension)') ) ); 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'), + _('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(), - 'enablePageShortcuts' + 'windowSearchProviderModule' ) ); optionList.push( itemFactory.getRowWidget( - _('Compatibility') + _('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( - _('Fix for 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 change monitors configuration. This option is enabled automatically if a replacement for the Dash is detected'), + _('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(), - 'fixUbuntuDock' + 'extensionsSearchProviderModule' ) ); optionList.push( itemFactory.getRowWidget( - _('V-Shell Modules that can be disabled in case of conflict or misbehavior:') + _('AppDisplay / IconGrid'), + _('App grid customization and options'), + itemFactory.newSwitch(), + 'appDisplayModule' ) ); @@ -1702,15 +2004,6 @@ function _getMiscOptionList() { optionList.push( itemFactory.getRowWidget( - _('AppDisplay / IconGrid'), - _('App grid customization and options'), - itemFactory.newSwitch(), - 'appDisplayModule' - ) - ); - - optionList.push( - itemFactory.getRowWidget( _('Dash'), _('Dash customization and options, support for vertical orientation'), itemFactory.newSwitch(), @@ -1774,6 +2067,15 @@ function _getMiscOptionList() { 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(), @@ -1786,7 +2088,7 @@ function _getMiscOptionList() { _('WindowAttentionHandler'), _('Window attention handler options'), itemFactory.newSwitch(), - 'winAttentionHandlerModule' + 'windowAttentionHandlerModule' ) ); @@ -1810,6 +2112,15 @@ function _getMiscOptionList() { 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(), @@ -1838,17 +2149,89 @@ function _getMiscOptionList() { return optionList; } -function _getAboutOptionList() { +function _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; +} + +function _getAboutOptionList(itemFactory) { const optionList = []; optionList.push(itemFactory.getRowWidget( Me.metadata.name )); + const versionName = Me.metadata['version-name'] ?? ''; + let version = Me.metadata['version'] ?? ''; + version = versionName && version ? `/${version}` : version; + const versionStr = `${versionName}${version}`; optionList.push(itemFactory.getRowWidget( _('Version'), null, - itemFactory.newLabel(Me.metadata.version.toString()) + itemFactory.newLabel(versionStr) )); optionList.push(itemFactory.getRowWidget( |