diff options
Diffstat (limited to '')
-rw-r--r-- | extensions/46/vertical-workspaces/prefs.js | 840 |
1 files changed, 472 insertions, 368 deletions
diff --git a/extensions/46/vertical-workspaces/prefs.js b/extensions/46/vertical-workspaces/prefs.js index 24e404d..1713643 100644 --- a/extensions/46/vertical-workspaces/prefs.js +++ b/extensions/46/vertical-workspaces/prefs.js @@ -46,6 +46,11 @@ export default class VShell extends ExtensionPreferences { optionList: this._getBehaviorOptionList(itemFactory), }, { + title: _('App Grid'), + iconName: 'view-app-grid-symbolic', + optionList: this._getAppGridOptionList(itemFactory), + }, + { title: _('Modules'), iconName: 'application-x-addon-symbolic', optionList: this._getModulesOptionList(itemFactory), @@ -97,12 +102,16 @@ export default class VShell extends ExtensionPreferences { // 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( + _('Custom Profiles'), + null + )); + + optionList.push(itemFactory.getRowWidget( + _('Save your configurations'), + _("The predefined sets of settings, which can help you with the initial configuration and exploring V-Shell's possibilities, can be renamed and overridden by your own configurations"), + itemFactory.newLabel() + )); optionList.push(itemFactory.getRowWidget( _('Profile 1'), @@ -268,7 +277,7 @@ export default class VShell extends ExtensionPreferences { optionList.push( itemFactory.getRowWidget( _('Workspace Thumbnails Max Scale - Window Picker'), - _('Adjusts maximum size of the workspace thumbnails in the overview (% relative to display width)'), + _('Adjusts the maximum size of the workspace thumbnails in the overview (percentage relative to display width)'), wsThumbnailScale, 'wsThumbnailScale' ) @@ -324,11 +333,11 @@ export default class VShell extends ExtensionPreferences { }); const wsSpacingScale = itemFactory.newScale(wsSpacingAdjustment); - wsSpacingScale.add_mark(350, Gtk.PositionType.TOP, null); + wsSpacingScale.add_mark(this.opt.WS_MAX_SPACING_OFF_SCREEN, 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.'), + _('Adjusts spacing in pixels between workspace previews, allowing you to control how much the adjacent workspaces overlap in the current workspace overview. Setting the value above 349 pixels disables the visibility of workspaces other than the current one during transitions to/from the app grid view, which can also save some graphical resources if many windows are open on other workspaces'), wsSpacingScale, 'wsMaxSpacing' ) @@ -350,25 +359,6 @@ export default class VShell extends ExtensionPreferences { ) ); - 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( @@ -406,7 +396,7 @@ export default class VShell extends ExtensionPreferences { 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'), + _('Adjusts the maximum width of search results view (percentage relative to default). This allows to fit more (or less) app icons into the app search result'), searchViewScale, 'searchViewScale', null, @@ -469,7 +459,7 @@ export default class VShell extends ExtensionPreferences { optionList.push( itemFactory.getRowWidget( - _('Horizontal Position (% from left)'), + _('Horizontal Position (percentage from the left)'), _('This popup shows up when you switch workspace using a keyboard shortcut or gesture outside of the overview. You can disable it on the "Behavior" tab. If you want more control over the popup, try the "Workspace Switcher Manager" extension'), hScale, 'wsSwPopupHPosition', @@ -490,7 +480,7 @@ export default class VShell extends ExtensionPreferences { optionList.push( itemFactory.getRowWidget( - _('Vertical Position (% from top)'), + _('Vertical Position (percentage from the top)'), null, vScale, 'wsSwPopupVPosition', @@ -594,7 +584,7 @@ export default class VShell extends ExtensionPreferences { optionList.push( itemFactory.getRowWidget( _('Workspace Thumbnails Max Scale'), - _('Adjusts maximum size of the workspace thumbnails (% relative to display width / height) for secondary monitors'), + _('Adjusts maximum size of the workspace thumbnails (percentage relative to the display width / height) for secondary monitors'), secWsThumbnailScale, 'secWsThumbnailScale' ) @@ -608,7 +598,7 @@ export default class VShell extends ExtensionPreferences { }); const wsSecScaleScale = itemFactory.newScale(wsSecScaleAdjustment); - wsScaleScale.add_mark(100, Gtk.PositionType.TOP, null); + wsScaleScale.add_mark(95, Gtk.PositionType.TOP, null); optionList.push( itemFactory.getRowWidget( _('Workspace Preview Scale'), @@ -647,17 +637,18 @@ export default class VShell extends ExtensionPreferences { optionList.push( itemFactory.getRowWidget( _('Dash Max Icon Size'), - _('Maximum size of Dash icons in pixels'), + _('Maximum size of Dash icons in pixels. Adaptive option switches between default 64 and 48 for low resolution displays'), itemFactory.newDropDown(), 'dashMaxIconSize', [ - [_('128'), 128], - [_('112'), 112], - [_('96'), 96], - [_('80'), 80], - [_('64'), 64], - [_('48'), 48], - [_('32'), 32], + [_('Adaptive (Default)'), 0], + [_('128'), 128], + [_('112'), 112], + [_('96'), 96], + [_('80'), 80], + [_('64'), 64], + [_('48'), 48], + [_('32'), 32], ], 'dashModule' ) @@ -865,163 +856,6 @@ export default class VShell extends ExtensionPreferences { 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.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.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') ) ); @@ -1029,10 +863,11 @@ export default class VShell extends ExtensionPreferences { optionList.push( itemFactory.getRowWidget( _('App Search Icon Size'), - _('Size of results provided by the App Search Provider - smaller size allows to fit more results'), + _('Size of results provided by the App Search Provider - smaller size allows to fit more results. Adaptive option switches between default 96 and 64 for low resolution displays'), itemFactory.newDropDown(), 'searchIconSize', [ + [_('Adaptive'), 0], [_('128'), 128], [_('112'), 112], [_('96 (Default)'), 96], @@ -1232,6 +1067,16 @@ export default class VShell extends ExtensionPreferences { optionList.push( itemFactory.getRowWidget( + _('Click Empty Space To Close'), + _('Enables clicking on an empty space in the overview to close it'), + itemFactory.newSwitch(), + 'clickEmptyClose', + null + ) + ); + + optionList.push( + itemFactory.getRowWidget( _('Overlay Key (Super/Windows)') ) ); @@ -1239,7 +1084,7 @@ export default class VShell extends ExtensionPreferences { 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 "WSP (Window Search Provider)" extension installed and enabled. Link is available on the Modules tab in Settings'), + _('Disable or change behavior when you press and release the Super key. The "Search Windows" options requires the "WSP (Window Search Provider)" extension installed and enabled. Link is available on the Modules tab in Settings. If you want another extension (like AATWS) to handle the overlay key, set this option to "Overview - Window Picker (Default)" and the "Double-Press Action" option to "Applications (Default)"'), itemFactory.newDropDown(), 'overlayKeyPrimary', [ @@ -1249,7 +1094,7 @@ export default class VShell extends ExtensionPreferences { [_('Applications'), 3], [_('Overview - Static WS Preview'), 4], [_('Overview - Static Workspace'), 5], - [_('Search Windows'), 6], + [_('Search Windows (requires WSP extension)'), 6], // [_('Search Recent Files'), 7], ], 'overlayKeyModule' @@ -1265,7 +1110,7 @@ export default class VShell extends ExtensionPreferences { [ [_('Disable'), 0], [_('Applications (Default)'), 1], - [_('Search Windows'), 2], + [_('Search Windows (requires WSP extension)'), 2], [_('Overview - Window Picker'), 3], // [_('Search Recent Files'), 4], ], @@ -1282,17 +1127,17 @@ export default class VShell extends ExtensionPreferences { 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'), + _('Disable or change behavior of the hot corner. Holding down the Ctrl key while hitting the hot corner switches between Overview/Applications actions. The "Search Windows" option requires the "WSP (Window Search Provider)" extension installed and enabled'), itemFactory.newDropDown(), 'hotCornerAction', [ [_('Disable'), 0], [_('Follow Global Overview Mode'), 1], - [_('Overview - Window Picker'), 2], + [_('Overview - Window Picker (Default)'), 2], [_('Applications'), 3], [_('Overview - Static WS Preview'), 4], [_('Overview - Static Workspace'), 5], - [_('Search Windows'), 6], + [_('Search Windows (requires WSP extension)'), 6], ], 'layoutModule' ) @@ -1389,21 +1234,6 @@ export default class VShell extends ExtensionPreferences { 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.newDropDown(), - 'searchWindowsIconScroll', - [ - [_('Default'), 0], - [_('Cycle All Windows'), 1], - [_('Cycle Windows On Current WS'), 2], - ], - 'dashModule' - ) - ); - - optionList.push( - itemFactory.getRowWidget( _('Workspace Thumbnails') ) ); @@ -1489,128 +1319,21 @@ export default class VShell extends ExtensionPreferences { 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.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.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.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' + _('Search') ) ); optionList.push( itemFactory.getRowWidget( - _('App Labels Behavior'), - _('Choose how and when to display app names'), + _('App Grid Search Mode'), + _('Select how the search should behave when initiated from the app grid view. The "Filtered App Grid View" option shows all resulting app icons sorted by usage in the app grid view instead of switching to the default search view'), itemFactory.newDropDown(), - 'appGridNamesMode', + 'searchAppGridMode', [ - [_('Ellipsized - Expand Selected (Default)'), 0], - [_('Always Expanded'), 1], - [_('Hidden - Show Selected Only'), 2], + [_('Search View (Default)'), 0], + [_('Filtered App Grid View'), 1], ], - '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') + 'searchModule' ) ); @@ -1625,7 +1348,7 @@ export default class VShell extends ExtensionPreferences { optionList.push( itemFactory.getRowWidget( - _('Animations - General') + _('Animations') ) ); @@ -1641,7 +1364,7 @@ export default class VShell extends ExtensionPreferences { optionList.push( itemFactory.getRowWidget( _('Animation Speed'), - _('Adjusts the global animation speed in % of the default duration - higher value means slower animation'), + _('Adjusts the global animation speed in percentage of the default duration - higher value means slower animation'), animationSpeedScale, 'animationSpeedFactor' ) @@ -1649,12 +1372,6 @@ export default class VShell extends ExtensionPreferences { 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.newDropDown(), @@ -1807,13 +1524,413 @@ export default class VShell extends ExtensionPreferences { return optionList; } + // ----------------------------------------------------------------------------------------------------------------- + + _getAppGridOptionList(itemFactory) { + const optionList = []; + // options item format: + // (text, caption, widget, settings-variable, [options for combo], sensitivity-depends-on-bool-variable) + + optionList.push( + itemFactory.getRowWidget( + _('Main App Grid') + ) + ); + + optionList.push( + itemFactory.getRowWidget( + _('Apps Sorting'), + _('Choose sorting method for the app grid. Note that sorting by usage ignores folders'), + itemFactory.newDropDown(), + 'appGridOrder', + [ + [_('Custom (Default)'), 0], + [_('Alphabet'), 4], + [_('Alphabet - Folders First'), 1], + [_('Alphabet - Folders Last'), 2], + [_('Usage - No Folders'), 3], + ], + 'appDisplayModule' + ) + ); + + optionList.push( + itemFactory.getRowWidget( + _('Icon Size'), + _('Allows to set a fixed app grid icon size and bypass the default adaptive algorithm'), + 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' + ) + ); + + 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 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 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 agPageAdjustment = new Gtk.Adjustment({ + upper: 100, + lower: 50, + step_increment: 1, + page_increment: 10, + }); + + const agPageWidthScale = itemFactory.newScale(agPageAdjustment); + agPageWidthScale.add_mark(60, Gtk.PositionType.TOP, null); + agPageWidthScale.add_mark(70, Gtk.PositionType.TOP, null); + agPageWidthScale.add_mark(80, Gtk.PositionType.TOP, null); + agPageWidthScale.add_mark(90, Gtk.PositionType.TOP, null); + optionList.push( + itemFactory.getRowWidget( + _('App Grid Page Width Scale'), + _('Adjusts maximum app grid page width relative to the available space'), + agPageWidthScale, + 'appGridPageWidthScale', + null, + 'appDisplayModule' + ) + ); + + const aghPageAdjustment = new Gtk.Adjustment({ + upper: 100, + lower: 50, + step_increment: 1, + page_increment: 10, + }); + + const agPageHeightScale = itemFactory.newScale(aghPageAdjustment); + agPageHeightScale.add_mark(60, Gtk.PositionType.TOP, null); + agPageHeightScale.add_mark(70, Gtk.PositionType.TOP, null); + agPageHeightScale.add_mark(80, Gtk.PositionType.TOP, null); + agPageHeightScale.add_mark(90, Gtk.PositionType.TOP, null); + optionList.push( + itemFactory.getRowWidget( + _('App Grid Page Height Scale'), + _('Adjusts maximum app grid page height relative to the available space'), + agPageHeightScale, + 'appGridPageHeightScale', + 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'), + _('V-Shell uses this value to calculate grid dimensions for adaptive options. However, the main grid automatically adjusts the spacing based on the grid and available space'), + appGridSpacingScale, + 'appGridSpacing', + 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 Folders') + ) + ); + + optionList.push( + itemFactory.getRowWidget( + _('Folder Apps Sorting'), + _('Choose sorting method for app folders'), + itemFactory.newDropDown(), + 'appFolderOrder', + [ + [_('Custom (Default)'), 0], + [_('Alphabet'), 1], + [_('Usage'), 2], + ], + 'appDisplayModule' + ) + ); + + optionList.push( + itemFactory.getRowWidget( + _('Active Icons in Folder Preview'), + _('If enabled, icons in the folder preview behaves like normal icons, you can activate or even drag them directly, without having to open the folder first. This option also affects the app grid default icon size'), + itemFactory.newSwitch(), + 'appGridActivePreview', + null, + 'appDisplayModule' + ) + ); + + const folderIconGridCombo = itemFactory.newDropDown(); + optionList.push( + itemFactory.getRowWidget( + _('App Folder Preview Grid Size'), + _('Sets a grid size (number of icons) in the folder icon 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' + ) + ); + + 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.newDropDown(), + 'appGridFolderIconSize', + [ + [_('Adaptive (Default)'), -1], + [_('128'), 128], + [_('112'), 112], + [_('96'), 96], + [_('80'), 80], + [_('64'), 64], + [_('48'), 48], + ], + 'appDisplayModule' + ) + ); + + const folderColumnsSpinBtn = itemFactory.newSpinButton(folderColumnsAdjustment); + optionList.push(itemFactory.getRowWidget( + _('Maximum Number Of Columns (0 for automatic)'), + _('Specifies the maximum number of columns per page in folder grids. If you leave the value at 0, the maximum number of columns will be calculated based on available space. The actual folder grid dimensions will be determined by the number of items within the set limits'), + 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( + _('Maximum Number Of Rows (0 for automatic)'), + _('Specifies the maximum number of rows per page in folder grids. If you leave the value at 0, the maximum number of rows will be calculated based on available space. The actual folder grid dimensions will be determined by the number of items within the set limits'), + folderRowsSpinBtn, + 'appGridFolderRows', + null, + 'appDisplayModule' + )); + + const appFolderSpacingAdjustment = new Gtk.Adjustment({ + upper: 30, + lower: 5, + step_increment: 1, + page_increment: 5, + }); + + const appFolderSpacingScale = itemFactory.newScale(appFolderSpacingAdjustment); + appFolderSpacingScale.add_mark(12, Gtk.PositionType.TOP, null); + optionList.push( + itemFactory.getRowWidget( + _('Folder Grid Spacing'), + _('Adjusts the spacing between icons in a folder grid'), + appFolderSpacingScale, + 'appGridFolderSpacing', + null, + 'appDisplayModule' + ) + ); + + optionList.push( + itemFactory.getRowWidget( + _('Center Open Folders'), + _("App folders may open in the center of the screen or be centered on the folder's source icon"), + itemFactory.newSwitch(), + 'appGridFolderCenter', + null, + 'appDisplayModule' + ) + ); + + // -------------------------------------------------------------------------------------- + + optionList.push( + itemFactory.getRowWidget( + _('Content') + ) + ); + + 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.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( + _('App Labels Behavior'), + _('Choose how and when to display app names'), + itemFactory.newDropDown(), + 'appGridNamesMode', + [ + [_('Ellipsized - Expand Selected (Default)'), 0], + [_('Always Expanded'), 1], + [_('Hidden - Show Selected Only'), 2], + ], + 'appDisplayModule' + ) + ); + + optionList.push( + itemFactory.getRowWidget( + _('Show Page Navigation Buttons'), + _("You can hide the page navigation buttons if you don't need them or want to get more space for icons. The buttons are hidden automatically when there is only one page in the app grid"), + itemFactory.newSwitch(), + 'appGridShowPageArrows', + null, + 'appDisplayModule' + ) + ); + + + // -------------------------------------------------------------------------------------- + + 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( + _('Reset') + ) + ); + + 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', []); + }) + )); + + 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)') + _('Optional Modules') ) ); @@ -1843,6 +1960,12 @@ export default class VShell extends ExtensionPreferences { optionList.push( itemFactory.getRowWidget( + _('Built-in Modules (allows to disable modules that conflict with another extension)') + ) + ); + + optionList.push( + itemFactory.getRowWidget( _('AppDisplay / IconGrid'), _('App grid customization and options'), itemFactory.newSwitch(), @@ -2017,39 +2140,18 @@ export default class VShell extends ExtensionPreferences { ) ); - /* 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') + _('Workarounds / Hacks') ) ); 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'), + _('Delay at Startup'), + _("If you encounter issues during GNOME Shell startup after logging in, which could be caused by V-Shell's incompatibility with another extension, try enabling this option. When enabled, V-Shell is activated after the startup is complete. It will activate automatically when Dash to Dock, Ubuntu Dock or Dash to Panel extensions are detected."), itemFactory.newSwitch(), - 'appGridPerformance' - ) - ); - - optionList.push( - itemFactory.getRowWidget( - _('Workarounds') + 'delayStartup' ) ); @@ -2074,6 +2176,8 @@ export default class VShell extends ExtensionPreferences { return optionList; } + // -------------------------------------------------------------------------------------------------- + _getAboutOptionList(itemFactory) { const optionList = []; |