Adding 45/vertical-workspaces version 37+20240412 [9b05a79].
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
155878f41e
commit
9a6f4265d9
37 changed files with 3192 additions and 3142 deletions
|
@ -1,5 +1,36 @@
|
||||||
## Changelog:
|
## Changelog:
|
||||||
### v45.2 for GNOME 45.2+, v44.10 for GNOME 42-44 (2023-12-03)
|
### v46.1 for GNOME 45.2+, v44.12 for GNOME 42-44 (not released yet)
|
||||||
|
**Added**
|
||||||
|
- Support for GNOME 46
|
||||||
|
- Option *Fix New Window Not On Current Monitor* tries to work around that issue. However, success rate is not 100%
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
- Windows and Extensions search providers have been removed from the V-Shell and released as a standalone WSP and ESP extensions. Respective module switches has been replaced in Settings by the links to these new extensions
|
||||||
|
- Window thumbnails (PiP) module moved to the standalone extension WTMB, link added to the *Modules* tab of Settings window
|
||||||
|
- Shortcuts in the overview - `Ctrl+Space` - Extensions Search Provider, `Shift+Space` - Recent Files Search Provider, `Ctrl+Shift+Space` - V-Shell Settings
|
||||||
|
- Bottom OSD position moved so it's not overlapping dock, if used
|
||||||
|
- Active folder icons hover animation from scale, which makes icons blurry, to the move 3px up
|
||||||
|
|
||||||
|
**Fixed:**
|
||||||
|
- Running app indicators too close to the app name on the app grid
|
||||||
|
- OverlayKey module deactivates itself even if its configuration isn't consistent with the default GNOME Shell behavior
|
||||||
|
|
||||||
|
|
||||||
|
### v45.3 for GNOME 45.2+, v44.11 for GNOME 42-44 (2023-12-20)
|
||||||
|
**Added:**
|
||||||
|
- Option *Workspace Switcher Mode (Isolate Monitors)* can simulate independent switching of workspaces on any monitor
|
||||||
|
- Improved *Extensions Search Provider* allows seamless extension de/activation
|
||||||
|
|
||||||
|
**Fixed:**
|
||||||
|
- DtD breaks overview on the primary monitor because of incorrect dash/dock position readings
|
||||||
|
- *Window Switcher > Ignore Last (empty) Workspace* should work only for dynamic workspaces mode
|
||||||
|
- *OverlayKey* module should remain disabled when the overlay-key functionality is set to default to minimize conflicts with other extensions
|
||||||
|
- Errors from parental manager when registering search provider modules
|
||||||
|
- Extension settings window sometimes fails to open when another extension settings window is already open
|
||||||
|
- Vertically oriented dash items should be selectable even with the mouse pointer at the edge of the screen
|
||||||
|
|
||||||
|
|
||||||
|
### v45.2 for GNOME 45.2+, v44.10 for GNOME 42-44 (2023-12-02)
|
||||||
**Added:**
|
**Added:**
|
||||||
- *Dash* option *Isolate Workspaces* on *Behavior* tab
|
- *Dash* option *Isolate Workspaces* on *Behavior* tab
|
||||||
- *Brightness for Search View* option allows adjusting background wallpaper brightness in overview search view
|
- *Brightness for Search View* option allows adjusting background wallpaper brightness in overview search view
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
A GNOME Shell extension that lets you customize your GNOME Shell UX to suit your workflow, whether you like horizontally or vertically stacked workspaces.
|
A GNOME Shell extension that lets you customize your GNOME Shell UX to suit your workflow, whether you like horizontally or vertically stacked workspaces.
|
||||||
|
|
||||||
Currently supported GNOME versions: 42 - 45
|
Currently supported GNOME versions: 42 - 46
|
||||||
|
|
||||||
[<img alt="" height="100" src="https://raw.githubusercontent.com/andyholmes/gnome-shell-extensions-badge/master/get-it-on-ego.svg?sanitize=true">](https://extensions.gnome.org/extension/5177/vertical-workspaces/)
|
[<img alt="" height="100" src="https://raw.githubusercontent.com/andyholmes/gnome-shell-extensions-badge/master/get-it-on-ego.svg?sanitize=true">](https://extensions.gnome.org/extension/5177/vertical-workspaces/)
|
||||||
|
|
||||||
|
@ -25,17 +25,16 @@ Currently supported GNOME versions: 42 - 45
|
||||||
- Title captions of window previews moved into the preview (originally beneath the preview) and can be set as always visible. Adjustable window preview icon
|
- Title captions of window previews moved into the preview (originally beneath the preview) and can be set as always visible. Adjustable window preview icon
|
||||||
- Static background in workspace switcher (outside overview). Keeps Conky below, DING desktop icons stay visible (if not covered by windows)
|
- Static background in workspace switcher (outside overview). Keeps Conky below, DING desktop icons stay visible (if not covered by windows)
|
||||||
- Control over transition animations, including speed
|
- Control over transition animations, including speed
|
||||||
- Window search provider with *Space* hotkey allows quick window navigation
|
|
||||||
- Recent files search provider with *Ctrl + Space* hotkey
|
- Recent files search provider with *Ctrl + Space* hotkey
|
||||||
- Extensions search provider with *Ctrl + Shift + Space* hotkey allows to search for extensions, open their settings and enable or disable them
|
- Supports WSP (Window search provider) extension with *Space* hotkey that allows quick window navigation
|
||||||
|
- Supports ESP (Extensions search provider) with *Ctrl + Shift + Space* hotkey that allows to search for installed extensions, open their settings and enable or disable them
|
||||||
- Reorder workspaces in overview using *Shift + Scroll* or *Shift + Page Up/Down*
|
- Reorder workspaces in overview using *Shift + Scroll* or *Shift + Page Up/Down*
|
||||||
- Adds *Force Quit*, *Close Windows on Current Workspace* and *Move Windows to Current Workspace* items to app icon menu. The latter action can be activated using *Shift + click* on app icon
|
- Adds *Force Quit*, *Close Windows on Current Workspace* and *Move Windows to Current Workspace* items to app icon menu. The latter action can be activated using *Shift + click* on app icon
|
||||||
- Change notification banners and OSD popups position
|
- Change notification banners and OSD popups position
|
||||||
- Window attention handler options can activate the attention-demanding window immediately or silence its notification
|
- Window attention handler options can activate the attention-demanding window immediately or silence its notification
|
||||||
- Optional position of the hot corner that can follow the dash and expand to hot edge
|
- Optional position of the hot corner that can follow the dash and expand to hot edge
|
||||||
- Super key double-press options
|
- Super key double-press options
|
||||||
- Window thumbnail (PIP) options allows you to create scaled down clone of the window by clicking on its preview in the overview (secondary mouse buttons or window preview icon)
|
- Supports WTMB (Window Thumbnails) extension that allows you to create Picture-in-Picture thumbnail of the window by clicking on its preview in the overview (secondary mouse buttons or window preview icon)
|
||||||
|
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
[CHANGELOG.md](CHANGELOG.md)
|
[CHANGELOG.md](CHANGELOG.md)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* extension.js
|
* extension.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -50,10 +50,6 @@ import { WindowPreviewModule } from './lib/windowPreview.js';
|
||||||
import { WorkspaceAnimationModule } from './lib/workspaceAnimation.js';
|
import { WorkspaceAnimationModule } from './lib/workspaceAnimation.js';
|
||||||
import { WorkspaceModule } from './lib/workspace.js';
|
import { WorkspaceModule } from './lib/workspace.js';
|
||||||
import { WorkspaceSwitcherPopupModule } from './lib/workspaceSwitcherPopup.js';
|
import { WorkspaceSwitcherPopupModule } from './lib/workspaceSwitcherPopup.js';
|
||||||
import { WindowSearchProviderModule } from './lib/windowSearchProvider.js';
|
|
||||||
import { RecentFilesSearchProviderModule } from './lib/recentFilesSearchProvider.js';
|
|
||||||
import { ExtensionsSearchProviderModule } from './lib/extensionsSearchProvider.js';
|
|
||||||
import { WinTmbModule } from './lib/winTmb.js';
|
|
||||||
|
|
||||||
let Me;
|
let Me;
|
||||||
// gettext
|
// gettext
|
||||||
|
@ -73,9 +69,10 @@ export default class VShell extends Extension.Extension {
|
||||||
Me.gettext = this.gettext.bind(this);
|
Me.gettext = this.gettext.bind(this);
|
||||||
_ = Me.gettext;
|
_ = Me.gettext;
|
||||||
|
|
||||||
Me.WSP_PREFIX = WindowSearchProviderModule._PREFIX;
|
// search prefixes for supported search providers
|
||||||
Me.RFSP_PREFIX = RecentFilesSearchProviderModule._PREFIX;
|
Me.WSP_PREFIX = 'wq//';
|
||||||
Me.ESP_PREFIX = ExtensionsSearchProviderModule._PREFIX;
|
Me.RFSP_PREFIX = 'fq//';
|
||||||
|
Me.ESP_PREFIX = 'eq//';
|
||||||
|
|
||||||
Me.opt = new Me.Settings.Options(Me);
|
Me.opt = new Me.Settings.Options(Me);
|
||||||
|
|
||||||
|
@ -108,11 +105,7 @@ export default class VShell extends Extension.Extension {
|
||||||
this.removeVShell();
|
this.removeVShell();
|
||||||
this._disposeModules();
|
this._disposeModules();
|
||||||
|
|
||||||
// If Dash to Dock is enabled, disabling V-Shell can end in broken overview
|
|
||||||
Main.overview.hide();
|
|
||||||
|
|
||||||
console.debug(`${Me.metadata.name}: disabled`);
|
console.debug(`${Me.metadata.name}: disabled`);
|
||||||
|
|
||||||
this._cleanGlobals();
|
this._cleanGlobals();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,10 +137,6 @@ export default class VShell extends Extension.Extension {
|
||||||
Me.Modules.workspaceSwitcherPopupModule = new WorkspaceSwitcherPopupModule(Me);
|
Me.Modules.workspaceSwitcherPopupModule = new WorkspaceSwitcherPopupModule(Me);
|
||||||
Me.Modules.workspaceThumbnailModule = new WorkspaceThumbnailModule(Me);
|
Me.Modules.workspaceThumbnailModule = new WorkspaceThumbnailModule(Me);
|
||||||
Me.Modules.workspacesViewModule = new WorkspacesViewModule(Me);
|
Me.Modules.workspacesViewModule = new WorkspacesViewModule(Me);
|
||||||
Me.Modules.windowSearchProviderModule = new WindowSearchProviderModule(Me);
|
|
||||||
Me.Modules.recentFilesSearchProviderModule = new RecentFilesSearchProviderModule(Me);
|
|
||||||
Me.Modules.extensionsSearchProviderModule = new ExtensionsSearchProviderModule(Me);
|
|
||||||
Me.Modules.winTmbModule = new WinTmbModule(Me);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_disposeModules() {
|
_disposeModules() {
|
||||||
|
@ -160,9 +149,7 @@ export default class VShell extends Extension.Extension {
|
||||||
}
|
}
|
||||||
|
|
||||||
Me.Util.cleanGlobals();
|
Me.Util.cleanGlobals();
|
||||||
|
|
||||||
Me.Modules = null;
|
Me.Modules = null;
|
||||||
opt = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
activateVShell() {
|
activateVShell() {
|
||||||
|
@ -173,6 +160,8 @@ export default class VShell extends Extension.Extension {
|
||||||
this._removeTimeouts();
|
this._removeTimeouts();
|
||||||
this._timeouts = {};
|
this._timeouts = {};
|
||||||
|
|
||||||
|
this._ensureOverviewIsHidden();
|
||||||
|
|
||||||
// load VShell configuration
|
// load VShell configuration
|
||||||
this._updateSettings();
|
this._updateSettings();
|
||||||
|
|
||||||
|
@ -200,9 +189,16 @@ export default class VShell extends Extension.Extension {
|
||||||
|
|
||||||
// workaround for upstream bug - overview always shows workspace 1 instead of the active one after restart
|
// workaround for upstream bug - overview always shows workspace 1 instead of the active one after restart
|
||||||
this._setInitialWsIndex();
|
this._setInitialWsIndex();
|
||||||
|
|
||||||
|
this._resetShellProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
removeVShell() {
|
removeVShell() {
|
||||||
|
// Rebasing V-Shell when overview is open causes problems
|
||||||
|
// also if Dash to Dock is enabled, disabling V-Shell can result in a broken overview
|
||||||
|
this._ensureOverviewIsHidden();
|
||||||
|
this._resetShellProperties();
|
||||||
|
|
||||||
this._enabled = false;
|
this._enabled = false;
|
||||||
|
|
||||||
const reset = true;
|
const reset = true;
|
||||||
|
@ -217,27 +213,53 @@ export default class VShell extends Extension.Extension {
|
||||||
// switch PageUp/PageDown workspace switcher shortcuts
|
// switch PageUp/PageDown workspace switcher shortcuts
|
||||||
this._switchPageShortcuts();
|
this._switchPageShortcuts();
|
||||||
|
|
||||||
// remove any position offsets from dash and ws thumbnails
|
|
||||||
if (!Me.Util.dashNotDefault()) {
|
|
||||||
Main.overview.dash.translation_x = 0;
|
|
||||||
Main.overview.dash.translation_y = 0;
|
|
||||||
}
|
|
||||||
Main.overview._overview._controls._thumbnailsBox.translation_x = 0;
|
|
||||||
Main.overview._overview._controls._thumbnailsBox.translation_y = 0;
|
|
||||||
Main.overview._overview._controls._searchEntryBin.translation_y = 0;
|
|
||||||
Main.overview._overview._controls.set_child_above_sibling(Main.overview._overview._controls._workspacesDisplay, null);
|
|
||||||
// restore default animation speed
|
|
||||||
St.Settings.get().slow_down_factor = 1;
|
|
||||||
|
|
||||||
// restore default dash background style
|
|
||||||
Main.overview.dash._background.set_style('');
|
|
||||||
// hide status message if shown
|
// hide status message if shown
|
||||||
this._showStatusMessage(false);
|
this._showStatusMessage(false);
|
||||||
this._prevDash = null;
|
this._prevDash = null;
|
||||||
|
|
||||||
|
// restore default animation speed
|
||||||
|
St.Settings.get().slow_down_factor = 1;
|
||||||
|
|
||||||
Meta.Workspace.prototype.get_neighbor = this._originalGetNeighbor;
|
Meta.Workspace.prototype.get_neighbor = this._originalGetNeighbor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ensureOverviewIsHidden() {
|
||||||
|
if (Main.overview._shown) {
|
||||||
|
Main.overview._shown = false;
|
||||||
|
// Main.overview._animationInProgress = true;
|
||||||
|
Main.overview._visibleTarget = false;
|
||||||
|
Main.overview._overview.prepareToLeaveOverview();
|
||||||
|
Main.overview._changeShownState('HIDING');
|
||||||
|
Main.overview._hideDone();
|
||||||
|
Main.overview.dash.showAppsButton.checked = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_resetShellProperties() {
|
||||||
|
const controls = Main.overview._overview.controls;
|
||||||
|
// remove any position offsets from dash and ws thumbnails
|
||||||
|
if (!Me.Util.dashNotDefault()) {
|
||||||
|
controls.dash.translation_x = 0;
|
||||||
|
controls.dash.translation_y = 0;
|
||||||
|
}
|
||||||
|
controls._thumbnailsBox.translation_x = 0;
|
||||||
|
controls._thumbnailsBox.translation_y = 0;
|
||||||
|
controls._searchEntryBin.translation_y = 0;
|
||||||
|
controls._workspacesDisplay.scale_x = 1;
|
||||||
|
controls.set_child_above_sibling(controls._workspacesDisplay, null);
|
||||||
|
|
||||||
|
// following properties may be reduced if extensions are rebased while the overview is open
|
||||||
|
controls._thumbnailsBox.remove_all_transitions();
|
||||||
|
controls._thumbnailsBox.scale_x = 1;
|
||||||
|
controls._thumbnailsBox.scale_y = 1;
|
||||||
|
controls._thumbnailsBox.opacity = 255;
|
||||||
|
|
||||||
|
controls._searchController._searchResults.opacity = 255;
|
||||||
|
|
||||||
|
// restore default dash background style
|
||||||
|
controls.dash._background.set_style('');
|
||||||
|
}
|
||||||
|
|
||||||
_removeTimeouts() {
|
_removeTimeouts() {
|
||||||
if (this._timeouts) {
|
if (this._timeouts) {
|
||||||
Object.values(this._timeouts).forEach(id => {
|
Object.values(this._timeouts).forEach(id => {
|
||||||
|
@ -270,7 +292,7 @@ export default class VShell extends Extension.Extension {
|
||||||
Me.Util.getEnabledExtensions('ubuntu-dock').length);
|
Me.Util.getEnabledExtensions('ubuntu-dock').length);
|
||||||
|
|
||||||
// force enable Fix Dash to Dock option if DtD detected
|
// force enable Fix Dash to Dock option if DtD detected
|
||||||
opt._watchDashToDock = dtdEnabled;
|
this._watchDashToDock = dtdEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateConnections() {
|
_updateConnections() {
|
||||||
|
@ -289,7 +311,6 @@ export default class VShell extends Extension.Extension {
|
||||||
() => {
|
() => {
|
||||||
Me.Modules.panelModule.update();
|
Me.Modules.panelModule.update();
|
||||||
Me.Modules.overviewControlsModule.update();
|
Me.Modules.overviewControlsModule.update();
|
||||||
Me.Modules.winTmbModule.showThumbnails();
|
|
||||||
|
|
||||||
this._timeouts.unlock = 0;
|
this._timeouts.unlock = 0;
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
|
@ -297,7 +318,6 @@ export default class VShell extends Extension.Extension {
|
||||||
);
|
);
|
||||||
} else if (session.currentMode === 'unlock-dialog') {
|
} else if (session.currentMode === 'unlock-dialog') {
|
||||||
Me.Modules.panelModule.update(true);
|
Me.Modules.panelModule.update(true);
|
||||||
Me.Modules.winTmbModule.hideThumbnails();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -326,12 +346,46 @@ export default class VShell extends Extension.Extension {
|
||||||
const reset = [1, 2].includes(extension.state);
|
const reset = [1, 2].includes(extension.state);
|
||||||
const dashReplacement = uuid.includes('dash-to-dock') || uuid.includes('ubuntu-dock') || uuid.includes('dash-to-panel');
|
const dashReplacement = uuid.includes('dash-to-dock') || uuid.includes('ubuntu-dock') || uuid.includes('dash-to-panel');
|
||||||
if (dashReplacement && reset)
|
if (dashReplacement && reset)
|
||||||
opt._watchDashToDock = true;
|
this._watchDashToDock = true;
|
||||||
if (!Main.layoutManager._startingUp && reset && dashReplacement)
|
if (!Main.layoutManager._startingUp && reset && dashReplacement)
|
||||||
this._updateVShell(1999);
|
this._updateVShell(1999);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._updateNewWindowConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
_updateNewWindowConnection() {
|
||||||
|
const nMonitors = global.display.get_n_monitors();
|
||||||
|
if (nMonitors > 1 && opt.FIX_NEW_WINDOW_MONITOR && !this._newWindowCreatedConId) {
|
||||||
|
this._newWindowCreatedConId = global.display.connect_after('window-created', (w, win) => {
|
||||||
|
if (Main.layoutManager._startingUp || win.get_window_type() !== Meta.WindowType.NORMAL)
|
||||||
|
return;
|
||||||
|
const winActor = win.get_compositor_private();
|
||||||
|
const _moveWinToMonitor = () => {
|
||||||
|
const currentMonitor = global.display.get_current_monitor();
|
||||||
|
if (win.get_monitor() !== currentMonitor) {
|
||||||
|
// some windows ignore this action if executed immediately
|
||||||
|
GLib.idle_add(GLib.PRIORITY_LOW, () => {
|
||||||
|
win.move_to_monitor(currentMonitor);
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (!winActor.realized) {
|
||||||
|
const realizeId = winActor.connect('realize', () => {
|
||||||
|
winActor.disconnect(realizeId);
|
||||||
|
_moveWinToMonitor();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
_moveWinToMonitor();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if ((nMonitors.length === 1 || !opt.FIX_NEW_WINDOW_MONITOR) && this._newWindowCreatedConId) {
|
||||||
|
global.display.disconnect(this._newWindowCreatedConId);
|
||||||
|
this._newWindowCreatedConId = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_removeConnections() {
|
_removeConnections() {
|
||||||
|
@ -354,6 +408,11 @@ export default class VShell extends Extension.Extension {
|
||||||
Main.extensionManager.disconnect(this._watchDockSigId);
|
Main.extensionManager.disconnect(this._watchDockSigId);
|
||||||
this._watchDockSigId = 0;
|
this._watchDockSigId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._newWindowCreatedConId) {
|
||||||
|
global.display.disconnect(this._newWindowCreatedConId);
|
||||||
|
this._newWindowCreatedConId = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateOverrides(reset = false) {
|
_updateOverrides(reset = false) {
|
||||||
|
@ -387,10 +446,6 @@ export default class VShell extends Extension.Extension {
|
||||||
|
|
||||||
Me.Modules.searchModule.update(reset);
|
Me.Modules.searchModule.update(reset);
|
||||||
|
|
||||||
Me.Modules.windowSearchProviderModule.update(reset);
|
|
||||||
Me.Modules.recentFilesSearchProviderModule.update(reset);
|
|
||||||
Me.Modules.extensionsSearchProviderModule.update(reset);
|
|
||||||
|
|
||||||
// don't rebuild app grid on any screen lock
|
// don't rebuild app grid on any screen lock
|
||||||
// even if the extension includes unlock-screen session mode
|
// even if the extension includes unlock-screen session mode
|
||||||
// disable/enable is called at least once even on GS44
|
// disable/enable is called at least once even on GS44
|
||||||
|
@ -423,7 +478,6 @@ export default class VShell extends Extension.Extension {
|
||||||
Me.Modules.osdWindowModule.update(reset);
|
Me.Modules.osdWindowModule.update(reset);
|
||||||
Me.Modules.overlayKeyModule.update(reset);
|
Me.Modules.overlayKeyModule.update(reset);
|
||||||
Me.Modules.searchControllerModule.update(reset);
|
Me.Modules.searchControllerModule.update(reset);
|
||||||
Me.Modules.winTmbModule.update(reset);
|
|
||||||
|
|
||||||
if (!reset && !Main.layoutManager._startingUp)
|
if (!reset && !Main.layoutManager._startingUp)
|
||||||
Main.overview._overview.controls.setInitialTranslations();
|
Main.overview._overview.controls.setInitialTranslations();
|
||||||
|
@ -441,7 +495,7 @@ export default class VShell extends Extension.Extension {
|
||||||
if (!Main.overview._overview.controls._bgManagers && (opt.SHOW_BG_IN_OVERVIEW || opt.SHOW_WS_PREVIEW_BG) && !Me.Util.getEnabledExtensions('blur-my-shell').length)
|
if (!Main.overview._overview.controls._bgManagers && (opt.SHOW_BG_IN_OVERVIEW || opt.SHOW_WS_PREVIEW_BG) && !Me.Util.getEnabledExtensions('blur-my-shell').length)
|
||||||
Main.overview._overview.controls._setBackground();
|
Main.overview._overview.controls._setBackground();
|
||||||
|
|
||||||
if (opt._watchDashToDock) {
|
if (this._watchDashToDock) {
|
||||||
// workaround for Dash to Dock (Ubuntu Dock) breaking overview allocations after enabled and changed position
|
// workaround for Dash to Dock (Ubuntu Dock) breaking overview allocations after enabled and changed position
|
||||||
// DtD replaces dock and its _workId on every position change
|
// DtD replaces dock and its _workId on every position change
|
||||||
const dash = Main.overview.dash;
|
const dash = Main.overview.dash;
|
||||||
|
@ -573,6 +627,12 @@ export default class VShell extends Extension.Extension {
|
||||||
else
|
else
|
||||||
Meta.Workspace.prototype.get_neighbor = this._originalGetNeighbor;
|
Meta.Workspace.prototype.get_neighbor = this._originalGetNeighbor;
|
||||||
|
|
||||||
|
// delay search so it doesn't make the search view transition stuttering
|
||||||
|
// 150 is the default value in GNOME Shell, but the search feels laggy
|
||||||
|
// Of course there is some overload for fast keyboard typist
|
||||||
|
if (opt.SEARCH_VIEW_ANIMATION)
|
||||||
|
opt.SEARCH_DELAY = 150;
|
||||||
|
|
||||||
if (settings)
|
if (settings)
|
||||||
this._applySettings(key);
|
this._applySettings(key);
|
||||||
}
|
}
|
||||||
|
@ -601,6 +661,9 @@ export default class VShell extends Extension.Extension {
|
||||||
if (key?.includes('hot-corner') || key?.includes('dash'))
|
if (key?.includes('hot-corner') || key?.includes('dash'))
|
||||||
Me.Modules.layoutModule.update();
|
Me.Modules.layoutModule.update();
|
||||||
|
|
||||||
|
if (key?.includes('overlay-key'))
|
||||||
|
Me.Modules.overlayKeyModule.update();
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'ws-thumbnails-position':
|
case 'ws-thumbnails-position':
|
||||||
this._updateOverrides();
|
this._updateOverrides();
|
||||||
|
@ -626,12 +689,15 @@ export default class VShell extends Extension.Extension {
|
||||||
case 'osd-position':
|
case 'osd-position':
|
||||||
Me.Modules.osdWindowModule.update();
|
Me.Modules.osdWindowModule.update();
|
||||||
break;
|
break;
|
||||||
case 'overlay-key':
|
|
||||||
Me.Modules.overlayKeyModule.update();
|
|
||||||
break;
|
|
||||||
case 'always-activate-selected-window':
|
case 'always-activate-selected-window':
|
||||||
Me.Modules.windowPreviewModule.update();
|
Me.Modules.windowPreviewModule.update();
|
||||||
break;
|
break;
|
||||||
|
case 'ws-switcher-mode':
|
||||||
|
Me.Modules.windowManagerModule.update();
|
||||||
|
break;
|
||||||
|
case 'new-window-monitor-fix':
|
||||||
|
this._updateNewWindowConnection();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key?.includes('app-grid') ||
|
if (key?.includes('app-grid') ||
|
||||||
|
@ -775,7 +841,7 @@ export default class VShell extends Extension.Extension {
|
||||||
_getNeighbor(direction) {
|
_getNeighbor(direction) {
|
||||||
// workspace matrix is supported
|
// workspace matrix is supported
|
||||||
const activeIndex = this.index();
|
const activeIndex = this.index();
|
||||||
const ignoreLast = opt.WS_IGNORE_LAST && !Main.overview._shown ? 1 : 0;
|
const ignoreLast = opt.WS_IGNORE_LAST && Meta.prefs_get_dynamic_workspaces() && !Main.overview._shown ? 1 : 0;
|
||||||
const wraparound = opt.WS_WRAPAROUND;
|
const wraparound = opt.WS_WRAPAROUND;
|
||||||
const nWorkspaces = global.workspace_manager.n_workspaces;
|
const nWorkspaces = global.workspace_manager.n_workspaces;
|
||||||
const lastIndex = nWorkspaces - 1 - ignoreLast;
|
const lastIndex = nWorkspaces - 1 - ignoreLast;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* appDisplay.js
|
* appDisplay.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -34,6 +34,8 @@ let _timeouts;
|
||||||
const APP_ICON_TITLE_EXPAND_TIME = 200;
|
const APP_ICON_TITLE_EXPAND_TIME = 200;
|
||||||
const APP_ICON_TITLE_COLLAPSE_TIME = 100;
|
const APP_ICON_TITLE_COLLAPSE_TIME = 100;
|
||||||
|
|
||||||
|
const shellVersion46 = !Clutter.Container; // Container has been removed in 46
|
||||||
|
|
||||||
function _getCategories(info) {
|
function _getCategories(info) {
|
||||||
let categoriesStr = info.get_categories();
|
let categoriesStr = info.get_categories();
|
||||||
if (!categoriesStr)
|
if (!categoriesStr)
|
||||||
|
@ -187,7 +189,6 @@ export const AppDisplayModule = class {
|
||||||
|
|
||||||
_setAppDisplayOrientation(vertical = false) {
|
_setAppDisplayOrientation(vertical = false) {
|
||||||
const CLUTTER_ORIENTATION = vertical ? Clutter.Orientation.VERTICAL : Clutter.Orientation.HORIZONTAL;
|
const CLUTTER_ORIENTATION = vertical ? Clutter.Orientation.VERTICAL : Clutter.Orientation.HORIZONTAL;
|
||||||
const scroll = vertical ? 'vscroll' : 'hscroll';
|
|
||||||
// app display to vertical has issues - page indicator not working
|
// app display to vertical has issues - page indicator not working
|
||||||
// global appDisplay orientation switch is not built-in
|
// global appDisplay orientation switch is not built-in
|
||||||
let appDisplay = Main.overview._overview._controls._appDisplay;
|
let appDisplay = Main.overview._overview._controls._appDisplay;
|
||||||
|
@ -247,7 +248,9 @@ export const AppDisplayModule = class {
|
||||||
}
|
}
|
||||||
|
|
||||||
// value for page indicator is calculated from scroll adjustment, horizontal needs to be replaced by vertical
|
// value for page indicator is calculated from scroll adjustment, horizontal needs to be replaced by vertical
|
||||||
appDisplay._adjustment = appDisplay._scrollView[scroll].adjustment;
|
appDisplay._adjustment = vertical
|
||||||
|
? appDisplay._scrollView.get_vscroll_bar().adjustment
|
||||||
|
: appDisplay._scrollView.get_hscroll_bar().adjustment;
|
||||||
|
|
||||||
// no need to connect already connected signal (wasn't removed the original one before)
|
// no need to connect already connected signal (wasn't removed the original one before)
|
||||||
if (!vertical) {
|
if (!vertical) {
|
||||||
|
@ -754,7 +757,7 @@ const BaseAppViewVertical = {
|
||||||
this._nextPageArrow.scale_x = 0;
|
this._nextPageArrow.scale_x = 0;
|
||||||
this._prevPageArrow.scale_x = 0;
|
this._prevPageArrow.scale_x = 0;
|
||||||
|
|
||||||
this._adjustment = this._scrollView.vscroll.adjustment;
|
this._adjustment = this._scrollView.get_vscroll_bar().adjustment;
|
||||||
|
|
||||||
this._adjustment.connect('notify::value', adj => {
|
this._adjustment.connect('notify::value', adj => {
|
||||||
const value = adj.value / adj.page_size;
|
const value = adj.value / adj.page_size;
|
||||||
|
@ -972,12 +975,17 @@ const FolderIcon = {
|
||||||
: St.ButtonMask.ONE | St.ButtonMask.TWO;
|
: St.ButtonMask.ONE | St.ButtonMask.TWO;
|
||||||
this.button_mask = buttonMask;*/
|
this.button_mask = buttonMask;*/
|
||||||
this.button_mask = St.ButtonMask.ONE | St.ButtonMask.TWO;
|
this.button_mask = St.ButtonMask.ONE | St.ButtonMask.TWO;
|
||||||
|
if (shellVersion46)
|
||||||
|
this.add_style_class_name('app-folder-46');
|
||||||
|
else
|
||||||
|
this.add_style_class_name('app-folder-45');
|
||||||
},
|
},
|
||||||
|
|
||||||
open() {
|
open() {
|
||||||
this._ensureFolderDialog();
|
this._ensureFolderDialog();
|
||||||
|
this._dialog._updateFolderSize();
|
||||||
// always open folder with the first page
|
// always open folder with the first page
|
||||||
this.view._scrollView.vscroll.adjustment.value = 0;
|
this.view._scrollView.get_vscroll_bar().adjustment.value = 0;
|
||||||
this._dialog.popup();
|
this._dialog.popup();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -1043,6 +1051,7 @@ const FolderView = {
|
||||||
child._sourceItem = this._orderedItems[i];
|
child._sourceItem = this._orderedItems[i];
|
||||||
child._sourceFolder = this;
|
child._sourceFolder = this;
|
||||||
child.icon.style_class = '';
|
child.icon.style_class = '';
|
||||||
|
child.set_style_class_name('');
|
||||||
child.icon.set_style('margin: 0; padding: 0;');
|
child.icon.set_style('margin: 0; padding: 0;');
|
||||||
child._dot.set_style('margin-bottom: 1px;');
|
child._dot.set_style('margin-bottom: 1px;');
|
||||||
child.icon.setIconSize(subSize);
|
child.icon.setIconSize(subSize);
|
||||||
|
@ -1052,16 +1061,14 @@ const FolderView = {
|
||||||
bin.connect('enter-event', () => {
|
bin.connect('enter-event', () => {
|
||||||
bin.ease({
|
bin.ease({
|
||||||
duration: 100,
|
duration: 100,
|
||||||
scale_x: 1.14,
|
translation_y: -3,
|
||||||
scale_y: 1.14,
|
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
bin.connect('leave-event', () => {
|
bin.connect('leave-event', () => {
|
||||||
bin.ease({
|
bin.ease({
|
||||||
duration: 100,
|
duration: 100,
|
||||||
scale_x: 1,
|
translation_y: 0,
|
||||||
scale_y: 1,
|
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1072,8 +1079,8 @@ const FolderView = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// if folder content changed, update folder size, but not if it's empty
|
// if folder content changed, update folder size, but not if it's empty
|
||||||
if (this._dialog && this._dialog._designCapacity !== this._orderedItems.length && this._orderedItems.length)
|
/* if (this._dialog && this._dialog._designCapacity !== this._orderedItems.length && this._orderedItems.length)
|
||||||
this._dialog._updateFolderSize();
|
this._dialog._updateFolderSize();*/
|
||||||
|
|
||||||
return icon;
|
return icon;
|
||||||
},
|
},
|
||||||
|
@ -1201,6 +1208,11 @@ const AppFolderDialog = {
|
||||||
// injection to _init()
|
// injection to _init()
|
||||||
after__init() {
|
after__init() {
|
||||||
this._viewBox.add_style_class_name('app-folder-dialog-vshell');
|
this._viewBox.add_style_class_name('app-folder-dialog-vshell');
|
||||||
|
// GS 46 changed the aligning to CENTER which restricts max folder dialog size
|
||||||
|
this._viewBox.set({
|
||||||
|
x_align: Clutter.ActorAlign.FILL,
|
||||||
|
y_align: Clutter.ActorAlign.FILL,
|
||||||
|
});
|
||||||
|
|
||||||
// delegate this dialog to the FolderIcon._view
|
// delegate this dialog to the FolderIcon._view
|
||||||
// so its _createFolderIcon function can update the dialog if folder content changed
|
// so its _createFolderIcon function can update the dialog if folder content changed
|
||||||
|
@ -1224,9 +1236,14 @@ const AppFolderDialog = {
|
||||||
},
|
},
|
||||||
|
|
||||||
after__addFolderNameEntry() {
|
after__addFolderNameEntry() {
|
||||||
|
// edit-folder-button class has been replaced with icon-button class which is not transparent in 46
|
||||||
|
this._editButton.add_style_class_name('edit-folder-button');
|
||||||
|
if (shellVersion46)
|
||||||
|
this._editButton.add_style_class_name('edit-folder-button-46');
|
||||||
|
|
||||||
// Edit button
|
// Edit button
|
||||||
this._removeButton = new St.Button({
|
this._removeButton = new St.Button({
|
||||||
style_class: 'edit-folder-button',
|
style_class: 'icon-button edit-folder-button',
|
||||||
button_mask: St.ButtonMask.ONE,
|
button_mask: St.ButtonMask.ONE,
|
||||||
toggle_mode: false,
|
toggle_mode: false,
|
||||||
reactive: true,
|
reactive: true,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* appFavorites.js
|
* appFavorites.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
* dash.js
|
* dash.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022-2023
|
* @copyright 2022-2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
* modified dash module of https://github.com/RensAlthuis/vertical-overview extension
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -23,7 +22,6 @@ import * as AppFavorites from 'resource:///org/gnome/shell/ui/appFavorites.js';
|
||||||
import * as AppMenu from 'resource:///org/gnome/shell/ui/appMenu.js';
|
import * as AppMenu from 'resource:///org/gnome/shell/ui/appMenu.js';
|
||||||
import * as BoxPointer from 'resource:///org/gnome/shell/ui/boxpointer.js';
|
import * as BoxPointer from 'resource:///org/gnome/shell/ui/boxpointer.js';
|
||||||
import * as DND from 'resource:///org/gnome/shell/ui/dnd.js';
|
import * as DND from 'resource:///org/gnome/shell/ui/dnd.js';
|
||||||
import * as IconGrid from 'resource:///org/gnome/shell/ui/iconGrid.js';
|
|
||||||
import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js';
|
import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js';
|
||||||
|
|
||||||
let Me;
|
let Me;
|
||||||
|
@ -39,6 +37,8 @@ export const BaseIconSizes = [16, 24, 32, 40, 44, 48, 56, 64, 72, 80, 96, 112, 1
|
||||||
|
|
||||||
const DASH_ITEM_LABEL_SHOW_TIME = 150;
|
const DASH_ITEM_LABEL_SHOW_TIME = 150;
|
||||||
|
|
||||||
|
const shellVersion46 = !Clutter.Container; // Container has been removed in 46
|
||||||
|
|
||||||
export const DashModule = class {
|
export const DashModule = class {
|
||||||
constructor(me) {
|
constructor(me) {
|
||||||
Me = me;
|
Me = me;
|
||||||
|
@ -130,32 +130,53 @@ export const DashModule = class {
|
||||||
this._overrides.addOverride('DashIcon', Dash.DashIcon.prototype, DashIconCommon);
|
this._overrides.addOverride('DashIcon', Dash.DashIcon.prototype, DashIconCommon);
|
||||||
this._overrides.addOverride('AppMenu', AppMenu.AppMenu.prototype, AppMenuCommon);
|
this._overrides.addOverride('AppMenu', AppMenu.AppMenu.prototype, AppMenuCommon);
|
||||||
|
|
||||||
|
if (shellVersion46)
|
||||||
|
dash.add_style_class_name('dash-46');
|
||||||
|
|
||||||
if (opt.DASH_VERTICAL) {
|
if (opt.DASH_VERTICAL) {
|
||||||
// this._overrides.addOverride('Dash', Dash.Dash.prototype, DashVerticalOverride);
|
// this._overrides.addOverride('Dash', Dash.Dash.prototype, DashVerticalOverride);
|
||||||
dash.add_style_class_name('vertical');
|
dash.add_style_class_name(shellVersion46
|
||||||
|
? 'vertical-46'
|
||||||
|
: 'vertical'
|
||||||
|
);
|
||||||
this._setOrientation(Clutter.Orientation.VERTICAL);
|
this._setOrientation(Clutter.Orientation.VERTICAL);
|
||||||
} else {
|
} else {
|
||||||
this._setOrientation(Clutter.Orientation.HORIZONTAL);
|
this._setOrientation(Clutter.Orientation.HORIZONTAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opt.DASH_VERTICAL && opt.DASH_BG_GS3_STYLE) {
|
||||||
|
if (opt.DASH_LEFT) {
|
||||||
|
dash.add_style_class_name(shellVersion46
|
||||||
|
? 'vertical-46-gs3-left'
|
||||||
|
: 'vertical-gs3-left');
|
||||||
|
} else if (opt.DASH_RIGHT) {
|
||||||
|
dash.add_style_class_name(shellVersion46
|
||||||
|
? 'vertical-46-gs3-right'
|
||||||
|
: 'vertical-gs3-right');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dash.remove_style_class_name('vertical-gs3-left');
|
||||||
|
dash.remove_style_class_name('vertical-gs3-right');
|
||||||
|
dash.remove_style_class_name('vertical-46-gs3-left');
|
||||||
|
dash.remove_style_class_name('vertical-46-gs3-right');
|
||||||
|
}
|
||||||
|
|
||||||
if (!this._customWorkId)
|
if (!this._customWorkId)
|
||||||
this._customWorkId = Main.initializeDeferredWork(dash._box, dash._redisplay.bind(dash));
|
this._customWorkId = Main.initializeDeferredWork(dash._box, dash._redisplay.bind(dash));
|
||||||
dash._workId = this._customWorkId;
|
dash._workId = this._customWorkId;
|
||||||
|
|
||||||
this._updateSearchWindowsIcon();
|
|
||||||
this._updateRecentFilesIcon();
|
|
||||||
this._updateExtensionsIcon();
|
|
||||||
this._moveDashAppGridIcon();
|
this._moveDashAppGridIcon();
|
||||||
this._connectShowAppsIcon();
|
this._connectShowAppsIcon();
|
||||||
|
|
||||||
dash.visible = opt.DASH_VISIBLE;
|
dash.visible = opt.DASH_VISIBLE;
|
||||||
dash._background.add_style_class_name('dash-background-reduced');
|
// dash._background.add_style_class_name('dash-background-reduced');
|
||||||
dash._queueRedisplay();
|
dash._queueRedisplay();
|
||||||
|
|
||||||
if (opt.DASH_ISOLATE_WS && !this._wmSwitchWsConId) {
|
if (opt.DASH_ISOLATE_WS && !this._wmSwitchWsConId) {
|
||||||
this._wmSwitchWsConId = global.windowManager.connect('switch-workspace', () => dash._queueRedisplay());
|
this._wmSwitchWsConId = global.windowManager.connect('switch-workspace', () => dash._queueRedisplay());
|
||||||
this._newWindowConId = global.display.connect_after('window-created', () => dash._queueRedisplay());
|
this._newWindowConId = global.display.connect_after('window-created', () => dash._queueRedisplay());
|
||||||
}
|
}
|
||||||
|
|
||||||
console.debug(' DashModule - Activated');
|
console.debug(' DashModule - Activated');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,9 +202,7 @@ export const DashModule = class {
|
||||||
this._setOrientation(Clutter.Orientation.HORIZONTAL);
|
this._setOrientation(Clutter.Orientation.HORIZONTAL);
|
||||||
this._moveDashAppGridIcon(reset);
|
this._moveDashAppGridIcon(reset);
|
||||||
this._connectShowAppsIcon(reset);
|
this._connectShowAppsIcon(reset);
|
||||||
this._updateSearchWindowsIcon(false);
|
|
||||||
this._updateRecentFilesIcon(false);
|
|
||||||
this._updateExtensionsIcon(false);
|
|
||||||
this._resetStyle(dash);
|
this._resetStyle(dash);
|
||||||
dash.visible = !this._conflict;
|
dash.visible = !this._conflict;
|
||||||
dash._background.opacity = 255;
|
dash._background.opacity = 255;
|
||||||
|
@ -194,8 +213,11 @@ export const DashModule = class {
|
||||||
|
|
||||||
_resetStyle(dash) {
|
_resetStyle(dash) {
|
||||||
dash.remove_style_class_name('vertical');
|
dash.remove_style_class_name('vertical');
|
||||||
|
dash.remove_style_class_name('vertical-46');
|
||||||
dash.remove_style_class_name('vertical-gs3-left');
|
dash.remove_style_class_name('vertical-gs3-left');
|
||||||
dash.remove_style_class_name('vertical-gs3-right');
|
dash.remove_style_class_name('vertical-gs3-right');
|
||||||
|
dash.remove_style_class_name('vertical-46-gs3-left');
|
||||||
|
dash.remove_style_class_name('vertical-46-gs3-right');
|
||||||
dash.remove_style_class_name('vertical-left');
|
dash.remove_style_class_name('vertical-left');
|
||||||
dash.remove_style_class_name('vertical-right');
|
dash.remove_style_class_name('vertical-right');
|
||||||
dash._background.remove_style_class_name('dash-background-light');
|
dash._background.remove_style_class_name('dash-background-light');
|
||||||
|
@ -237,16 +259,6 @@ export const DashModule = class {
|
||||||
dash._separator = null;
|
dash._separator = null;
|
||||||
dash._queueRedisplay();
|
dash._queueRedisplay();
|
||||||
dash._adjustIconSize();
|
dash._adjustIconSize();
|
||||||
|
|
||||||
if (orientation && opt.DASH_BG_GS3_STYLE) {
|
|
||||||
if (opt.DASH_LEFT)
|
|
||||||
dash.add_style_class_name('vertical-gs3-left');
|
|
||||||
else if (opt.DASH_RIGHT)
|
|
||||||
dash.add_style_class_name('vertical-gs3-right');
|
|
||||||
} else {
|
|
||||||
dash.remove_style_class_name('vertical-gs3-left');
|
|
||||||
dash.remove_style_class_name('vertical-gs3-right');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_moveDashAppGridIcon(reset = false) {
|
_moveDashAppGridIcon(reset = false) {
|
||||||
|
@ -295,141 +307,6 @@ export const DashModule = class {
|
||||||
dash._showAppsIcon.reactive = false;
|
dash._showAppsIcon.reactive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateSearchWindowsIcon(show = opt.SHOW_WINDOWS_ICON, dash) {
|
|
||||||
dash = dash ?? Main.overview._overview._controls.layoutManager._dash;
|
|
||||||
const dashContainer = dash._dashContainer;
|
|
||||||
|
|
||||||
if (dash._showWindowsIcon) {
|
|
||||||
dashContainer.remove_child(dash._showWindowsIcon);
|
|
||||||
if (dash._showWindowsIconClickedId) {
|
|
||||||
dash._showWindowsIcon.toggleButton.disconnect(dash._showWindowsIconClickedId);
|
|
||||||
dash._showWindowsIconClickedId = 0;
|
|
||||||
}
|
|
||||||
delete dash._showWindowsIconClickedId;
|
|
||||||
if (dash._showWindowsIcon)
|
|
||||||
dash._showWindowsIcon.destroy();
|
|
||||||
delete dash._showWindowsIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!show || !opt.get('windowSearchProviderModule'))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!dash._showWindowsIcon) {
|
|
||||||
dash._showWindowsIcon = new Dash.DashItemContainer();
|
|
||||||
new Me.Util.Overrides().addOverride('showWindowsIcon', dash._showWindowsIcon, ShowWindowsIcon);
|
|
||||||
dash._showWindowsIcon._afterInit();
|
|
||||||
dash._showWindowsIcon.show(false);
|
|
||||||
dashContainer.add_child(dash._showWindowsIcon);
|
|
||||||
dash._hookUpLabel(dash._showWindowsIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
dash._showWindowsIcon.icon.setIconSize(dash.iconSize);
|
|
||||||
if (opt.SHOW_WINDOWS_ICON === 1) {
|
|
||||||
dashContainer.set_child_at_index(dash._showWindowsIcon, 0);
|
|
||||||
} else if (opt.SHOW_WINDOWS_ICON === 2) {
|
|
||||||
const index = dashContainer.get_children().length - 1;
|
|
||||||
dashContainer.set_child_at_index(dash._showWindowsIcon, index);
|
|
||||||
}
|
|
||||||
|
|
||||||
Main.overview._overview._controls.layoutManager._dash._adjustIconSize();
|
|
||||||
|
|
||||||
if (dash._showWindowsIcon && !dash._showWindowsIconClickedId) {
|
|
||||||
dash._showWindowsIconClickedId = dash._showWindowsIcon.toggleButton.connect('clicked', () => {
|
|
||||||
Me.Util.activateSearchProvider(Me.WSP_PREFIX);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_updateRecentFilesIcon(show = opt.SHOW_RECENT_FILES_ICON, dash) {
|
|
||||||
dash = dash ?? Main.overview._overview._controls.layoutManager._dash;
|
|
||||||
const dashContainer = dash._dashContainer;
|
|
||||||
|
|
||||||
if (dash._recentFilesIcon) {
|
|
||||||
dashContainer.remove_child(dash._recentFilesIcon);
|
|
||||||
if (dash._recentFilesIconClickedId) {
|
|
||||||
dash._recentFilesIcon.toggleButton.disconnect(dash._recentFilesIconClickedId);
|
|
||||||
dash._recentFilesIconClickedId = 0;
|
|
||||||
}
|
|
||||||
delete dash._recentFilesIconClickedId;
|
|
||||||
if (dash._recentFilesIcon)
|
|
||||||
dash._recentFilesIcon.destroy();
|
|
||||||
delete dash._recentFilesIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!show || !opt.get('recentFilesSearchProviderModule'))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!dash._recentFilesIcon) {
|
|
||||||
dash._recentFilesIcon = new Dash.DashItemContainer();
|
|
||||||
new Me.Util.Overrides().addOverride('recentFilesIcon', dash._recentFilesIcon, ShowRecentFilesIcon);
|
|
||||||
dash._recentFilesIcon._afterInit();
|
|
||||||
dash._recentFilesIcon.show(false);
|
|
||||||
dashContainer.add_child(dash._recentFilesIcon);
|
|
||||||
dash._hookUpLabel(dash._recentFilesIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
dash._recentFilesIcon.icon.setIconSize(dash.iconSize);
|
|
||||||
if (opt.SHOW_RECENT_FILES_ICON === 1) {
|
|
||||||
dashContainer.set_child_at_index(dash._recentFilesIcon, 0);
|
|
||||||
} else if (opt.SHOW_RECENT_FILES_ICON === 2) {
|
|
||||||
const index = dashContainer.get_children().length - 1;
|
|
||||||
dashContainer.set_child_at_index(dash._recentFilesIcon, index);
|
|
||||||
}
|
|
||||||
|
|
||||||
Main.overview._overview._controls.layoutManager._dash._adjustIconSize();
|
|
||||||
|
|
||||||
if (dash._recentFilesIcon && !dash._recentFilesIconClickedId) {
|
|
||||||
dash._recentFilesIconClickedId = dash._recentFilesIcon.toggleButton.connect('clicked', () => {
|
|
||||||
Me.Util.activateSearchProvider(Me.RFSP_PREFIX);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_updateExtensionsIcon(show = opt.SHOW_EXTENSIONS_ICON, dash) {
|
|
||||||
dash = dash ?? Main.overview._overview._controls.layoutManager._dash;
|
|
||||||
const dashContainer = dash._dashContainer;
|
|
||||||
|
|
||||||
if (dash._extensionsIcon) {
|
|
||||||
dashContainer.remove_child(dash._extensionsIcon);
|
|
||||||
if (dash._extensionsIconClickedId) {
|
|
||||||
dash._extensionsIcon.toggleButton.disconnect(dash._extensionsIconClickedId);
|
|
||||||
dash._extensionsIconClickedId = 0;
|
|
||||||
}
|
|
||||||
delete dash._extensionsIconClickedId;
|
|
||||||
if (dash._extensionsIcon)
|
|
||||||
dash._extensionsIcon.destroy();
|
|
||||||
delete dash._extensionsIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!show || !opt.get('extensionsSearchProviderModule'))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!dash._extensionsIcon) {
|
|
||||||
dash._extensionsIcon = new Dash.DashItemContainer();
|
|
||||||
new Me.Util.Overrides().addOverride('extensionsIcon', dash._extensionsIcon, ShowExtensionsIcon);
|
|
||||||
dash._extensionsIcon._afterInit();
|
|
||||||
dash._extensionsIcon.show(false);
|
|
||||||
dashContainer.add_child(dash._extensionsIcon);
|
|
||||||
dash._hookUpLabel(dash._extensionsIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
dash._extensionsIcon.icon.setIconSize(dash.iconSize);
|
|
||||||
if (opt.SHOW_EXTENSIONS_ICON === 1) {
|
|
||||||
dashContainer.set_child_at_index(dash._extensionsIcon, 0);
|
|
||||||
} else if (opt.SHOW_EXTENSIONS_ICON === 2) {
|
|
||||||
const index = dashContainer.get_children().length - 1;
|
|
||||||
dashContainer.set_child_at_index(dash._extensionsIcon, index);
|
|
||||||
}
|
|
||||||
|
|
||||||
Main.overview._overview._controls.layoutManager._dash._adjustIconSize();
|
|
||||||
|
|
||||||
if (dash._extensionsIcon && !dash._extensionsIconClickedId) {
|
|
||||||
dash._extensionsIconClickedId = dash._extensionsIcon.toggleButton.connect('clicked', () => {
|
|
||||||
Me.Util.activateSearchProvider(Me.ESP_PREFIX);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function getAppFromSource(source) {
|
function getAppFromSource(source) {
|
||||||
|
@ -475,20 +352,20 @@ const DashItemContainerCommon = {
|
||||||
let y;
|
let y;
|
||||||
|
|
||||||
if (opt.DASH_TOP) {
|
if (opt.DASH_TOP) {
|
||||||
const yOffset = 0.75 * itemHeight + 3 * node.get_length('-y-offset');
|
const yOffset = itemHeight + (shellVersion46 ? 0 : -3);
|
||||||
y = stageY + yOffset;
|
y = stageY + yOffset;
|
||||||
} else if (opt.DASH_BOTTOM) {
|
} else if (opt.DASH_BOTTOM) {
|
||||||
const yOffset = node.get_length('-y-offset');
|
const yOffset = node.get_length('-y-offset');
|
||||||
y = stageY - this.label.height - yOffset;
|
y = stageY - this.label.height - yOffset;
|
||||||
} else if (opt.DASH_RIGHT) {
|
} else if (opt.DASH_RIGHT) {
|
||||||
const yOffset = Math.floor((itemHeight - labelHeight) / 2);
|
const yOffset = Math.floor((itemHeight - labelHeight) / 2);
|
||||||
xOffset = 4;
|
xOffset = shellVersion46 ? 8 : 4;
|
||||||
|
|
||||||
x = stageX - xOffset - this.label.width;
|
x = stageX - xOffset - this.label.width;
|
||||||
y = Math.clamp(stageY + yOffset, 0, global.stage.height - labelHeight);
|
y = Math.clamp(stageY + yOffset, 0, global.stage.height - labelHeight);
|
||||||
} else if (opt.DASH_LEFT) {
|
} else if (opt.DASH_LEFT) {
|
||||||
const yOffset = Math.floor((itemHeight - labelHeight) / 2);
|
const yOffset = Math.floor((itemHeight - labelHeight) / 2);
|
||||||
xOffset = 4;
|
xOffset = shellVersion46 ? 8 : 4;
|
||||||
|
|
||||||
x = stageX + this.width + xOffset;
|
x = stageX + this.width + xOffset;
|
||||||
y = Math.clamp(stageY + yOffset, 0, global.stage.height - labelHeight);
|
y = Math.clamp(stageY + yOffset, 0, global.stage.height - labelHeight);
|
||||||
|
@ -744,15 +621,15 @@ const DashCommon = {
|
||||||
if (this._showAppsIcon.visible)
|
if (this._showAppsIcon.visible)
|
||||||
iconChildren.push(this._showAppsIcon);
|
iconChildren.push(this._showAppsIcon);
|
||||||
|
|
||||||
|
|
||||||
|
// showWindowsIcon and extensionsIcon can be provided by the WSP and ESP extensions
|
||||||
if (this._showWindowsIcon)
|
if (this._showWindowsIcon)
|
||||||
iconChildren.push(this._showWindowsIcon);
|
iconChildren.push(this._showWindowsIcon);
|
||||||
|
|
||||||
if (this._recentFilesIcon)
|
|
||||||
iconChildren.push(this._recentFilesIcon);
|
|
||||||
|
|
||||||
if (this._extensionsIcon)
|
if (this._extensionsIcon)
|
||||||
iconChildren.push(this._extensionsIcon);
|
iconChildren.push(this._extensionsIcon);
|
||||||
|
|
||||||
|
|
||||||
if (!iconChildren.length)
|
if (!iconChildren.length)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -967,12 +844,15 @@ const DashIconCommon = {
|
||||||
this._scrollConId = this.connect('scroll-event', DashExtensions.onScrollEvent.bind(this));
|
this._scrollConId = this.connect('scroll-event', DashExtensions.onScrollEvent.bind(this));
|
||||||
this._leaveConId = this.connect('leave-event', DashExtensions.onLeaveEvent.bind(this));
|
this._leaveConId = this.connect('leave-event', DashExtensions.onLeaveEvent.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._updateRunningDotStyle)
|
||||||
|
this._updateRunningDotStyle();
|
||||||
},
|
},
|
||||||
|
|
||||||
popupMenu() {
|
/* popupMenu() {
|
||||||
const side = opt.DASH_VERTICAL ? St.Side.LEFT : St.Side.BOTTOM;
|
const side = opt.DASH_VERTICAL ? St.Side.LEFT : St.Side.BOTTOM;
|
||||||
AppIconCommon.popupMenu.bind(this)(side);
|
AppIconCommon.popupMenu.bind(this)(side);
|
||||||
},
|
},*/
|
||||||
|
|
||||||
_updateRunningStyle() {
|
_updateRunningStyle() {
|
||||||
const currentWs = global.workspace_manager.get_active_workspace();
|
const currentWs = global.workspace_manager.get_active_workspace();
|
||||||
|
@ -985,6 +865,220 @@ const DashIconCommon = {
|
||||||
else
|
else
|
||||||
this._dot.hide();
|
this._dot.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* after__init() {
|
||||||
|
if (this._updateRunningDotStyle)
|
||||||
|
this._updateRunningDotStyle();
|
||||||
|
},*/
|
||||||
|
|
||||||
|
_updateRunningDotStyle() {
|
||||||
|
if (opt.RUNNING_DOT_STYLE)
|
||||||
|
this._dot.add_style_class_name('app-well-app-running-dot-custom');
|
||||||
|
else
|
||||||
|
this._dot.remove_style_class_name('app-well-app-running-dot-custom');
|
||||||
|
|
||||||
|
if (!this.label && shellVersion46) {
|
||||||
|
if (opt.DASH_VERTICAL) {
|
||||||
|
this._dot.translation_y = 0;
|
||||||
|
this._dot.translation_x = 0; // opt.DASH_LEFT ? -4 : 4;
|
||||||
|
} else {
|
||||||
|
this._dot.translation_y = 8;
|
||||||
|
this._dot.translation_x = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
activate(button) {
|
||||||
|
const event = Clutter.get_current_event();
|
||||||
|
const state = event ? event.get_state() : 0;
|
||||||
|
const isMiddleButton = button && button === Clutter.BUTTON_MIDDLE;
|
||||||
|
const isCtrlPressed = Me.Util.isCtrlPressed(state);
|
||||||
|
const isShiftPressed = Me.Util.isShiftPressed(state);
|
||||||
|
|
||||||
|
const currentWS = global.workspace_manager.get_active_workspace();
|
||||||
|
const appRecentWorkspace = this._getAppRecentWorkspace(this.app);
|
||||||
|
// this feature shouldn't affect search results, dash icons don't have labels, so we use them as a condition
|
||||||
|
const showWidowsBeforeActivation = opt.DASH_CLICK_ACTION === 1 && !this.icon.label;
|
||||||
|
|
||||||
|
let targetWindowOnCurrentWs = false;
|
||||||
|
if (opt.DASH_FOLLOW_RECENT_WIN) {
|
||||||
|
targetWindowOnCurrentWs = appRecentWorkspace === currentWS;
|
||||||
|
} else {
|
||||||
|
this.app.get_windows().forEach(
|
||||||
|
w => {
|
||||||
|
targetWindowOnCurrentWs = targetWindowOnCurrentWs || (w.get_workspace() === currentWS);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const openNewWindow = this.app.can_open_new_window() &&
|
||||||
|
this.app.state === Shell.AppState.RUNNING &&
|
||||||
|
(((isCtrlPressed || isMiddleButton) && !opt.DASH_CLICK_OPEN_NEW_WIN) ||
|
||||||
|
(opt.DASH_CLICK_OPEN_NEW_WIN && !this._selectedMetaWin && !isMiddleButton) ||
|
||||||
|
((opt.DASH_CLICK_PREFER_WORKSPACE || opt.DASH_ISOLATE_WS) && !targetWindowOnCurrentWs));
|
||||||
|
|
||||||
|
if ((this.app.state === Shell.AppState.STOPPED || openNewWindow) && !isShiftPressed)
|
||||||
|
this.animateLaunch();
|
||||||
|
|
||||||
|
if (openNewWindow) {
|
||||||
|
this.app.open_new_window(-1);
|
||||||
|
// if DASH_CLICK_ACTION == "SHOW_WINS_BEFORE", the app has more than one window and has no window on the current workspace,
|
||||||
|
// don't activate the app immediately, only move the overview to the workspace with the app's recent window
|
||||||
|
} else if (showWidowsBeforeActivation && !isShiftPressed && this.app.get_n_windows() > 1 && !targetWindowOnCurrentWs/* && !(opt.OVERVIEW_MODE && !opt.WORKSPACE_MODE)*/) {
|
||||||
|
|
||||||
|
Main.wm.actionMoveWorkspace(appRecentWorkspace);
|
||||||
|
Main.overview.dash.showAppsButton.checked = false;
|
||||||
|
return;
|
||||||
|
} else if (this._selectedMetaWin) {
|
||||||
|
this._selectedMetaWin.activate(global.get_current_time());
|
||||||
|
} else if (showWidowsBeforeActivation && opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE && !isShiftPressed && this.app.get_n_windows() > 1) {
|
||||||
|
// expose windows
|
||||||
|
Main.overview._overview._controls._thumbnailsBox._activateThumbnailAtPoint(0, 0, global.get_current_time(), true);
|
||||||
|
return;
|
||||||
|
} else if (((opt.DASH_SHIFT_CLICK_MV && isShiftPressed) || ((opt.DASH_CLICK_PREFER_WORKSPACE || opt.DASH_ISOLATE_WS) && !openNewWindow)) && this.app.get_windows().length) {
|
||||||
|
this._moveAppToCurrentWorkspace();
|
||||||
|
if (opt.DASH_ISOLATE_WS) {
|
||||||
|
this.app.activate();
|
||||||
|
// hide the overview after the window is re-created
|
||||||
|
GLib.idle_add(GLib.PRIORITY_LOW, () => Main.overview.hide());
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
} else if (isShiftPressed) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.app.activate();
|
||||||
|
}
|
||||||
|
|
||||||
|
Main.overview.hide();
|
||||||
|
},
|
||||||
|
|
||||||
|
_moveAppToCurrentWorkspace() {
|
||||||
|
this.app.get_windows().forEach(w => w.change_workspace(global.workspace_manager.get_active_workspace()));
|
||||||
|
},
|
||||||
|
|
||||||
|
popupMenu(side = St.Side.LEFT) {
|
||||||
|
side = opt.DASH_VERTICAL ? St.Side.LEFT : St.Side.BOTTOM;
|
||||||
|
// AppIconCommon.popupMenu.bind(this)(side);
|
||||||
|
|
||||||
|
this.setForcedHighlight(true);
|
||||||
|
this._removeMenuTimeout();
|
||||||
|
this.fake_release();
|
||||||
|
|
||||||
|
if (!this._getWindowsOnCurrentWs) {
|
||||||
|
this._getWindowsOnCurrentWs = function () {
|
||||||
|
const winList = [];
|
||||||
|
this.app.get_windows().forEach(w => {
|
||||||
|
if (w.get_workspace() === global.workspace_manager.get_active_workspace())
|
||||||
|
winList.push(w);
|
||||||
|
});
|
||||||
|
return winList;
|
||||||
|
};
|
||||||
|
|
||||||
|
this._windowsOnOtherWs = function () {
|
||||||
|
return (this.app.get_windows().length - this._getWindowsOnCurrentWs().length) > 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this._menu) {
|
||||||
|
this._menu = new AppMenu.AppMenu(this, side, {
|
||||||
|
favoritesSection: true,
|
||||||
|
showSingleWindows: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
this._menu.setApp(this.app);
|
||||||
|
this._openSigId = this._menu.connect('open-state-changed', (menu, isPoppedUp) => {
|
||||||
|
if (!isPoppedUp)
|
||||||
|
this._onMenuPoppedDown();
|
||||||
|
});
|
||||||
|
// Main.overview.connectObject('hiding',
|
||||||
|
this._hidingSigId = Main.overview.connect('hiding',
|
||||||
|
() => this._menu.close(), this);
|
||||||
|
|
||||||
|
Main.uiGroup.add_child(this._menu.actor);
|
||||||
|
this._menuManager.addMenu(this._menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
// once the menu is created, it stays unchanged and we need to modify our items based on current situation
|
||||||
|
if (this._addedMenuItems && this._addedMenuItems.length)
|
||||||
|
this._addedMenuItems.forEach(i => i.destroy());
|
||||||
|
|
||||||
|
|
||||||
|
const popupItems = [];
|
||||||
|
|
||||||
|
const separator = new PopupMenu.PopupSeparatorMenuItem();
|
||||||
|
this._menu.addMenuItem(separator);
|
||||||
|
|
||||||
|
if (this.app.get_n_windows()) {
|
||||||
|
// if (/* opt.APP_MENU_FORCE_QUIT*/true) {}
|
||||||
|
popupItems.push([_('Force Quit'), () => {
|
||||||
|
this.app.get_windows()[0].kill();
|
||||||
|
}]);
|
||||||
|
|
||||||
|
// if (opt.APP_MENU_CLOSE_WS) {}
|
||||||
|
const nWin = this._getWindowsOnCurrentWs().length;
|
||||||
|
if (nWin) {
|
||||||
|
popupItems.push([_(`Close ${nWin} Windows on Current Workspace`), () => {
|
||||||
|
const windows = this._getWindowsOnCurrentWs();
|
||||||
|
let time = global.get_current_time();
|
||||||
|
for (let win of windows) {
|
||||||
|
// increase time by 1 ms for each window to avoid errors from GS
|
||||||
|
win.delete(time++);
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
popupItems.push([_('Move App to Current Workspace ( Shift + Click )'), this._moveAppToCurrentWorkspace]);
|
||||||
|
// WTMB (Windows Thumbnails) extension required
|
||||||
|
if (global.windowThumbnails) {
|
||||||
|
popupItems.push([_('Create Window Thumbnail/PiP'), () => {
|
||||||
|
global.windowThumbnails?.createThumbnail(this.app.get_windows()[0]);
|
||||||
|
}]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this._addedMenuItems = [];
|
||||||
|
this._addedMenuItems.push(separator);
|
||||||
|
popupItems.forEach(i => {
|
||||||
|
let item = new PopupMenu.PopupMenuItem(i[0]);
|
||||||
|
this._menu.addMenuItem(item);
|
||||||
|
item.connect('activate', i[1].bind(this));
|
||||||
|
if (i[1] === this._moveAppToCurrentWorkspace && !this._windowsOnOtherWs())
|
||||||
|
item.setSensitive(false);
|
||||||
|
this._addedMenuItems.push(item);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.emit('menu-state-changed', true);
|
||||||
|
|
||||||
|
this._menu.open(BoxPointer.PopupAnimation.FULL);
|
||||||
|
this._menuManager.ignoreRelease();
|
||||||
|
this.emit('sync-tooltip');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_getWindowApp(metaWin) {
|
||||||
|
const tracker = Shell.WindowTracker.get_default();
|
||||||
|
return tracker.get_window_app(metaWin);
|
||||||
|
},
|
||||||
|
|
||||||
|
_getAppLastUsedWindow(app) {
|
||||||
|
let recentWin;
|
||||||
|
global.display.get_tab_list(Meta.TabList.NORMAL_ALL, null).forEach(metaWin => {
|
||||||
|
const winApp = this._getWindowApp(metaWin);
|
||||||
|
if (!recentWin && winApp === app)
|
||||||
|
recentWin = metaWin;
|
||||||
|
});
|
||||||
|
return recentWin;
|
||||||
|
},
|
||||||
|
|
||||||
|
_getAppRecentWorkspace(app) {
|
||||||
|
const recentWin = this._getAppLastUsedWindow(app);
|
||||||
|
if (recentWin)
|
||||||
|
return recentWin.get_workspace();
|
||||||
|
|
||||||
|
return null;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const DashExtensions = {
|
const DashExtensions = {
|
||||||
|
@ -1173,305 +1267,6 @@ const AppIconCommon = {
|
||||||
else
|
else
|
||||||
this._dot.remove_style_class_name('app-well-app-running-dot-custom');
|
this._dot.remove_style_class_name('app-well-app-running-dot-custom');
|
||||||
},
|
},
|
||||||
|
|
||||||
activate(button) {
|
|
||||||
const event = Clutter.get_current_event();
|
|
||||||
const state = event ? event.get_state() : 0;
|
|
||||||
const isMiddleButton = button && button === Clutter.BUTTON_MIDDLE;
|
|
||||||
const isCtrlPressed = Me.Util.isCtrlPressed(state);
|
|
||||||
const isShiftPressed = Me.Util.isShiftPressed(state);
|
|
||||||
|
|
||||||
const currentWS = global.workspace_manager.get_active_workspace();
|
|
||||||
const appRecentWorkspace = this._getAppRecentWorkspace(this.app);
|
|
||||||
// this feature shouldn't affect search results, dash icons don't have labels, so we use them as a condition
|
|
||||||
const showWidowsBeforeActivation = opt.DASH_CLICK_ACTION === 1 && !this.icon.label;
|
|
||||||
|
|
||||||
let targetWindowOnCurrentWs = false;
|
|
||||||
if (opt.DASH_FOLLOW_RECENT_WIN) {
|
|
||||||
targetWindowOnCurrentWs = appRecentWorkspace === currentWS;
|
|
||||||
} else {
|
|
||||||
this.app.get_windows().forEach(
|
|
||||||
w => {
|
|
||||||
targetWindowOnCurrentWs = targetWindowOnCurrentWs || (w.get_workspace() === currentWS);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const openNewWindow = this.app.can_open_new_window() &&
|
|
||||||
this.app.state === Shell.AppState.RUNNING &&
|
|
||||||
(((isCtrlPressed || isMiddleButton) && !opt.DASH_CLICK_OPEN_NEW_WIN) ||
|
|
||||||
(opt.DASH_CLICK_OPEN_NEW_WIN && !this._selectedMetaWin && !isMiddleButton) ||
|
|
||||||
((opt.DASH_CLICK_PREFER_WORKSPACE || opt.DASH_ISOLATE_WS) && !targetWindowOnCurrentWs));
|
|
||||||
|
|
||||||
if ((this.app.state === Shell.AppState.STOPPED || openNewWindow) && !isShiftPressed)
|
|
||||||
this.animateLaunch();
|
|
||||||
|
|
||||||
if (openNewWindow) {
|
|
||||||
this.app.open_new_window(-1);
|
|
||||||
// if DASH_CLICK_ACTION == "SHOW_WINS_BEFORE", the app has more than one window and has no window on the current workspace,
|
|
||||||
// don't activate the app immediately, only move the overview to the workspace with the app's recent window
|
|
||||||
} else if (showWidowsBeforeActivation && !isShiftPressed && this.app.get_n_windows() > 1 && !targetWindowOnCurrentWs/* && !(opt.OVERVIEW_MODE && !opt.WORKSPACE_MODE)*/) {
|
|
||||||
|
|
||||||
Main.wm.actionMoveWorkspace(appRecentWorkspace);
|
|
||||||
Main.overview.dash.showAppsButton.checked = false;
|
|
||||||
return;
|
|
||||||
} else if (this._selectedMetaWin) {
|
|
||||||
this._selectedMetaWin.activate(global.get_current_time());
|
|
||||||
} else if (showWidowsBeforeActivation && opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE && !isShiftPressed && this.app.get_n_windows() > 1) {
|
|
||||||
// expose windows
|
|
||||||
Main.overview._overview._controls._thumbnailsBox._activateThumbnailAtPoint(0, 0, global.get_current_time(), true);
|
|
||||||
return;
|
|
||||||
} else if (((opt.DASH_SHIFT_CLICK_MV && isShiftPressed) || ((opt.DASH_CLICK_PREFER_WORKSPACE || opt.DASH_ISOLATE_WS) && !openNewWindow)) && this.app.get_windows().length) {
|
|
||||||
this._moveAppToCurrentWorkspace();
|
|
||||||
if (opt.DASH_ISOLATE_WS) {
|
|
||||||
this.app.activate();
|
|
||||||
// hide the overview after the window is re-created
|
|
||||||
GLib.idle_add(GLib.PRIORITY_LOW, () => Main.overview.hide());
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
} else if (isShiftPressed) {
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
this.app.activate();
|
|
||||||
}
|
|
||||||
|
|
||||||
Main.overview.hide();
|
|
||||||
},
|
|
||||||
|
|
||||||
_moveAppToCurrentWorkspace() {
|
|
||||||
this.app.get_windows().forEach(w => w.change_workspace(global.workspace_manager.get_active_workspace()));
|
|
||||||
},
|
|
||||||
|
|
||||||
popupMenu(side = St.Side.LEFT) {
|
|
||||||
this.setForcedHighlight(true);
|
|
||||||
this._removeMenuTimeout();
|
|
||||||
this.fake_release();
|
|
||||||
|
|
||||||
if (!this._getWindowsOnCurrentWs) {
|
|
||||||
this._getWindowsOnCurrentWs = function () {
|
|
||||||
const winList = [];
|
|
||||||
this.app.get_windows().forEach(w => {
|
|
||||||
if (w.get_workspace() === global.workspace_manager.get_active_workspace())
|
|
||||||
winList.push(w);
|
|
||||||
});
|
|
||||||
return winList;
|
|
||||||
};
|
|
||||||
|
|
||||||
this._windowsOnOtherWs = function () {
|
|
||||||
return (this.app.get_windows().length - this._getWindowsOnCurrentWs().length) > 0;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this._menu) {
|
|
||||||
this._menu = new AppMenu.AppMenu(this, side, {
|
|
||||||
favoritesSection: true,
|
|
||||||
showSingleWindows: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
this._menu.setApp(this.app);
|
|
||||||
this._openSigId = this._menu.connect('open-state-changed', (menu, isPoppedUp) => {
|
|
||||||
if (!isPoppedUp)
|
|
||||||
this._onMenuPoppedDown();
|
|
||||||
});
|
|
||||||
// Main.overview.connectObject('hiding',
|
|
||||||
this._hidingSigId = Main.overview.connect('hiding',
|
|
||||||
() => this._menu.close(), this);
|
|
||||||
|
|
||||||
Main.uiGroup.add_actor(this._menu.actor);
|
|
||||||
this._menuManager.addMenu(this._menu);
|
|
||||||
}
|
|
||||||
|
|
||||||
// once the menu is created, it stays unchanged and we need to modify our items based on current situation
|
|
||||||
if (this._addedMenuItems && this._addedMenuItems.length)
|
|
||||||
this._addedMenuItems.forEach(i => i.destroy());
|
|
||||||
|
|
||||||
|
|
||||||
const popupItems = [];
|
|
||||||
|
|
||||||
const separator = new PopupMenu.PopupSeparatorMenuItem();
|
|
||||||
this._menu.addMenuItem(separator);
|
|
||||||
|
|
||||||
if (this.app.get_n_windows()) {
|
|
||||||
// if (/* opt.APP_MENU_FORCE_QUIT*/true) {}
|
|
||||||
popupItems.push([_('Force Quit'), () => {
|
|
||||||
this.app.get_windows()[0].kill();
|
|
||||||
}]);
|
|
||||||
|
|
||||||
// if (opt.APP_MENU_CLOSE_WS) {}
|
|
||||||
const nWin = this._getWindowsOnCurrentWs().length;
|
|
||||||
if (nWin) {
|
|
||||||
popupItems.push([_(`Close ${nWin} Windows on Current Workspace`), () => {
|
|
||||||
const windows = this._getWindowsOnCurrentWs();
|
|
||||||
let time = global.get_current_time();
|
|
||||||
for (let win of windows) {
|
|
||||||
// increase time by 1 ms for each window to avoid errors from GS
|
|
||||||
win.delete(time++);
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
}
|
|
||||||
|
|
||||||
popupItems.push([_('Move App to Current Workspace ( Shift + Click )'), this._moveAppToCurrentWorkspace]);
|
|
||||||
if (opt.WINDOW_THUMBNAIL_ENABLED) {
|
|
||||||
popupItems.push([_('Create Window Thumbnail - PIP'), () => {
|
|
||||||
Me.Modules.winTmbModule.createThumbnail(this.app.get_windows()[0]);
|
|
||||||
}]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this._addedMenuItems = [];
|
|
||||||
this._addedMenuItems.push(separator);
|
|
||||||
popupItems.forEach(i => {
|
|
||||||
let item = new PopupMenu.PopupMenuItem(i[0]);
|
|
||||||
this._menu.addMenuItem(item);
|
|
||||||
item.connect('activate', i[1].bind(this));
|
|
||||||
if (i[1] === this._moveAppToCurrentWorkspace && !this._windowsOnOtherWs())
|
|
||||||
item.setSensitive(false);
|
|
||||||
this._addedMenuItems.push(item);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.emit('menu-state-changed', true);
|
|
||||||
|
|
||||||
this._menu.open(BoxPointer.PopupAnimation.FULL);
|
|
||||||
this._menuManager.ignoreRelease();
|
|
||||||
this.emit('sync-tooltip');
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
_getWindowApp(metaWin) {
|
|
||||||
const tracker = Shell.WindowTracker.get_default();
|
|
||||||
return tracker.get_window_app(metaWin);
|
|
||||||
},
|
|
||||||
|
|
||||||
_getAppLastUsedWindow(app) {
|
|
||||||
let recentWin;
|
|
||||||
global.display.get_tab_list(Meta.TabList.NORMAL_ALL, null).forEach(metaWin => {
|
|
||||||
const winApp = this._getWindowApp(metaWin);
|
|
||||||
if (!recentWin && winApp === app)
|
|
||||||
recentWin = metaWin;
|
|
||||||
});
|
|
||||||
return recentWin;
|
|
||||||
},
|
|
||||||
|
|
||||||
_getAppRecentWorkspace(app) {
|
|
||||||
const recentWin = this._getAppLastUsedWindow(app);
|
|
||||||
if (recentWin)
|
|
||||||
return recentWin.get_workspace();
|
|
||||||
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const ShowWindowsIcon = {
|
|
||||||
_afterInit() {
|
|
||||||
this._isSearchWindowsIcon = true;
|
|
||||||
this._labelText = _('Search Open Windows (Hotkey: Space)');
|
|
||||||
this.toggleButton = new St.Button({
|
|
||||||
style_class: 'show-apps',
|
|
||||||
track_hover: true,
|
|
||||||
can_focus: true,
|
|
||||||
toggle_mode: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
this._iconActor = null;
|
|
||||||
this.icon = new IconGrid.BaseIcon(this.labelText, {
|
|
||||||
setSizeManually: true,
|
|
||||||
showLabel: false,
|
|
||||||
createIcon: this._createIcon.bind(this),
|
|
||||||
});
|
|
||||||
this.icon.y_align = Clutter.ActorAlign.CENTER;
|
|
||||||
|
|
||||||
this.toggleButton.add_actor(this.icon);
|
|
||||||
this.toggleButton._delegate = this;
|
|
||||||
|
|
||||||
this.setChild(this.toggleButton);
|
|
||||||
|
|
||||||
if (opt.SEARCH_WINDOWS_ICON_SCROLL) {
|
|
||||||
this.reactive = true;
|
|
||||||
this._scrollConId = this.connect('scroll-event', DashExtensions.onScrollEvent.bind(this));
|
|
||||||
this._leaveConId = this.connect('leave-event', DashExtensions.onLeaveEvent.bind(this));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_createIcon(size) {
|
|
||||||
this._iconActor = new St.Icon({
|
|
||||||
icon_name: 'focus-windows-symbolic',
|
|
||||||
icon_size: size,
|
|
||||||
style_class: 'show-apps-icon',
|
|
||||||
track_hover: true,
|
|
||||||
});
|
|
||||||
return this._iconActor;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const ShowRecentFilesIcon = {
|
|
||||||
_afterInit() {
|
|
||||||
this._labelText = _('Search Recent Files (Hotkey: Ctrl + Space)');
|
|
||||||
this.toggleButton = new St.Button({
|
|
||||||
style_class: 'show-apps',
|
|
||||||
track_hover: true,
|
|
||||||
can_focus: true,
|
|
||||||
toggle_mode: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
this._iconActor = null;
|
|
||||||
this.icon = new IconGrid.BaseIcon(this.labelText, {
|
|
||||||
setSizeManually: true,
|
|
||||||
showLabel: false,
|
|
||||||
createIcon: this._createIcon.bind(this),
|
|
||||||
});
|
|
||||||
this.icon.y_align = Clutter.ActorAlign.CENTER;
|
|
||||||
|
|
||||||
this.toggleButton.add_actor(this.icon);
|
|
||||||
this.toggleButton._delegate = this;
|
|
||||||
|
|
||||||
this.setChild(this.toggleButton);
|
|
||||||
},
|
|
||||||
|
|
||||||
_createIcon(size) {
|
|
||||||
this._iconActor = new St.Icon({
|
|
||||||
icon_name: 'document-open-recent-symbolic',
|
|
||||||
icon_size: size,
|
|
||||||
style_class: 'show-apps-icon',
|
|
||||||
track_hover: true,
|
|
||||||
});
|
|
||||||
return this._iconActor;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const ShowExtensionsIcon = {
|
|
||||||
_afterInit() {
|
|
||||||
this._labelText = _('Search Extensions (Hotkey: Ctrl + Shift + Space)');
|
|
||||||
this.toggleButton = new St.Button({
|
|
||||||
style_class: 'show-apps',
|
|
||||||
track_hover: true,
|
|
||||||
can_focus: true,
|
|
||||||
toggle_mode: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
this._iconActor = null;
|
|
||||||
this.icon = new IconGrid.BaseIcon(this.labelText, {
|
|
||||||
setSizeManually: true,
|
|
||||||
showLabel: false,
|
|
||||||
createIcon: this._createIcon.bind(this),
|
|
||||||
});
|
|
||||||
this.icon.y_align = Clutter.ActorAlign.CENTER;
|
|
||||||
|
|
||||||
this.toggleButton.add_actor(this.icon);
|
|
||||||
this.toggleButton._delegate = this;
|
|
||||||
|
|
||||||
this.setChild(this.toggleButton);
|
|
||||||
},
|
|
||||||
|
|
||||||
_createIcon(size) {
|
|
||||||
this._iconActor = new St.Icon({
|
|
||||||
icon_name: 'application-x-addon-symbolic',
|
|
||||||
icon_size: size,
|
|
||||||
style_class: 'show-apps-icon',
|
|
||||||
track_hover: true,
|
|
||||||
});
|
|
||||||
return this._iconActor;
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const AppMenuCommon = {
|
const AppMenuCommon = {
|
||||||
|
|
|
@ -1,406 +0,0 @@
|
||||||
/**
|
|
||||||
* V-Shell (Vertical Workspaces)
|
|
||||||
* extensionsSearchProvider.js
|
|
||||||
*
|
|
||||||
* @author GdH <G-dH@github.com>
|
|
||||||
* @copyright 2022 - 2023
|
|
||||||
* @license GPL-3.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import GLib from 'gi://GLib';
|
|
||||||
import St from 'gi://St';
|
|
||||||
import Gio from 'gi://Gio';
|
|
||||||
import Shell from 'gi://Shell';
|
|
||||||
import GObject from 'gi://GObject';
|
|
||||||
import Clutter from 'gi://Clutter';
|
|
||||||
|
|
||||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
|
||||||
|
|
||||||
const ExtensionState = {
|
|
||||||
1: 'ENABLED',
|
|
||||||
2: 'DISABLED',
|
|
||||||
3: 'ERROR',
|
|
||||||
4: 'INCOMPATIBLE',
|
|
||||||
5: 'DOWNLOADING',
|
|
||||||
6: 'INITIALIZED',
|
|
||||||
7: 'DISABLING',
|
|
||||||
8: 'ENABLING',
|
|
||||||
};
|
|
||||||
|
|
||||||
let Me;
|
|
||||||
let opt;
|
|
||||||
// gettext
|
|
||||||
let _;
|
|
||||||
let _toggleTimeout;
|
|
||||||
|
|
||||||
// prefix helps to eliminate results from other search providers
|
|
||||||
// so it needs to be something less common
|
|
||||||
// needs to be accessible from vw module
|
|
||||||
export const PREFIX = 'eq//';
|
|
||||||
|
|
||||||
export class ExtensionsSearchProviderModule {
|
|
||||||
// export for other modules
|
|
||||||
static _PREFIX = PREFIX;
|
|
||||||
constructor(me) {
|
|
||||||
Me = me;
|
|
||||||
opt = Me.opt;
|
|
||||||
_ = Me.gettext;
|
|
||||||
|
|
||||||
this._firstActivation = true;
|
|
||||||
this.moduleEnabled = false;
|
|
||||||
this._extensionsSearchProvider = null;
|
|
||||||
this._enableTimeoutId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanGlobals() {
|
|
||||||
Me = null;
|
|
||||||
opt = null;
|
|
||||||
_ = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
update(reset) {
|
|
||||||
if (_toggleTimeout)
|
|
||||||
GLib.source_remove(_toggleTimeout);
|
|
||||||
|
|
||||||
this.moduleEnabled = opt.get('extensionsSearchProviderModule');
|
|
||||||
|
|
||||||
reset = reset || !this.moduleEnabled;
|
|
||||||
|
|
||||||
if (reset && !this._firstActivation) {
|
|
||||||
this._disableModule();
|
|
||||||
} else if (!reset) {
|
|
||||||
this._firstActivation = false;
|
|
||||||
this._activateModule();
|
|
||||||
}
|
|
||||||
if (reset && this._firstActivation)
|
|
||||||
console.debug(' ExtensionsSearchProviderModule - Keeping untouched');
|
|
||||||
}
|
|
||||||
|
|
||||||
_activateModule() {
|
|
||||||
// delay because Fedora had problem to register a new provider soon after Shell restarts
|
|
||||||
this._enableTimeoutId = GLib.timeout_add(
|
|
||||||
GLib.PRIORITY_DEFAULT,
|
|
||||||
2000,
|
|
||||||
() => {
|
|
||||||
if (!this._extensionsSearchProvider) {
|
|
||||||
this._extensionsSearchProvider = new extensionsSearchProvider(opt);
|
|
||||||
this._getOverviewSearchResult()._registerProvider(this._extensionsSearchProvider);
|
|
||||||
}
|
|
||||||
this._enableTimeoutId = 0;
|
|
||||||
return GLib.SOURCE_REMOVE;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
console.debug(' ExtensionsSearchProviderModule - Activated');
|
|
||||||
}
|
|
||||||
|
|
||||||
_disableModule() {
|
|
||||||
if (this._enableTimeoutId) {
|
|
||||||
GLib.source_remove(this._enableTimeoutId);
|
|
||||||
this._enableTimeoutId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._extensionsSearchProvider) {
|
|
||||||
this._getOverviewSearchResult()._unregisterProvider(this._extensionsSearchProvider);
|
|
||||||
this._extensionsSearchProvider = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
console.debug(' ExtensionsSearchProviderModule - Disabled');
|
|
||||||
}
|
|
||||||
|
|
||||||
_getOverviewSearchResult() {
|
|
||||||
return Main.overview._overview.controls._searchController._searchResults;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class extensionsSearchProvider {
|
|
||||||
constructor() {
|
|
||||||
this.id = 'extensions';
|
|
||||||
const appSystem = Shell.AppSystem.get_default();
|
|
||||||
let appInfo = appSystem.lookup_app('com.matjakeman.ExtensionManager.desktop')?.get_app_info();
|
|
||||||
if (!appInfo)
|
|
||||||
appInfo = appSystem.lookup_app('org.gnome.Extensions.desktop')?.get_app_info();
|
|
||||||
if (!appInfo)
|
|
||||||
appInfo = Gio.AppInfo.create_from_commandline('/usr/bin/gnome-extensions-app', 'Extensions', null);
|
|
||||||
appInfo.get_description = () => _('Search extensions');
|
|
||||||
appInfo.get_name = () => _('Extensions');
|
|
||||||
appInfo.get_id = () => 'org.gnome.Extensions.desktop';
|
|
||||||
appInfo.get_icon = () => Gio.icon_new_for_string('application-x-addon');
|
|
||||||
appInfo.should_show = () => true;
|
|
||||||
|
|
||||||
this.appInfo = appInfo;
|
|
||||||
this.canLaunchSearch = true;
|
|
||||||
this.isRemoteProvider = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
getInitialResultSet(terms/* , callback*/) {
|
|
||||||
const extensions = {};
|
|
||||||
Main.extensionManager._extensions.forEach(
|
|
||||||
e => {
|
|
||||||
extensions[e.uuid] = e;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
this.extensions = extensions;
|
|
||||||
|
|
||||||
return new Promise(resolve => resolve(this._getResultSet(terms)));
|
|
||||||
}
|
|
||||||
|
|
||||||
_getResultSet(terms) {
|
|
||||||
// do not modify original terms
|
|
||||||
let termsCopy = [...terms];
|
|
||||||
// search for terms without prefix
|
|
||||||
termsCopy[0] = termsCopy[0].replace(PREFIX, '');
|
|
||||||
|
|
||||||
const candidates = this.extensions;
|
|
||||||
const _terms = [].concat(termsCopy);
|
|
||||||
|
|
||||||
const term = _terms.join(' ');
|
|
||||||
|
|
||||||
const results = [];
|
|
||||||
let m;
|
|
||||||
for (let id in candidates) {
|
|
||||||
const extension = this.extensions[id];
|
|
||||||
const text = extension.metadata.name + (extension.state === 1 ? 'enabled' : '') + ([6, 2].includes(extension.state) ? 'disabled' : '');
|
|
||||||
if (opt.SEARCH_FUZZY)
|
|
||||||
m = Me.Util.fuzzyMatch(term, text);
|
|
||||||
else
|
|
||||||
m = Me.Util.strictMatch(term, text);
|
|
||||||
|
|
||||||
if (m !== -1)
|
|
||||||
results.push({ weight: m, id });
|
|
||||||
}
|
|
||||||
|
|
||||||
// sort alphabetically
|
|
||||||
results.sort((a, b) => this.extensions[a.id].metadata.name.localeCompare(this.extensions[b.id].metadata.name));
|
|
||||||
// enabled first
|
|
||||||
// results.sort((a, b) => this.extensions[a.id].state !== 1 && this.extensions[b.id].state === 1);
|
|
||||||
// incompatible last
|
|
||||||
results.sort((a, b) => this.extensions[a.id].state === 4 && this.extensions[b.id].state !== 4);
|
|
||||||
|
|
||||||
const resultIds = results.map(item => item.id);
|
|
||||||
return resultIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
getResultMetas(resultIds/* , callback = null*/) {
|
|
||||||
const metas = resultIds.map(id => this.getResultMeta(id));
|
|
||||||
return new Promise(resolve => resolve(metas));
|
|
||||||
}
|
|
||||||
|
|
||||||
getResultMeta(resultId) {
|
|
||||||
const result = this.extensions[resultId];
|
|
||||||
|
|
||||||
const versionName = result.metadata['version-name'] ?? '';
|
|
||||||
let version = result.metadata['version'] ?? '';
|
|
||||||
version = versionName && version ? `/${version}` : version;
|
|
||||||
const versionStr = `${versionName}${version}`;
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': resultId,
|
|
||||||
'name': `${result.metadata.name}`,
|
|
||||||
'version': versionStr,
|
|
||||||
'description': versionStr, // description will be updated in result object
|
|
||||||
'createIcon': size => {
|
|
||||||
let icon = this.getIcon(result, size);
|
|
||||||
return icon;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
getIcon(extension, size) {
|
|
||||||
let opacity = 0;
|
|
||||||
let iconName = 'process-stop-symbolic';
|
|
||||||
|
|
||||||
switch (extension.state) {
|
|
||||||
case 1:
|
|
||||||
if (extension.hasUpdate)
|
|
||||||
iconName = 'software-update-available'; // 'software-update-available-symbolic';
|
|
||||||
else
|
|
||||||
iconName = 'object-select-symbolic';// 'object-select-symbolic';
|
|
||||||
|
|
||||||
opacity = 255;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
if (Main.extensionManager._enabledExtensions.includes(extension.uuid))
|
|
||||||
iconName = 'emblem-ok-symbolic';
|
|
||||||
else
|
|
||||||
iconName = 'dialog-error';
|
|
||||||
opacity = 100;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
iconName = 'software-update-urgent'; // 'software-update-urgent-symbolic';
|
|
||||||
opacity = 100;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (extension.hasUpdate) {
|
|
||||||
iconName = 'software-update-available'; // 'software-update-available-symbolic';
|
|
||||||
opacity = 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
const icon = new St.Icon({ icon_name: iconName, icon_size: size });
|
|
||||||
icon.set({
|
|
||||||
opacity,
|
|
||||||
});
|
|
||||||
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
createResultObject(meta) {
|
|
||||||
return new ListSearchResult(this, meta, this.extensions[meta.id]);
|
|
||||||
}
|
|
||||||
|
|
||||||
launchSearch(terms, timeStamp) {
|
|
||||||
this.appInfo.launch([], global.create_app_launch_context(timeStamp, -1), null);
|
|
||||||
}
|
|
||||||
|
|
||||||
activateResult(resultId/* terms, timeStamp*/) {
|
|
||||||
const extension = this.extensions[resultId];
|
|
||||||
if (Me.Util.isShiftPressed())
|
|
||||||
this._toggleExtension(extension);
|
|
||||||
else if (extension.hasPrefs)
|
|
||||||
Me.Util.openPreferences(extension.metadata);
|
|
||||||
}
|
|
||||||
|
|
||||||
filterResults(results /* , maxResults*/) {
|
|
||||||
// return results.slice(0, maxResults);
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
getSubsearchResultSet(previousResults, terms/* , callback*/) {
|
|
||||||
return this.getInitialResultSet(terms);
|
|
||||||
}
|
|
||||||
|
|
||||||
getSubsearchResultSet42(terms, callback) {
|
|
||||||
callback(this._getResultSet(terms));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const ListSearchResult = GObject.registerClass(
|
|
||||||
class ListSearchResult extends St.Button {
|
|
||||||
_init(provider, metaInfo, extension) {
|
|
||||||
this.provider = provider;
|
|
||||||
this.metaInfo = metaInfo;
|
|
||||||
this.extension = extension;
|
|
||||||
|
|
||||||
super._init({
|
|
||||||
reactive: true,
|
|
||||||
can_focus: true,
|
|
||||||
track_hover: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
this.style_class = 'list-search-result';
|
|
||||||
|
|
||||||
let content = new St.BoxLayout({
|
|
||||||
style_class: 'list-search-result-content',
|
|
||||||
vertical: false,
|
|
||||||
x_align: Clutter.ActorAlign.START,
|
|
||||||
x_expand: true,
|
|
||||||
y_expand: true,
|
|
||||||
});
|
|
||||||
this.set_child(content);
|
|
||||||
|
|
||||||
let titleBox = new St.BoxLayout({
|
|
||||||
style_class: 'list-search-result-title',
|
|
||||||
y_align: Clutter.ActorAlign.CENTER,
|
|
||||||
});
|
|
||||||
|
|
||||||
content.add_child(titleBox);
|
|
||||||
|
|
||||||
// An icon for, or thumbnail of, content
|
|
||||||
let icon = this.metaInfo['createIcon'](this.ICON_SIZE);
|
|
||||||
let iconBox = new St.Button();
|
|
||||||
iconBox.set_child(icon);
|
|
||||||
titleBox.add(iconBox);
|
|
||||||
iconBox.set_style('border: 1px solid rgba(200,200,200,0.2); padding: 2px; border-radius: 8px;');
|
|
||||||
this._iconBox = iconBox;
|
|
||||||
this.icon = icon;
|
|
||||||
|
|
||||||
iconBox.connect('clicked', () => {
|
|
||||||
this._toggleExtension();
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
});
|
|
||||||
|
|
||||||
let title = new St.Label({
|
|
||||||
text: this.metaInfo['name'],
|
|
||||||
y_align: Clutter.ActorAlign.CENTER,
|
|
||||||
opacity: extension.hasPrefs ? 255 : 150,
|
|
||||||
});
|
|
||||||
titleBox.add_child(title);
|
|
||||||
|
|
||||||
this.label_actor = title;
|
|
||||||
|
|
||||||
this._descriptionLabel = new St.Label({
|
|
||||||
style_class: 'list-search-result-description',
|
|
||||||
y_align: Clutter.ActorAlign.CENTER,
|
|
||||||
});
|
|
||||||
content.add_child(this._descriptionLabel);
|
|
||||||
|
|
||||||
this._highlightTerms();
|
|
||||||
|
|
||||||
this.connect('destroy', () => {
|
|
||||||
if (_toggleTimeout) {
|
|
||||||
GLib.source_remove(_toggleTimeout);
|
|
||||||
_toggleTimeout = 0;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
_toggleExtension() {
|
|
||||||
const state = this.extension.state;
|
|
||||||
if (![1, 2, 6, 3].includes(state) || this.extension.metadata.name.includes('vertical-workspaces'))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ([2, 6].includes(state))
|
|
||||||
Main.extensionManager.enableExtension(this.extension.uuid);
|
|
||||||
else if ([1, 3].includes(state))
|
|
||||||
Main.extensionManager.disableExtension(this.extension.uuid);
|
|
||||||
|
|
||||||
if (_toggleTimeout)
|
|
||||||
GLib.source_remove(_toggleTimeout);
|
|
||||||
|
|
||||||
_toggleTimeout = GLib.timeout_add(GLib.PRIORITY_LOW, 200,
|
|
||||||
() => {
|
|
||||||
if ([7, 8].includes(this.extension.state))
|
|
||||||
return GLib.SOURCE_CONTINUE;
|
|
||||||
|
|
||||||
this.icon?.destroy();
|
|
||||||
this.icon = this.metaInfo['createIcon'](this.ICON_SIZE);
|
|
||||||
this._iconBox.set_child(this.icon);
|
|
||||||
this._highlightTerms();
|
|
||||||
|
|
||||||
_toggleTimeout = 0;
|
|
||||||
return GLib.SOURCE_REMOVE;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
get ICON_SIZE() {
|
|
||||||
return 24;
|
|
||||||
}
|
|
||||||
|
|
||||||
_highlightTerms() {
|
|
||||||
const extension = this.extension;
|
|
||||||
const state = extension.state === 4 ? ExtensionState[this.extension.state] : '';
|
|
||||||
const error = extension.state === 3 ? ` ERROR: ${this.extension.error}` : '';
|
|
||||||
const update = extension.hasUpdate ? ' | UPDATE PENDING' : '';
|
|
||||||
const text = `${this.metaInfo.version} ${state}${error}${update}`;
|
|
||||||
let markup = text;// this.metaInfo['description'].split('\n')[0];
|
|
||||||
this._descriptionLabel.clutter_text.set_markup(markup);
|
|
||||||
}
|
|
||||||
|
|
||||||
vfunc_clicked() {
|
|
||||||
this.activate();
|
|
||||||
}
|
|
||||||
|
|
||||||
activate() {
|
|
||||||
this.provider.activateResult(this.metaInfo.id);
|
|
||||||
|
|
||||||
if (this.metaInfo.clipboardText) {
|
|
||||||
St.Clipboard.get_default().set_text(
|
|
||||||
St.ClipboardType.CLIPBOARD, this.metaInfo.clipboardText);
|
|
||||||
}
|
|
||||||
Main.overview.toggle();
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -3,7 +3,7 @@
|
||||||
* iconGrid.js
|
* iconGrid.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* layout.js
|
* layout.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -127,23 +127,30 @@ const LayoutManagerCommon = {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this.panelBox.height) {
|
if (this.panelBox.height) {
|
||||||
|
const backend = !!Meta.Barrier.prototype.backend;
|
||||||
|
let params = {};
|
||||||
|
if (backend)
|
||||||
|
params['backend'] = global.backend;
|
||||||
|
else
|
||||||
|
params['display'] = global.display;
|
||||||
|
|
||||||
let primary = this.primaryMonitor;
|
let primary = this.primaryMonitor;
|
||||||
if ([0, 1, 3].includes(opt.HOT_CORNER_POSITION)) {
|
if ([0, 1, 3].includes(opt.HOT_CORNER_POSITION)) {
|
||||||
this._rightPanelBarrier = new Meta.Barrier({
|
params = Object.assign({}, params, {
|
||||||
display: global.display,
|
|
||||||
x1: primary.x + primary.width, y1: this.panelBox.allocation.y1,
|
x1: primary.x + primary.width, y1: this.panelBox.allocation.y1,
|
||||||
x2: primary.x + primary.width, y2: this.panelBox.allocation.y2,
|
x2: primary.x + primary.width, y2: this.panelBox.allocation.y2,
|
||||||
directions: Meta.BarrierDirection.NEGATIVE_X,
|
directions: Meta.BarrierDirection.NEGATIVE_X,
|
||||||
});
|
});
|
||||||
|
this._rightPanelBarrier = new Meta.Barrier(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([2, 4].includes(opt.HOT_CORNER_POSITION)) {
|
if ([2, 4].includes(opt.HOT_CORNER_POSITION)) {
|
||||||
this._leftPanelBarrier = new Meta.Barrier({
|
params = Object.assign({}, params, {
|
||||||
display: global.display,
|
|
||||||
x1: primary.x, y1: this.panelBox.allocation.y1,
|
x1: primary.x, y1: this.panelBox.allocation.y1,
|
||||||
x2: primary.x, y2: this.panelBox.allocation.y2,
|
x2: primary.x, y2: this.panelBox.allocation.y2,
|
||||||
directions: Meta.BarrierDirection.POSITIVE_X,
|
directions: Meta.BarrierDirection.POSITIVE_X,
|
||||||
});
|
});
|
||||||
|
this._leftPanelBarrier = new Meta.Barrier(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -276,50 +283,65 @@ const HotCornerCommon = {
|
||||||
const extendV = opt && opt.HOT_CORNER_ACTION && opt.HOT_CORNER_EDGE && opt.DASH_VERTICAL && monitor.index === primaryMonitor;
|
const extendV = opt && opt.HOT_CORNER_ACTION && opt.HOT_CORNER_EDGE && opt.DASH_VERTICAL && monitor.index === primaryMonitor;
|
||||||
const extendH = opt && opt.HOT_CORNER_ACTION && opt.HOT_CORNER_EDGE && !opt.DASH_VERTICAL && monitor.index === primaryMonitor;
|
const extendH = opt && opt.HOT_CORNER_ACTION && opt.HOT_CORNER_EDGE && !opt.DASH_VERTICAL && monitor.index === primaryMonitor;
|
||||||
|
|
||||||
|
const backend = !!Meta.Barrier.prototype.backend;
|
||||||
|
let params = {};
|
||||||
|
if (backend)
|
||||||
|
params['backend'] = global.backend;
|
||||||
|
else
|
||||||
|
params['display'] = global.display;
|
||||||
|
|
||||||
if (opt.HOT_CORNER_POSITION <= 1) {
|
if (opt.HOT_CORNER_POSITION <= 1) {
|
||||||
this._verticalBarrier = new Meta.Barrier({
|
params = Object.assign({}, params, {
|
||||||
display: global.display,
|
x1: this._x, x2: this._x,
|
||||||
x1: this._x, x2: this._x, y1: this._y, y2: this._y + (extendV ? monitor.height : size),
|
y1: this._y, y2: this._y + (extendV ? monitor.height : size),
|
||||||
directions: Meta.BarrierDirection.POSITIVE_X,
|
directions: Meta.BarrierDirection.POSITIVE_X,
|
||||||
});
|
});
|
||||||
this._horizontalBarrier = new Meta.Barrier({
|
this._verticalBarrier = new Meta.Barrier(params);
|
||||||
display: global.display,
|
params = Object.assign({}, params, {
|
||||||
x1: this._x, x2: this._x + (extendH ? monitor.width : size), y1: this._y, y2: this._y,
|
x1: this._x, x2: this._x + (extendH ? monitor.width : size),
|
||||||
|
y1: this._y, y2: this._y,
|
||||||
directions: Meta.BarrierDirection.POSITIVE_Y,
|
directions: Meta.BarrierDirection.POSITIVE_Y,
|
||||||
});
|
});
|
||||||
|
this._horizontalBarrier = new Meta.Barrier(params);
|
||||||
} else if (opt.HOT_CORNER_POSITION === 2) {
|
} else if (opt.HOT_CORNER_POSITION === 2) {
|
||||||
this._verticalBarrier = new Meta.Barrier({
|
params = Object.assign({}, params, {
|
||||||
display: global.display,
|
x1: this._x, x2: this._x,
|
||||||
x1: this._x, x2: this._x, y1: this._y, y2: this._y + (extendV ? monitor.height : size),
|
y1: this._y, y2: this._y + (extendV ? monitor.height : size),
|
||||||
directions: Meta.BarrierDirection.NEGATIVE_X,
|
directions: Meta.BarrierDirection.NEGATIVE_X,
|
||||||
});
|
});
|
||||||
this._horizontalBarrier = new Meta.Barrier({
|
this._verticalBarrier = new Meta.Barrier(params);
|
||||||
display: global.display,
|
params = Object.assign({}, params, {
|
||||||
x1: this._x - size, x2: this._x, y1: this._y, y2: this._y,
|
x1: this._x - size, x2: this._x,
|
||||||
|
y1: this._y, y2: this._y,
|
||||||
directions: Meta.BarrierDirection.POSITIVE_Y,
|
directions: Meta.BarrierDirection.POSITIVE_Y,
|
||||||
});
|
});
|
||||||
|
this._horizontalBarrier = new Meta.Barrier(params);
|
||||||
} else if (opt.HOT_CORNER_POSITION === 3) {
|
} else if (opt.HOT_CORNER_POSITION === 3) {
|
||||||
this._verticalBarrier = new Meta.Barrier({
|
params = Object.assign({}, params, {
|
||||||
display: global.display,
|
x1: this._x, x2: this._x,
|
||||||
x1: this._x, x2: this._x, y1: this._y, y2: this._y - size,
|
y1: this._y, y2: this._y - size,
|
||||||
directions: Meta.BarrierDirection.POSITIVE_X,
|
directions: Meta.BarrierDirection.POSITIVE_X,
|
||||||
});
|
});
|
||||||
this._horizontalBarrier = new Meta.Barrier({
|
this._verticalBarrier = new Meta.Barrier(params);
|
||||||
display: global.display,
|
params = Object.assign({}, params, {
|
||||||
x1: this._x, x2: this._x + (extendH ? monitor.width : size), y1: this._y, y2: this._y,
|
x1: this._x, x2: this._x + (extendH ? monitor.width : size),
|
||||||
|
y1: this._y, y2: this._y,
|
||||||
directions: Meta.BarrierDirection.NEGATIVE_Y,
|
directions: Meta.BarrierDirection.NEGATIVE_Y,
|
||||||
});
|
});
|
||||||
|
this._horizontalBarrier = new Meta.Barrier(params);
|
||||||
} else if (opt.HOT_CORNER_POSITION === 4) {
|
} else if (opt.HOT_CORNER_POSITION === 4) {
|
||||||
this._verticalBarrier = new Meta.Barrier({
|
params = Object.assign({}, params, {
|
||||||
display: global.display,
|
x1: this._x, x2: this._x,
|
||||||
x1: this._x, x2: this._x, y1: this._y, y2: this._y - size,
|
y1: this._y, y2: this._y - size,
|
||||||
directions: Meta.BarrierDirection.NEGATIVE_X,
|
directions: Meta.BarrierDirection.NEGATIVE_X,
|
||||||
});
|
});
|
||||||
this._horizontalBarrier = new Meta.Barrier({
|
this._verticalBarrier = new Meta.Barrier(params);
|
||||||
display: global.display,
|
params = Object.assign({}, params, {
|
||||||
x1: this._x, x2: this._x - size, y1: this._y, y2: this._y,
|
x1: this._x, x2: this._x - size,
|
||||||
|
y1: this._y, y2: this._y,
|
||||||
directions: Meta.BarrierDirection.NEGATIVE_Y,
|
directions: Meta.BarrierDirection.NEGATIVE_Y,
|
||||||
});
|
});
|
||||||
|
this._horizontalBarrier = new Meta.Barrier(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._pressureBarrier.addBarrier(this._verticalBarrier);
|
this._pressureBarrier.addBarrier(this._verticalBarrier);
|
||||||
|
@ -431,7 +453,7 @@ const HotCornerCommon = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_toggleWindowSearchProvider() {
|
_toggleWindowSearchProvider() {
|
||||||
if (!Main.overview._overview._controls._searchController._searchActive) {
|
if (!Main.overview.searchController._searchActive) {
|
||||||
opt.OVERVIEW_MODE = 2;
|
opt.OVERVIEW_MODE = 2;
|
||||||
opt.OVERVIEW_MODE2 = true;
|
opt.OVERVIEW_MODE2 = true;
|
||||||
opt.WORKSPACE_MODE = 0;
|
opt.WORKSPACE_MODE = 0;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* messageTray.js
|
* messageTray.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* optionsFactory.js
|
* optionsFactory.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ export const ItemFactory = class ItemFactory {
|
||||||
for (let i = 0; i < options.length; i++) {
|
for (let i = 0; i < options.length; i++) {
|
||||||
const text = options[i][0];
|
const text = options[i][0];
|
||||||
const id = options[i][1];
|
const id = options[i][1];
|
||||||
model.append(new DropDownItemVW({ text, id }));
|
model.append(new DropDownItem({ text, id }));
|
||||||
if (id === currentValue)
|
if (id === currentValue)
|
||||||
widget.set_selected(i);
|
widget.set_selected(i);
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ export const ItemFactory = class ItemFactory {
|
||||||
newDropDown() {
|
newDropDown() {
|
||||||
const dropDown = new Gtk.DropDown({
|
const dropDown = new Gtk.DropDown({
|
||||||
model: new Gio.ListStore({
|
model: new Gio.ListStore({
|
||||||
item_type: DropDownItemVW,
|
item_type: DropDownItem,
|
||||||
}),
|
}),
|
||||||
halign: Gtk.Align.END,
|
halign: Gtk.Align.END,
|
||||||
valign: Gtk.Align.CENTER,
|
valign: Gtk.Align.CENTER,
|
||||||
|
@ -457,8 +457,9 @@ export const AdwPrefs = class {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const DropDownItemVW = GObject.registerClass({
|
const DropDownItem = GObject.registerClass({
|
||||||
GTypeName: 'DropDownItemVW',
|
// Registered name should be unique
|
||||||
|
GTypeName: `DropDownItem${Math.floor(Math.random() * 1000)}`,
|
||||||
Properties: {
|
Properties: {
|
||||||
'text': GObject.ParamSpec.string(
|
'text': GObject.ParamSpec.string(
|
||||||
'text',
|
'text',
|
||||||
|
@ -476,7 +477,7 @@ const DropDownItemVW = GObject.registerClass({
|
||||||
-2147483648, 2147483647, 0
|
-2147483648, 2147483647, 0
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
}, class DropDownItemVW extends GObject.Object {
|
}, class DropDownItem extends GObject.Object {
|
||||||
get text() {
|
get text() {
|
||||||
return this._text;
|
return this._text;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* osdWindow.js
|
* osdWindow.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* overlayKey.js
|
* overlayKey.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -40,8 +40,10 @@ export const OverlayKeyModule = class {
|
||||||
update(reset) {
|
update(reset) {
|
||||||
this.moduleEnabled = opt.get('overlayKeyModule');
|
this.moduleEnabled = opt.get('overlayKeyModule');
|
||||||
const conflict = false;
|
const conflict = false;
|
||||||
|
// Avoid modifying the overlay key if its configuration is consistent with the GNOME default
|
||||||
|
const defaultConfig = opt.OVERVIEW_MODE === 0 && opt.OVERLAY_KEY_PRIMARY === 2 && opt.OVERLAY_KEY_SECONDARY === 1;
|
||||||
|
|
||||||
reset = reset || !this.moduleEnabled || conflict;
|
reset = reset || !this.moduleEnabled || conflict || defaultConfig;
|
||||||
|
|
||||||
if (reset && !this._firstActivation) {
|
if (reset && !this._firstActivation) {
|
||||||
this._disableModule();
|
this._disableModule();
|
||||||
|
@ -135,7 +137,7 @@ export const OverlayKeyModule = class {
|
||||||
opt.OVERVIEW_MODE2 = false;
|
opt.OVERVIEW_MODE2 = false;
|
||||||
opt.WORKSPACE_MODE = 1;
|
opt.WORKSPACE_MODE = 1;
|
||||||
break;
|
break;
|
||||||
case 3: // Default overview
|
case 3: // App grid
|
||||||
if (Main.overview._shown)
|
if (Main.overview._shown)
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
else
|
else
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* overview.js
|
* overview.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* overviewControls.js
|
* overviewControls.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -118,7 +118,7 @@ export const OverviewControlsModule = class {
|
||||||
}
|
}
|
||||||
|
|
||||||
_replaceOnSearchChanged(reset) {
|
_replaceOnSearchChanged(reset) {
|
||||||
const searchController = Main.overview._overview.controls._searchController;
|
const searchController = Main.overview.searchController;
|
||||||
if (reset) {
|
if (reset) {
|
||||||
if (_searchControllerSigId) {
|
if (_searchControllerSigId) {
|
||||||
searchController.disconnect(_searchControllerSigId);
|
searchController.disconnect(_searchControllerSigId);
|
||||||
|
@ -128,8 +128,8 @@ export const OverviewControlsModule = class {
|
||||||
searchController.unblock_signal_handler(_originalSearchControllerSigId);
|
searchController.unblock_signal_handler(_originalSearchControllerSigId);
|
||||||
_originalSearchControllerSigId = 0;
|
_originalSearchControllerSigId = 0;
|
||||||
}
|
}
|
||||||
Main.overview._overview._controls.layoutManager._searchController._searchResults.translation_x = 0;
|
Main.overview.searchController._searchResults.translation_x = 0;
|
||||||
Main.overview._overview._controls.layoutManager._searchController._searchResults.translation_y = 0;
|
Main.overview.searchController._searchResults.translation_y = 0;
|
||||||
Main.overview.searchEntry.visible = true;
|
Main.overview.searchEntry.visible = true;
|
||||||
Main.overview.searchEntry.opacity = 255;
|
Main.overview.searchEntry.opacity = 255;
|
||||||
} else {
|
} else {
|
||||||
|
@ -320,6 +320,9 @@ const ControlsManagerCommon = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_onSearchChanged() {
|
_onSearchChanged() {
|
||||||
|
// something is somewhere setting the opacity to 0 if V-Shell is rebased while in overview / search
|
||||||
|
this._searchController.opacity = 255;
|
||||||
|
|
||||||
const { finalState, currentState } = this._stateAdjustment.getStateTransitionParams();
|
const { finalState, currentState } = this._stateAdjustment.getStateTransitionParams();
|
||||||
|
|
||||||
const { searchActive } = this._searchController;
|
const { searchActive } = this._searchController;
|
||||||
|
@ -366,14 +369,12 @@ const ControlsManagerCommon = {
|
||||||
|
|
||||||
this._searchController._searchResults.translation_x = 0;
|
this._searchController._searchResults.translation_x = 0;
|
||||||
this._searchController._searchResults.translation_y = 0;
|
this._searchController._searchResults.translation_y = 0;
|
||||||
this._searchController.opacity = 255;
|
|
||||||
this._searchController.visible = true;
|
this._searchController.visible = true;
|
||||||
|
|
||||||
if (opt.SEARCH_VIEW_ANIMATION && ![4, 8].includes(opt.WS_TMB_POSITION)) {
|
if (opt.SEARCH_VIEW_ANIMATION && ![4, 8].includes(opt.WS_TMB_POSITION)) {
|
||||||
this._updateAppDisplayVisibility();
|
this._updateAppDisplayVisibility();
|
||||||
this.layoutManager._searchController._searchResults._statusBin.opacity = 1;
|
this._searchController._searchResults._statusBin.opacity = 1;
|
||||||
|
|
||||||
this._searchController.opacity = searchActive ? 255 : 0;
|
|
||||||
let translationX = 0;
|
let translationX = 0;
|
||||||
let translationY = 0;
|
let translationY = 0;
|
||||||
const geometry = global.display.get_monitor_geometry(global.display.get_primary_monitor());
|
const geometry = global.display.get_monitor_geometry(global.display.get_primary_monitor());
|
||||||
|
@ -407,6 +408,8 @@ const ControlsManagerCommon = {
|
||||||
}
|
}
|
||||||
|
|
||||||
this._searchController._searchResults.ease({
|
this._searchController._searchResults.ease({
|
||||||
|
delay: 150, // wait for results
|
||||||
|
opacity: searchActive ? 255 : 0,
|
||||||
translation_x: searchActive ? 0 : translationX,
|
translation_x: searchActive ? 0 : translationX,
|
||||||
translation_y: searchActive ? 0 : translationY,
|
translation_y: searchActive ? 0 : translationY,
|
||||||
duration: SIDE_CONTROLS_ANIMATION_TIME,
|
duration: SIDE_CONTROLS_ANIMATION_TIME,
|
||||||
|
@ -414,7 +417,7 @@ const ControlsManagerCommon = {
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
this._searchController.visible = searchActive;
|
this._searchController.visible = searchActive;
|
||||||
this._searchTransition = false;
|
this._searchTransition = false;
|
||||||
this.layoutManager._searchController._searchResults._statusBin.opacity = 255;
|
this._searchController._searchResults._statusBin.opacity = 255;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -431,10 +434,9 @@ const ControlsManagerCommon = {
|
||||||
|
|
||||||
this._workspacesDisplay.setPrimaryWorkspaceVisible(true);
|
this._workspacesDisplay.setPrimaryWorkspaceVisible(true);
|
||||||
|
|
||||||
this._searchController.opacity = searchActive ? 0 : 255;
|
this._searchController._searchResults.ease({
|
||||||
this._searchController.ease({
|
|
||||||
opacity: searchActive ? 255 : 0,
|
opacity: searchActive ? 255 : 0,
|
||||||
duration: searchActive ? SIDE_CONTROLS_ANIMATION_TIME : 0,
|
duration: searchActive ? SIDE_CONTROLS_ANIMATION_TIME / 2 : 0,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
onComplete: () => (this._searchController.visible = searchActive),
|
onComplete: () => (this._searchController.visible = searchActive),
|
||||||
});
|
});
|
||||||
|
@ -442,10 +444,10 @@ const ControlsManagerCommon = {
|
||||||
|
|
||||||
// reuse already tuned overview transition, just replace APP_GRID with the search view
|
// reuse already tuned overview transition, just replace APP_GRID with the search view
|
||||||
if (!(opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE) && !Main.overview._animationInProgress && finalState !== ControlsState.HIDDEN && !this.dash.showAppsButton.checked) {
|
if (!(opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE) && !Main.overview._animationInProgress && finalState !== ControlsState.HIDDEN && !this.dash.showAppsButton.checked) {
|
||||||
Main.overview._overview._controls.layoutManager._searchController._searchResults._content.remove_style_class_name('search-section-content-bg-om2');
|
this._searchController._searchResults._content.remove_style_class_name('search-section-content-bg-om2');
|
||||||
Main.overview._overview._controls.layoutManager._searchController._searchResults._content.add_style_class_name('search-section-content-bg');
|
this._searchController._searchResults._content.add_style_class_name('search-section-content-bg');
|
||||||
Main.overview.searchEntry.remove_style_class_name('search-entry-om2');
|
this._searchEntry.remove_style_class_name('search-entry-om2');
|
||||||
const duration = opt.SEARCH_VIEW_ANIMATION ? 150 : 0;
|
const duration = opt.SEARCH_VIEW_ANIMATION ? 140 : 0;
|
||||||
this._stateAdjustment.ease(searchActive ? ControlsState.APP_GRID : ControlsState.WINDOW_PICKER, {
|
this._stateAdjustment.ease(searchActive ? ControlsState.APP_GRID : ControlsState.WINDOW_PICKER, {
|
||||||
// shorter animation time when entering search view can avoid stuttering in transition
|
// shorter animation time when entering search view can avoid stuttering in transition
|
||||||
// collecting search results take some time and the problematic part is the realization of the object on the screen
|
// collecting search results take some time and the problematic part is the realization of the object on the screen
|
||||||
|
@ -455,17 +457,20 @@ const ControlsManagerCommon = {
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
this._workspacesDisplay.setPrimaryWorkspaceVisible(!searchActive);
|
this._workspacesDisplay.setPrimaryWorkspaceVisible(!searchActive);
|
||||||
|
// Set the delay before processing a new search entry to 150 on deactivation, so search providers can't make make the workspace animation stuttering
|
||||||
|
// set it back to 0 after in-animation, so the search can be snappy
|
||||||
|
opt.SEARCH_DELAY = searchActive || !opt.SEARCH_VIEW_ANIMATION ? 0 : 150;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else if (opt.OVERVIEW_MODE2 && !(opt.WORKSPACE_MODE || this.dash.showAppsButton.checked)) {
|
} else if (opt.OVERVIEW_MODE2 && !(opt.WORKSPACE_MODE || this.dash.showAppsButton.checked)) {
|
||||||
// add background to search results and make searchEntry border thicker for better visibility
|
// add background to search results and make searchEntry border thicker for better visibility
|
||||||
Main.overview._overview._controls.layoutManager._searchController._searchResults._content.remove_style_class_name('search-section-content-bg');
|
this._searchController._searchResults._content.remove_style_class_name('search-section-content-bg');
|
||||||
Main.overview._overview._controls.layoutManager._searchController._searchResults._content.add_style_class_name('search-section-content-bg-om2');
|
this._searchController._searchResults._content.add_style_class_name('search-section-content-bg-om2');
|
||||||
Main.overview.searchEntry.add_style_class_name('search-entry-om2');
|
Main.overview.searchEntry.add_style_class_name('search-entry-om2');
|
||||||
} else {
|
} else {
|
||||||
Main.overview._overview._controls.layoutManager._searchController._searchResults._content.add_style_class_name('search-section-content-bg');
|
this._searchController._searchResults._content.add_style_class_name('search-section-content-bg');
|
||||||
Main.overview._overview._controls.layoutManager._searchController._searchResults._content.remove_style_class_name('search-section-content-bg-om2');
|
this._searchController._searchResults._content.remove_style_class_name('search-section-content-bg-om2');
|
||||||
Main.overview.searchEntry.remove_style_class_name('search-entry-om2');
|
this._searchEntry.remove_style_class_name('search-entry-om2');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -662,7 +667,7 @@ const ControlsManagerCommon = {
|
||||||
|
|
||||||
_getOverviewTranslations(dash, tmbBox, searchEntryBin) {
|
_getOverviewTranslations(dash, tmbBox, searchEntryBin) {
|
||||||
// const tmbBox = Main.overview._overview._controls._thumbnailsBox;
|
// const tmbBox = Main.overview._overview._controls._thumbnailsBox;
|
||||||
const animationsDisabled = !St.Settings.get().enable_animations || (opt.SHOW_WS_PREVIEW_BG && !opt.OVERVIEW_MODE2);
|
const animationsDisabled = !St.Settings.get().enable_animations || ((opt.SHOW_WS_PREVIEW_BG && !opt.OVERVIEW_MODE2) && !Main.layoutManager._startingUp);
|
||||||
if (animationsDisabled)
|
if (animationsDisabled)
|
||||||
return [0, 0, 0, 0, 0];
|
return [0, 0, 0, 0, 0];
|
||||||
|
|
||||||
|
@ -840,13 +845,16 @@ const ControlsManagerCommon = {
|
||||||
if (!blurEffect) {
|
if (!blurEffect) {
|
||||||
blurEffect = new Shell.BlurEffect({
|
blurEffect = new Shell.BlurEffect({
|
||||||
brightness: 1,
|
brightness: 1,
|
||||||
sigma: 0,
|
|
||||||
mode: Shell.BlurMode.ACTOR,
|
mode: Shell.BlurMode.ACTOR,
|
||||||
});
|
});
|
||||||
bgManager.backgroundActor.add_effect_with_name('blur', blurEffect);
|
bgManager.backgroundActor.add_effect_with_name('blur', blurEffect);
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchActive = Main.overview._overview.controls._searchController.searchActive;
|
// In GNOME 46 the "sigma" property has been renamed to "radius"
|
||||||
|
const radius = blurEffect.sigma !== undefined ? 'sigma' : 'radius';
|
||||||
|
blurEffect[radius] = 0;
|
||||||
|
|
||||||
|
const searchActive = this._searchController.searchActive;
|
||||||
if (searchActive)
|
if (searchActive)
|
||||||
BRIGHTNESS = opt.SEARCH_BG_BRIGHTNESS;
|
BRIGHTNESS = opt.SEARCH_BG_BRIGHTNESS;
|
||||||
|
|
||||||
|
@ -877,48 +885,61 @@ const ControlsManagerCommon = {
|
||||||
const step = opt.SMOOTH_BLUR_TRANSITIONS ? 0.05 : 0.2;
|
const step = opt.SMOOTH_BLUR_TRANSITIONS ? 0.05 : 0.2;
|
||||||
const progress = stateValue - (stateValue % step);
|
const progress = stateValue - (stateValue % step);
|
||||||
if (opt.SHOW_WS_PREVIEW_BG && stateValue < 1 && !searchActive) { // no need to animate transition, unless appGrid state is involved, static bg is covered by the ws preview bg
|
if (opt.SHOW_WS_PREVIEW_BG && stateValue < 1 && !searchActive) { // no need to animate transition, unless appGrid state is involved, static bg is covered by the ws preview bg
|
||||||
if (blurEffect.sigma !== opt.OVERVIEW_BG_BLUR_SIGMA)
|
if (blurEffect[radius] !== opt.OVERVIEW_BG_BLUR_SIGMA)
|
||||||
blurEffect.sigma = opt.OVERVIEW_BG_BLUR_SIGMA;
|
blurEffect[radius] = opt.OVERVIEW_BG_BLUR_SIGMA;
|
||||||
} else if (stateValue < 1 && !searchActive && !(opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)) {
|
} else if (stateValue < 1 && !searchActive && !(opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)) {
|
||||||
const sigma = Math.round(Util.lerp(0, opt.OVERVIEW_BG_BLUR_SIGMA, progress));
|
const sigma = Math.round(Util.lerp(0, opt.OVERVIEW_BG_BLUR_SIGMA, progress));
|
||||||
if (sigma !== blurEffect.sigma)
|
if (sigma !== blurEffect[radius])
|
||||||
blurEffect.sigma = sigma;
|
blurEffect[radius] = sigma;
|
||||||
} else if (stateValue < 1 && !searchActive && (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE && blurEffect.sigma)) {
|
} else if (stateValue < 1 && !searchActive && (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE && blurEffect[radius])) {
|
||||||
const sigma = Math.round(Util.lerp(0, opt.OVERVIEW_BG_BLUR_SIGMA, progress));
|
const sigma = Math.round(Util.lerp(0, opt.OVERVIEW_BG_BLUR_SIGMA, progress));
|
||||||
if (sigma !== blurEffect.sigma)
|
if (sigma !== blurEffect[radius])
|
||||||
blurEffect.sigma = sigma;
|
blurEffect[radius] = sigma;
|
||||||
} else if (stateValue > 1 && !searchActive && (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE && finalState === 1)) {
|
} else if (stateValue > 1 && !searchActive && (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE && finalState === 1)) {
|
||||||
const sigma = Math.round(Util.lerp(0, opt.OVERVIEW_BG_BLUR_SIGMA, progress % 1));
|
const sigma = Math.round(Util.lerp(0, opt.OVERVIEW_BG_BLUR_SIGMA, progress % 1));
|
||||||
if (sigma !== blurEffect.sigma)
|
if (sigma !== blurEffect[radius])
|
||||||
blurEffect.sigma = sigma;
|
blurEffect[radius] = sigma;
|
||||||
} else if ((stateValue > 1 && bgManager._primary) || searchActive) {
|
} else if ((stateValue > 1 && bgManager._primary) || searchActive) {
|
||||||
const sigma = Math.round(Util.lerp(opt.OVERVIEW_BG_BLUR_SIGMA, opt.APP_GRID_BG_BLUR_SIGMA, progress % 1));
|
const sigma = Math.round(Util.lerp(opt.OVERVIEW_BG_BLUR_SIGMA, opt.APP_GRID_BG_BLUR_SIGMA, progress % 1));
|
||||||
if (sigma !== blurEffect.sigma)
|
if (sigma !== blurEffect[radius])
|
||||||
blurEffect.sigma = sigma;
|
blurEffect[radius] = sigma;
|
||||||
} else if (stateValue === 1 && !(opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)) {
|
} else if (stateValue === 1 && !(opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)) {
|
||||||
blurEffect.sigma = opt.OVERVIEW_BG_BLUR_SIGMA;
|
blurEffect[radius] = opt.OVERVIEW_BG_BLUR_SIGMA;
|
||||||
} else if (stateValue === 0 || (stateValue === 1 && (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE))) {
|
} else if (stateValue === 0 || (stateValue === 1 && (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE))) {
|
||||||
blurEffect.sigma = 0;
|
blurEffect[radius] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_updatePositionFromDashToDock() {
|
||||||
|
// update variables that cannot be processed within settings
|
||||||
|
const dash = Main.overview.dash;
|
||||||
|
opt.DASH_POSITION = dash._position;
|
||||||
|
opt.DASH_TOP = opt.DASH_POSITION === 0;
|
||||||
|
opt.DASH_RIGHT = opt.DASH_POSITION === 1;
|
||||||
|
opt.DASH_BOTTOM = opt.DASH_POSITION === 2;
|
||||||
|
opt.DASH_LEFT = opt.DASH_POSITION === 3;
|
||||||
|
opt.DASH_VERTICAL = opt.DASH_LEFT || opt.DASH_RIGHT;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const ControlsManagerLayoutVertical = {
|
const ControlsManagerLayoutVertical = {
|
||||||
_computeWorkspacesBoxForState(state, box, workAreaBox, dashWidth, dashHeight, thumbnailsWidth, thumbnailsHeight, searchHeight, startY) {
|
_computeWorkspacesBoxForState(state, box, workAreaBox, dashWidth, dashHeight, thumbnailsWidth, thumbnailsHeight, searchHeight, startY) {
|
||||||
// in case the function is called from the DtD
|
// in case the function is called from the DtD
|
||||||
if (startY === undefined) {
|
if (startY === undefined)
|
||||||
workAreaBox = box;
|
workAreaBox = box;
|
||||||
}
|
|
||||||
const workspaceBox = box.copy();
|
const workspaceBox = box.copy();
|
||||||
let [width, height] = workspaceBox.get_size();
|
let [width, height] = workspaceBox.get_size();
|
||||||
const { spacing } = this;
|
const spacing = 12;
|
||||||
|
|
||||||
const dash = Main.overview.dash;
|
const dash = Main.overview.dash;
|
||||||
// including Dash to Dock and clones properties for compatibility
|
// including Dash to Dock and clones properties for compatibility
|
||||||
|
|
||||||
if (Me.Util.dashIsDashToDock()) {
|
if (Me.Util.dashIsDashToDock()) {
|
||||||
|
// ensure or position variables are updated
|
||||||
|
ControlsManagerCommon._updatePositionFromDashToDock();
|
||||||
// Dash to Dock also always affects workAreaBox
|
// Dash to Dock also always affects workAreaBox
|
||||||
Main.layoutManager._trackedActors.forEach(actor => {
|
Main.layoutManager._trackedActors.forEach(actor => {
|
||||||
if (actor.affectsStruts && actor.actor.width === dash.width) {
|
if (actor.affectsStruts && actor.actor.width === dash.width) {
|
||||||
|
@ -1028,15 +1049,15 @@ const ControlsManagerLayoutVertical = {
|
||||||
|
|
||||||
_getAppDisplayBoxForState(state, box, workAreaBox, searchHeight, dashWidth, dashHeight, thumbnailsWidth, startY) {
|
_getAppDisplayBoxForState(state, box, workAreaBox, searchHeight, dashWidth, dashHeight, thumbnailsWidth, startY) {
|
||||||
// in case the function is called from the DtD
|
// in case the function is called from the DtD
|
||||||
if (startY === undefined) {
|
if (startY === undefined)
|
||||||
workAreaBox = box;
|
workAreaBox = box;
|
||||||
}
|
|
||||||
const [width] = box.get_size();
|
const [width] = box.get_size();
|
||||||
const { x1: startX } = workAreaBox;
|
const { x1: startX } = workAreaBox;
|
||||||
// const { y1: startY } = workAreaBox;
|
// const { y1: startY } = workAreaBox;
|
||||||
let height = workAreaBox.get_height();
|
let height = workAreaBox.get_height();
|
||||||
const appDisplayBox = new Clutter.ActorBox();
|
const appDisplayBox = new Clutter.ActorBox();
|
||||||
const { spacing } = this;
|
const spacing = 12;
|
||||||
searchHeight = opt.SHOW_SEARCH_ENTRY ? searchHeight : 0;
|
searchHeight = opt.SHOW_SEARCH_ENTRY ? searchHeight : 0;
|
||||||
|
|
||||||
const xOffsetL = (opt.WS_TMB_LEFT ? thumbnailsWidth : 0) + (opt.DASH_LEFT ? dashWidth : 0);
|
const xOffsetL = (opt.WS_TMB_LEFT ? thumbnailsWidth : 0) + (opt.DASH_LEFT ? dashWidth : 0);
|
||||||
|
@ -1083,7 +1104,7 @@ const ControlsManagerLayoutVertical = {
|
||||||
vfunc_allocate(container, box) {
|
vfunc_allocate(container, box) {
|
||||||
const childBox = new Clutter.ActorBox();
|
const childBox = new Clutter.ActorBox();
|
||||||
const transitionParams = this._stateAdjustment.getStateTransitionParams();
|
const transitionParams = this._stateAdjustment.getStateTransitionParams();
|
||||||
const { spacing } = this;
|
const spacing = 12;
|
||||||
const halfSpacing = spacing / 2;
|
const halfSpacing = spacing / 2;
|
||||||
const monitor = Main.layoutManager.findMonitorForActor(this._container);
|
const monitor = Main.layoutManager.findMonitorForActor(this._container);
|
||||||
const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor.index);
|
const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor.index);
|
||||||
|
@ -1111,6 +1132,8 @@ const ControlsManagerLayoutVertical = {
|
||||||
// dash cloud be overridden by the Dash to Dock clone
|
// dash cloud be overridden by the Dash to Dock clone
|
||||||
const dash = Main.overview.dash;
|
const dash = Main.overview.dash;
|
||||||
if (Me.Util.dashIsDashToDock()) {
|
if (Me.Util.dashIsDashToDock()) {
|
||||||
|
// ensure our position variables are updated
|
||||||
|
ControlsManagerCommon._updatePositionFromDashToDock();
|
||||||
// if Dash to Dock replaced the default dash and its inteli-hide is disabled we need to compensate for affected startY
|
// if Dash to Dock replaced the default dash and its inteli-hide is disabled we need to compensate for affected startY
|
||||||
if (!Main.overview.dash.get_parent()?.get_parent()?.get_parent()?._intellihideIsEnabled) {
|
if (!Main.overview.dash.get_parent()?.get_parent()?.get_parent()?._intellihideIsEnabled) {
|
||||||
if (Main.panel.y === monitor.y)
|
if (Main.panel.y === monitor.y)
|
||||||
|
@ -1320,16 +1343,18 @@ const ControlsManagerLayoutVertical = {
|
||||||
const ControlsManagerLayoutHorizontal = {
|
const ControlsManagerLayoutHorizontal = {
|
||||||
_computeWorkspacesBoxForState(state, box, workAreaBox, dashWidth, dashHeight, thumbnailWidth, thumbnailsHeight, searchHeight, startY) {
|
_computeWorkspacesBoxForState(state, box, workAreaBox, dashWidth, dashHeight, thumbnailWidth, thumbnailsHeight, searchHeight, startY) {
|
||||||
// in case the function is called from the DtD
|
// in case the function is called from the DtD
|
||||||
if (startY === undefined) {
|
if (startY === undefined)
|
||||||
workAreaBox = box;
|
workAreaBox = box;
|
||||||
}
|
|
||||||
const workspaceBox = box.copy();
|
const workspaceBox = box.copy();
|
||||||
let [width, height] = workspaceBox.get_size();
|
let [width, height] = workspaceBox.get_size();
|
||||||
const { spacing } = this;
|
const spacing = 12;
|
||||||
|
|
||||||
const dash = Main.overview.dash;
|
const dash = Main.overview.dash;
|
||||||
// including Dash to Dock and clones properties for compatibility
|
// including Dash to Dock and clones properties for compatibility
|
||||||
if (Me.Util.dashIsDashToDock()) {
|
if (Me.Util.dashIsDashToDock()) {
|
||||||
|
// ensure our position variables are updated
|
||||||
|
ControlsManagerCommon._updatePositionFromDashToDock();
|
||||||
// Dash to Dock always affects workAreaBox
|
// Dash to Dock always affects workAreaBox
|
||||||
Main.layoutManager._trackedActors.forEach(actor => {
|
Main.layoutManager._trackedActors.forEach(actor => {
|
||||||
if (actor.affectsStruts && actor.actor.width === dash.width) {
|
if (actor.affectsStruts && actor.actor.width === dash.width) {
|
||||||
|
@ -1448,7 +1473,7 @@ const ControlsManagerLayoutHorizontal = {
|
||||||
// const { y1: startY } = workAreaBox;
|
// const { y1: startY } = workAreaBox;
|
||||||
let height = workAreaBox.get_height();
|
let height = workAreaBox.get_height();
|
||||||
const appDisplayBox = new Clutter.ActorBox();
|
const appDisplayBox = new Clutter.ActorBox();
|
||||||
const { spacing } = this;
|
const spacing = 12;
|
||||||
|
|
||||||
const yOffsetT = (opt.WS_TMB_TOP ? thumbnailsHeight + spacing : 0) + (opt.DASH_TOP ? dashHeight : 0) + (opt.SHOW_SEARCH_ENTRY ? searchHeight : 0);
|
const yOffsetT = (opt.WS_TMB_TOP ? thumbnailsHeight + spacing : 0) + (opt.DASH_TOP ? dashHeight : 0) + (opt.SHOW_SEARCH_ENTRY ? searchHeight : 0);
|
||||||
const yOffsetB = (opt.WS_TMB_BOTTOM ? thumbnailsHeight + spacing : 0) + (opt.DASH_BOTTOM ? dashHeight : 0);
|
const yOffsetB = (opt.WS_TMB_BOTTOM ? thumbnailsHeight + spacing : 0) + (opt.DASH_BOTTOM ? dashHeight : 0);
|
||||||
|
@ -1495,7 +1520,7 @@ const ControlsManagerLayoutHorizontal = {
|
||||||
vfunc_allocate(container, box) {
|
vfunc_allocate(container, box) {
|
||||||
const transitionParams = this._stateAdjustment.getStateTransitionParams();
|
const transitionParams = this._stateAdjustment.getStateTransitionParams();
|
||||||
const childBox = new Clutter.ActorBox();
|
const childBox = new Clutter.ActorBox();
|
||||||
const { spacing } = this;
|
const spacing = 12;
|
||||||
const halfSpacing = spacing / 2;
|
const halfSpacing = spacing / 2;
|
||||||
const monitor = Main.layoutManager.findMonitorForActor(this._container);
|
const monitor = Main.layoutManager.findMonitorForActor(this._container);
|
||||||
const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor.index);
|
const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor.index);
|
||||||
|
@ -1528,7 +1553,7 @@ const ControlsManagerLayoutHorizontal = {
|
||||||
// if (Main.panel.y === monitor.y)
|
// if (Main.panel.y === monitor.y)
|
||||||
// startY = Main.panel.height + spacing;
|
// startY = Main.panel.height + spacing;
|
||||||
}
|
}
|
||||||
dashHeight = dash.height;
|
dashHeight = dash.height + halfSpacing;
|
||||||
dashWidth = dash.width;
|
dashWidth = dash.width;
|
||||||
opt.DASH_TOP = dash._position === 0;
|
opt.DASH_TOP = dash._position === 0;
|
||||||
opt.DASH_VERTICAL = [1, 3].includes(dash._position);
|
opt.DASH_VERTICAL = [1, 3].includes(dash._position);
|
||||||
|
@ -1587,9 +1612,13 @@ const ControlsManagerLayoutHorizontal = {
|
||||||
else
|
else
|
||||||
wsTmbY = Math.round(startY + height - (opt.DASH_BOTTOM ? dashHeight : halfSpacing) - wsTmbHeight);
|
wsTmbY = Math.round(startY + height - (opt.DASH_BOTTOM ? dashHeight : halfSpacing) - wsTmbHeight);
|
||||||
|
|
||||||
let wstOffset = (width - wsTmbWidth - dashWidthReservation) / 2;
|
let wstOffset = (width - wsTmbWidth) / 2;
|
||||||
wstOffset -= opt.WS_TMB_POSITION_ADJUSTMENT * wstOffset;
|
wstOffset -= opt.WS_TMB_POSITION_ADJUSTMENT * wstOffset;
|
||||||
let wsTmbX = Math.round(startX + (opt.DASH_LEFT ? dashWidthReservation : 0) + wstOffset);
|
let wsTmbX = Math.round(startX + wstOffset);
|
||||||
|
if (opt.DASH_LEFT)
|
||||||
|
wsTmbX = Math.max(wsTmbX, startX + dashWidthReservation);
|
||||||
|
else if (opt.DASH_RIGHT)
|
||||||
|
wsTmbX = Math.min(wsTmbX, startX + width - wsTmbWidth - dashWidthReservation);
|
||||||
|
|
||||||
childBox.set_origin(wsTmbX, wsTmbY);
|
childBox.set_origin(wsTmbX, wsTmbY);
|
||||||
childBox.set_size(Math.max(wsTmbWidth, 1), Math.max(wsTmbHeight, 1));
|
childBox.set_size(Math.max(wsTmbWidth, 1), Math.max(wsTmbHeight, 1));
|
||||||
|
@ -1748,8 +1777,10 @@ function _getFitModeForState(state) {
|
||||||
|
|
||||||
const LayoutManager = {
|
const LayoutManager = {
|
||||||
_startupAnimation() {
|
_startupAnimation() {
|
||||||
if (Me.Util.dashIsDashToDock() && !Meta.is_restart()) {
|
const dtdEnabled = !!((Me.Util.getEnabledExtensions('dash-to-dock').length && !Me.Util.getEnabledExtensions('dash-to-dock-vshell').length) ||
|
||||||
// DtD breaks overview on startup
|
Me.Util.getEnabledExtensions('ubuntu-dock').length);
|
||||||
|
if (dtdEnabled && !Meta.is_restart()) {
|
||||||
|
// DtD without V-Shell patch breaks overview on startup
|
||||||
// Skip animation to hide the mess
|
// Skip animation to hide the mess
|
||||||
this._startupAnimationComplete();
|
this._startupAnimationComplete();
|
||||||
Main.overview._overview.controls._finishStartupSequence();
|
Main.overview._overview.controls._finishStartupSequence();
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* panel.js
|
* panel.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* recentFilesSearchProvider.js
|
* recentFilesSearchProvider.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
||||||
import GLib from 'gi://GLib';
|
import GLib from 'gi://GLib';
|
||||||
import St from 'gi://St';
|
import St from 'gi://St';
|
||||||
import Gio from 'gi://Gio';
|
import Gio from 'gi://Gio';
|
||||||
import Shell from 'gi://Shell';
|
|
||||||
|
|
||||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||||
|
|
||||||
|
@ -25,6 +24,7 @@ let _;
|
||||||
// so it needs to be something less common
|
// so it needs to be something less common
|
||||||
// needs to be accessible from vw module
|
// needs to be accessible from vw module
|
||||||
export const PREFIX = 'fq//';
|
export const PREFIX = 'fq//';
|
||||||
|
const ID = 'recent-files';
|
||||||
|
|
||||||
export const RecentFilesSearchProviderModule = class {
|
export const RecentFilesSearchProviderModule = class {
|
||||||
// export for other modules
|
// export for other modules
|
||||||
|
@ -68,8 +68,8 @@ export const RecentFilesSearchProviderModule = class {
|
||||||
2000,
|
2000,
|
||||||
() => {
|
() => {
|
||||||
if (!this._recentFilesSearchProvider) {
|
if (!this._recentFilesSearchProvider) {
|
||||||
this._recentFilesSearchProvider = new RecentFilesSearchProvider(opt);
|
this._recentFilesSearchProvider = new RecentFilesSearchProvider();
|
||||||
this._getOverviewSearchResult()._registerProvider(this._recentFilesSearchProvider);
|
this._registerProvider(this._recentFilesSearchProvider);
|
||||||
}
|
}
|
||||||
this._enableTimeoutId = 0;
|
this._enableTimeoutId = 0;
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
|
@ -81,7 +81,7 @@ export const RecentFilesSearchProviderModule = class {
|
||||||
|
|
||||||
_disableModule() {
|
_disableModule() {
|
||||||
if (this._recentFilesSearchProvider) {
|
if (this._recentFilesSearchProvider) {
|
||||||
this._getOverviewSearchResult()._unregisterProvider(this._recentFilesSearchProvider);
|
this._unregisterProvider(this._recentFilesSearchProvider);
|
||||||
this._recentFilesSearchProvider = null;
|
this._recentFilesSearchProvider = null;
|
||||||
}
|
}
|
||||||
if (this._enableTimeoutId) {
|
if (this._enableTimeoutId) {
|
||||||
|
@ -92,32 +92,44 @@ export const RecentFilesSearchProviderModule = class {
|
||||||
console.debug(' RecentFilesSearchProviderModule - Disabled');
|
console.debug(' RecentFilesSearchProviderModule - Disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
_getOverviewSearchResult() {
|
_registerProvider(provider) {
|
||||||
return Main.overview._overview.controls._searchController._searchResults;
|
const searchResults = Main.overview.searchController._searchResults;
|
||||||
|
provider.searchInProgress = false;
|
||||||
|
|
||||||
|
searchResults._providers.push(provider);
|
||||||
|
|
||||||
|
// create results display and add it to the _content
|
||||||
|
searchResults._ensureProviderDisplay.bind(searchResults)(provider);
|
||||||
|
}
|
||||||
|
|
||||||
|
_unregisterProvider(provider) {
|
||||||
|
const searchResults = Main.overview.searchController._searchResults;
|
||||||
|
searchResults._unregisterProvider(provider);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class RecentFilesSearchProvider {
|
class RecentFilesSearchProvider {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.id = 'recent-files';
|
this.id = ID;
|
||||||
const appSystem = Shell.AppSystem.get_default();
|
const appId = 'org.gnome.Nautilus.desktop';
|
||||||
let appInfo = appSystem.lookup_app('org.gnome.Nautilus.desktop')?.get_app_info();
|
|
||||||
if (!appInfo)
|
// A real appInfo created from a commandline has often issues with overriding get_id() method, so we use dict instead
|
||||||
appInfo = Gio.AppInfo.create_from_commandline('/usr/bin/nautilus -w', _('Recent Files'), null);
|
this.appInfo = {
|
||||||
appInfo.get_description = () => _('Search recent files');
|
get_id: () => appId,
|
||||||
appInfo.get_name = () => _('Recent Files');
|
get_name: () => _('Recent Files'),
|
||||||
appInfo.get_id = () => 'org.gnome.Nautilus.desktop';
|
get_icon: () => Gio.icon_new_for_string('focus-windows-symbolic'),
|
||||||
appInfo.get_icon = () => Gio.icon_new_for_string('document-open-recent-symbolic');
|
should_show: () => true,
|
||||||
appInfo.should_show = () => true;
|
get_commandline: () => '/usr/bin/nautilus -w recent:///',
|
||||||
|
launch: () => {},
|
||||||
|
};
|
||||||
|
|
||||||
this.appInfo = appInfo;
|
|
||||||
this.canLaunchSearch = true;
|
this.canLaunchSearch = true;
|
||||||
this.isRemoteProvider = false;
|
this.isRemoteProvider = false;
|
||||||
|
|
||||||
this._recentFilesManager = new RecentFilesManager();
|
this._recentFilesManager = new RecentFilesManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
getInitialResultSet(terms/* , callback*/) {
|
getInitialResultSet(terms/* , cancellable*/) {
|
||||||
const rfm = this._recentFilesManager;
|
const rfm = this._recentFilesManager;
|
||||||
rfm.loadFromFile();
|
rfm.loadFromFile();
|
||||||
|
|
||||||
|
@ -215,13 +227,9 @@ class RecentFilesSearchProvider {
|
||||||
return results.slice(0, 20);
|
return results.slice(0, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
getSubsearchResultSet(previousResults, terms/* , callback*/) {
|
getSubsearchResultSet(previousResults, terms/* , cancellable*/) {
|
||||||
return this.getInitialResultSet(terms);
|
return this.getInitialResultSet(terms);
|
||||||
}
|
}
|
||||||
|
|
||||||
getSubsearchResultSet42(terms, callback) {
|
|
||||||
callback(this._getResultSet(terms));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class RecentFilesManager {
|
class RecentFilesManager {
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
* search.js
|
* search.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
import GLib from 'gi://GLib';
|
||||||
import Clutter from 'gi://Clutter';
|
import Clutter from 'gi://Clutter';
|
||||||
import St from 'gi://St';
|
import St from 'gi://St';
|
||||||
import Shell from 'gi://Shell';
|
import Shell from 'gi://Shell';
|
||||||
|
@ -20,6 +21,7 @@ import * as Search from 'resource:///org/gnome/shell/ui/search.js';
|
||||||
import * as AppDisplay from 'resource:///org/gnome/shell/ui/appDisplay.js';
|
import * as AppDisplay from 'resource:///org/gnome/shell/ui/appDisplay.js';
|
||||||
|
|
||||||
import * as SystemActions from 'resource:///org/gnome/shell/misc/systemActions.js';
|
import * as SystemActions from 'resource:///org/gnome/shell/misc/systemActions.js';
|
||||||
|
import { Highlighter } from 'resource:///org/gnome/shell/misc/util.js';
|
||||||
|
|
||||||
let Me;
|
let Me;
|
||||||
// gettext
|
// gettext
|
||||||
|
@ -72,31 +74,42 @@ export const SearchModule = class {
|
||||||
this._overrides.addOverride('SearchResult', Search.SearchResult.prototype, SearchResult);
|
this._overrides.addOverride('SearchResult', Search.SearchResult.prototype, SearchResult);
|
||||||
this._overrides.addOverride('SearchResultsView', Search.SearchResultsView.prototype, SearchResultsView);
|
this._overrides.addOverride('SearchResultsView', Search.SearchResultsView.prototype, SearchResultsView);
|
||||||
this._overrides.addOverride('ListSearchResults', Search.ListSearchResults.prototype, ListSearchResults);
|
this._overrides.addOverride('ListSearchResults', Search.ListSearchResults.prototype, ListSearchResults);
|
||||||
// this._overrides.addOverride('ProviderInfo', Search.ProviderInfo.prototype, ProviderInfo);
|
this._overrides.addOverride('ListSearchResult', Search.ListSearchResult.prototype, ListSearchResultOverride);
|
||||||
|
this._overrides.addOverride('Highlighter', Highlighter.prototype, HighlighterOverride);
|
||||||
|
|
||||||
// Don't expand the search view vertically and align it to the top
|
// Don't expand the search view vertically and align it to the top
|
||||||
// this is important in the static workspace mode when the search view bg is not transparent
|
// this is important in the static workspace mode when the search view bg is not transparent
|
||||||
// also the "Searching..." and "No Results" notifications will be closer to the search entry, with the distance given by margin-top in the stylesheet
|
// also the "Searching..." and "No Results" notifications will be closer to the search entry, with the distance given by margin-top in the stylesheet
|
||||||
Main.overview._overview._controls.layoutManager._searchController.y_align = Clutter.ActorAlign.START;
|
Main.overview.searchController.y_align = Clutter.ActorAlign.START;
|
||||||
|
// Increase the maxResults for app search so that it can show more results in case the user decreases the size of the result icon
|
||||||
|
const appSearchDisplay = Main.overview.searchController._searchResults._providers.filter(p => p.id === 'applications')[0]?.display;
|
||||||
|
if (appSearchDisplay)
|
||||||
|
appSearchDisplay._maxResults = 12;
|
||||||
console.debug(' SearchModule - Activated');
|
console.debug(' SearchModule - Activated');
|
||||||
}
|
}
|
||||||
|
|
||||||
_disableModule() {
|
_disableModule() {
|
||||||
const reset = true;
|
const reset = true;
|
||||||
|
|
||||||
|
const searchResults = Main.overview.searchController._searchResults;
|
||||||
|
if (searchResults?._searchTimeoutId) {
|
||||||
|
GLib.source_remove(searchResults._searchTimeoutId);
|
||||||
|
searchResults._searchTimeoutId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
this._updateSearchViewWidth(reset);
|
this._updateSearchViewWidth(reset);
|
||||||
|
|
||||||
if (this._overrides)
|
if (this._overrides)
|
||||||
this._overrides.removeAll();
|
this._overrides.removeAll();
|
||||||
this._overrides = null;
|
this._overrides = null;
|
||||||
|
|
||||||
Main.overview._overview._controls.layoutManager._searchController.y_align = Clutter.ActorAlign.FILL;
|
Main.overview.searchController.y_align = Clutter.ActorAlign.FILL;
|
||||||
|
|
||||||
|
|
||||||
console.debug(' WorkspaceSwitcherPopupModule - Disabled');
|
console.debug(' WorkspaceSwitcherPopupModule - Disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateSearchViewWidth(reset = false) {
|
_updateSearchViewWidth(reset = false) {
|
||||||
const searchContent = Main.overview._overview._controls.layoutManager._searchController._searchResults._content;
|
const searchContent = Main.overview.searchController._searchResults._content;
|
||||||
if (!SEARCH_MAX_WIDTH) { // just store original value;
|
if (!SEARCH_MAX_WIDTH) { // just store original value;
|
||||||
const themeNode = searchContent.get_theme_node();
|
const themeNode = searchContent.get_theme_node();
|
||||||
const width = themeNode.get_max_width();
|
const width = themeNode.get_max_width();
|
||||||
|
@ -160,8 +173,8 @@ const AppSearchProvider = {
|
||||||
let dispName = appInfo.get_display_name() || '';
|
let dispName = appInfo.get_display_name() || '';
|
||||||
let gName = appInfo.get_generic_name() || '';
|
let gName = appInfo.get_generic_name() || '';
|
||||||
let description = appInfo.get_description() || '';
|
let description = appInfo.get_description() || '';
|
||||||
let categories = appInfo.get_string('Categories') || '';
|
let categories = appInfo.get_string('Categories')?.replace(/;/g, ' ') || '';
|
||||||
let keywords = appInfo.get_string('Keywords') || '';
|
let keywords = appInfo.get_string('Keywords')?.replace(/;/g, ' ') || '';
|
||||||
name = `${dispName} ${id}`;
|
name = `${dispName} ${id}`;
|
||||||
string = `${dispName} ${gName} ${baseName} ${description} ${categories} ${keywords} ${id}`;
|
string = `${dispName} ${gName} ${baseName} ${description} ${categories} ${keywords} ${id}`;
|
||||||
}
|
}
|
||||||
|
@ -242,22 +255,63 @@ const SearchResult = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const SearchResultsView = {
|
const SearchResultsView = {
|
||||||
|
setTerms(terms) {
|
||||||
|
// Check for the case of making a duplicate previous search before
|
||||||
|
// setting state of the current search or cancelling the search.
|
||||||
|
// This will prevent incorrect state being as a result of a duplicate
|
||||||
|
// search while the previous search is still active.
|
||||||
|
let searchString = terms.join(' ');
|
||||||
|
let previousSearchString = this._terms.join(' ');
|
||||||
|
if (searchString === previousSearchString)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._startingSearch = true;
|
||||||
|
|
||||||
|
this._cancellable.cancel();
|
||||||
|
this._cancellable.reset();
|
||||||
|
|
||||||
|
if (terms.length === 0) {
|
||||||
|
this._reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let isSubSearch = false;
|
||||||
|
if (this._terms.length > 0)
|
||||||
|
isSubSearch = searchString.indexOf(previousSearchString) === 0;
|
||||||
|
|
||||||
|
this._terms = terms;
|
||||||
|
this._isSubSearch = isSubSearch;
|
||||||
|
this._updateSearchProgress();
|
||||||
|
|
||||||
|
if (!this._searchTimeoutId)
|
||||||
|
this._searchTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, opt.SEARCH_DELAY, this._onSearchTimeout.bind(this));
|
||||||
|
|
||||||
|
this._highlighter = new Highlighter(this._terms);
|
||||||
|
|
||||||
|
this.emit('terms-changed');
|
||||||
|
},
|
||||||
|
|
||||||
_doSearch() {
|
_doSearch() {
|
||||||
this._startingSearch = false;
|
this._startingSearch = false;
|
||||||
|
|
||||||
let previousResults = this._results;
|
let previousResults = this._results;
|
||||||
this._results = {};
|
this._results = {};
|
||||||
|
|
||||||
|
const term0 = this._terms[0];
|
||||||
|
const onlySupportedProviders = term0.startsWith(Me.WSP_PREFIX) || term0.startsWith(Me.ESP_PREFIX) || term0.startsWith(Me.RFSP_PREFIX);
|
||||||
|
|
||||||
this._providers.forEach(provider => {
|
this._providers.forEach(provider => {
|
||||||
const onlyVShellProviders = this._terms.includes('wq//') || this._terms.includes('fq//');
|
const supportedProvider = ['open-windows', 'extensions', 'recent-files'].includes(provider.id);
|
||||||
if (!onlyVShellProviders || (onlyVShellProviders && (provider.id.includes('open-windows') || provider.id.includes('recent-files')))) {
|
if (!onlySupportedProviders || (onlySupportedProviders && supportedProvider)) {
|
||||||
let previousProviderResults = previousResults[provider.id];
|
let previousProviderResults = previousResults[provider.id];
|
||||||
this._doProviderSearch(provider, previousProviderResults);
|
this._doProviderSearch(provider, previousProviderResults);
|
||||||
|
} else {
|
||||||
|
// hide unwanted providers, they will show() automatically when needed
|
||||||
|
provider.display.visible = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this._updateSearchProgress();
|
this._updateSearchProgress();
|
||||||
|
|
||||||
this._clearSearchTimeout();
|
this._clearSearchTimeout();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -279,13 +333,73 @@ const SearchResultsView = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// fixes app is null error if search provider id is not a desktop app id.
|
// Add highlighting of the "name" part of the result for all providers
|
||||||
// is not accessible in 45
|
const ListSearchResultOverride = {
|
||||||
/* const ProviderInfo = {
|
_highlightTerms() {
|
||||||
animateLaunch() {
|
let markup = this._resultsView.highlightTerms(this.metaInfo['name']);
|
||||||
let appSys = Shell.AppSystem.get_default();
|
this.label_actor.clutter_text.set_markup(markup);
|
||||||
let app = appSys.lookup_app(this.provider.appInfo.get_id());
|
markup = this._resultsView.highlightTerms(this.metaInfo['description'].split('\n')[0]);
|
||||||
if (app && app.state === Shell.AppState.STOPPED)
|
this._descriptionLabel.clutter_text.set_markup(markup);
|
||||||
IconGrid.zoomOutActor(this._content);
|
|
||||||
},
|
},
|
||||||
};*/
|
};
|
||||||
|
|
||||||
|
const HighlighterOverride = {
|
||||||
|
/**
|
||||||
|
* @param {?string[]} terms - list of terms to highlight
|
||||||
|
*/
|
||||||
|
/* constructor(terms) {
|
||||||
|
if (!terms)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const escapedTerms = terms
|
||||||
|
.map(term => Shell.util_regex_escape(term))
|
||||||
|
.filter(term => term.length > 0);
|
||||||
|
|
||||||
|
if (escapedTerms.length === 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._highlightRegex = new RegExp(
|
||||||
|
`(${escapedTerms.join('|')})`, 'gi');
|
||||||
|
},*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Highlight all occurences of the terms defined for this
|
||||||
|
* highlighter in the provided text using markup.
|
||||||
|
*
|
||||||
|
* @param {string} text - text to highlight the defined terms in
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
highlight(text, options) {
|
||||||
|
if (!this._highlightRegex)
|
||||||
|
return GLib.markup_escape_text(text, -1);
|
||||||
|
|
||||||
|
// force use local settings if the class is overridden by another extension (WSP, ESP)
|
||||||
|
const o = options || opt;
|
||||||
|
let escaped = [];
|
||||||
|
let lastMatchEnd = 0;
|
||||||
|
let match;
|
||||||
|
let style = ['', ''];
|
||||||
|
if (o.HIGHLIGHT_DEFAULT)
|
||||||
|
style = ['<b>', '</b>'];
|
||||||
|
// The default highlighting by the bold style causes text to be "randomly" ellipsized in cases where it's not necessary
|
||||||
|
// and also blurry
|
||||||
|
// Underscore doesn't affect label size and all looks better
|
||||||
|
else if (o.HIGHLIGHT_UNDERLINE)
|
||||||
|
style = ['<u>', '</u>'];
|
||||||
|
|
||||||
|
while ((match = this._highlightRegex.exec(text))) {
|
||||||
|
if (match.index > lastMatchEnd) {
|
||||||
|
let unmatched = GLib.markup_escape_text(
|
||||||
|
text.slice(lastMatchEnd, match.index), -1);
|
||||||
|
escaped.push(unmatched);
|
||||||
|
}
|
||||||
|
let matched = GLib.markup_escape_text(match[0], -1);
|
||||||
|
escaped.push(`${style[0]}${matched}${style[1]}`);
|
||||||
|
lastMatchEnd = match.index + match[0].length;
|
||||||
|
}
|
||||||
|
let unmatched = GLib.markup_escape_text(
|
||||||
|
text.slice(lastMatchEnd), -1);
|
||||||
|
escaped.push(unmatched);
|
||||||
|
return escaped.join('');
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* searchController.js
|
* searchController.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -51,15 +51,15 @@ export const SearchControllerModule = class {
|
||||||
|
|
||||||
_activateModule() {
|
_activateModule() {
|
||||||
if (!this._originalOnStageKeyPress)
|
if (!this._originalOnStageKeyPress)
|
||||||
this._originalOnStageKeyPress = Main.overview._overview.controls._searchController._onStageKeyPress;
|
this._originalOnStageKeyPress = Main.overview.searchController._onStageKeyPress;
|
||||||
|
|
||||||
Main.overview._overview.controls._searchController._onStageKeyPress = SearchControllerCommon._onStageKeyPress;
|
Main.overview.searchController._onStageKeyPress = SearchControllerCommon._onStageKeyPress;
|
||||||
console.debug(' SearchControllerModule - Activated');
|
console.debug(' SearchControllerModule - Activated');
|
||||||
}
|
}
|
||||||
|
|
||||||
_disableModule() {
|
_disableModule() {
|
||||||
if (this._originalOnStageKeyPress)
|
if (this._originalOnStageKeyPress)
|
||||||
Main.overview._overview.controls._searchController._onStageKeyPress = this._originalOnStageKeyPress;
|
Main.overview.searchController._onStageKeyPress = this._originalOnStageKeyPress;
|
||||||
this._originalOnStageKeyPress = null;
|
this._originalOnStageKeyPress = null;
|
||||||
|
|
||||||
console.debug(' SearchControlerModule - Disabled');
|
console.debug(' SearchControlerModule - Disabled');
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* settings.js
|
* settings.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -52,9 +52,6 @@ export const Options = class Options {
|
||||||
closeWsButtonMode: ['int', 'close-ws-button-mode'],
|
closeWsButtonMode: ['int', 'close-ws-button-mode'],
|
||||||
secWsTmbPositionAdjust: ['int', 'sec-wst-position-adjust'],
|
secWsTmbPositionAdjust: ['int', 'sec-wst-position-adjust'],
|
||||||
dashMaxIconSize: ['int', 'dash-max-icon-size'],
|
dashMaxIconSize: ['int', 'dash-max-icon-size'],
|
||||||
dashShowWindowsIcon: ['int', 'dash-show-windows-icon'],
|
|
||||||
dashShowRecentFilesIcon: ['int', 'dash-show-recent-files-icon'],
|
|
||||||
dashShowExtensionsIcon: ['int', 'dash-show-extensions-icon'],
|
|
||||||
centerDashToWs: ['boolean', 'center-dash-to-ws'],
|
centerDashToWs: ['boolean', 'center-dash-to-ws'],
|
||||||
showAppsIconPosition: ['int', 'show-app-icon-position'],
|
showAppsIconPosition: ['int', 'show-app-icon-position'],
|
||||||
wsThumbnailScale: ['int', 'ws-thumbnail-scale'],
|
wsThumbnailScale: ['int', 'ws-thumbnail-scale'],
|
||||||
|
@ -87,6 +84,7 @@ export const Options = class Options {
|
||||||
startupState: ['int', 'startup-state'],
|
startupState: ['int', 'startup-state'],
|
||||||
overviewMode: ['int', 'overview-mode'],
|
overviewMode: ['int', 'overview-mode'],
|
||||||
workspaceSwitcherAnimation: ['int', 'workspace-switcher-animation'],
|
workspaceSwitcherAnimation: ['int', 'workspace-switcher-animation'],
|
||||||
|
wsSwitcherMode: ['int', 'ws-switcher-mode'],
|
||||||
searchIconSize: ['int', 'search-icon-size'],
|
searchIconSize: ['int', 'search-icon-size'],
|
||||||
searchViewScale: ['int', 'search-width-scale'],
|
searchViewScale: ['int', 'search-width-scale'],
|
||||||
appGridIconSize: ['int', 'app-grid-icon-size'],
|
appGridIconSize: ['int', 'app-grid-icon-size'],
|
||||||
|
@ -136,8 +134,9 @@ export const Options = class Options {
|
||||||
overlayKeySecondary: ['int', 'overlay-key-secondary'],
|
overlayKeySecondary: ['int', 'overlay-key-secondary'],
|
||||||
overviewEscBehavior: ['int', 'overview-esc-behavior'],
|
overviewEscBehavior: ['int', 'overview-esc-behavior'],
|
||||||
newWindowFocusFix: ['boolean', 'new-window-focus-fix'],
|
newWindowFocusFix: ['boolean', 'new-window-focus-fix'],
|
||||||
|
newWindowMonitorFix: ['boolean', 'new-window-monitor-fix'],
|
||||||
appGridPerformance: ['boolean', 'app-grid-performance'],
|
appGridPerformance: ['boolean', 'app-grid-performance'],
|
||||||
windowThumbnailScale: ['int', 'window-thumbnail-scale'],
|
highlightingStyle: ['int', 'highlighting-style'],
|
||||||
|
|
||||||
workspaceSwitcherPopupModule: ['boolean', 'workspace-switcher-popup-module'],
|
workspaceSwitcherPopupModule: ['boolean', 'workspace-switcher-popup-module'],
|
||||||
workspaceAnimationModule: ['boolean', 'workspace-animation-module'],
|
workspaceAnimationModule: ['boolean', 'workspace-animation-module'],
|
||||||
|
@ -145,7 +144,6 @@ export const Options = class Options {
|
||||||
windowManagerModule: ['boolean', 'window-manager-module'],
|
windowManagerModule: ['boolean', 'window-manager-module'],
|
||||||
windowPreviewModule: ['boolean', 'window-preview-module'],
|
windowPreviewModule: ['boolean', 'window-preview-module'],
|
||||||
windowAttentionHandlerModule: ['boolean', 'win-attention-handler-module'],
|
windowAttentionHandlerModule: ['boolean', 'win-attention-handler-module'],
|
||||||
windowThumbnailModule: ['boolean', 'window-thumbnail-module'],
|
|
||||||
swipeTrackerModule: ['boolean', 'swipe-tracker-module'],
|
swipeTrackerModule: ['boolean', 'swipe-tracker-module'],
|
||||||
searchControllerModule: ['boolean', 'search-controller-module'],
|
searchControllerModule: ['boolean', 'search-controller-module'],
|
||||||
searchModule: ['boolean', 'search-module'],
|
searchModule: ['boolean', 'search-module'],
|
||||||
|
@ -157,9 +155,6 @@ export const Options = class Options {
|
||||||
dashModule: ['boolean', 'dash-module'],
|
dashModule: ['boolean', 'dash-module'],
|
||||||
appFavoritesModule: ['boolean', 'app-favorites-module'],
|
appFavoritesModule: ['boolean', 'app-favorites-module'],
|
||||||
appDisplayModule: ['boolean', 'app-display-module'],
|
appDisplayModule: ['boolean', 'app-display-module'],
|
||||||
windowSearchProviderModule: ['boolean', 'window-search-provider-module'],
|
|
||||||
recentFilesSearchProviderModule: ['boolean', 'recent-files-search-provider-module'],
|
|
||||||
extensionsSearchProviderModule: ['boolean', 'extensions-search-provider-module'],
|
|
||||||
|
|
||||||
profileName1: ['string', 'profile-name-1'],
|
profileName1: ['string', 'profile-name-1'],
|
||||||
profileName2: ['string', 'profile-name-2'],
|
profileName2: ['string', 'profile-name-2'],
|
||||||
|
@ -324,9 +319,6 @@ export const Options = class Options {
|
||||||
this.CENTER_DASH_WS = this.get('centerDashToWs');
|
this.CENTER_DASH_WS = this.get('centerDashToWs');
|
||||||
|
|
||||||
this.MAX_ICON_SIZE = this.get('dashMaxIconSize');
|
this.MAX_ICON_SIZE = this.get('dashMaxIconSize');
|
||||||
this.SHOW_WINDOWS_ICON = this.get('dashShowWindowsIcon');
|
|
||||||
this.SHOW_RECENT_FILES_ICON = this.get('dashShowRecentFilesIcon');
|
|
||||||
this.SHOW_EXTENSIONS_ICON = this.get('dashShowExtensionsIcon');
|
|
||||||
|
|
||||||
this.WS_TMB_POSITION = this.get('workspaceThumbnailsPosition');
|
this.WS_TMB_POSITION = this.get('workspaceThumbnailsPosition');
|
||||||
this.ORIENTATION = this.WS_TMB_POSITION > 4 ? 0 : 1;
|
this.ORIENTATION = this.WS_TMB_POSITION > 4 ? 0 : 1;
|
||||||
|
@ -395,8 +387,6 @@ export const Options = class Options {
|
||||||
if (this.SEARCH_VIEW_ANIMATION === 4)
|
if (this.SEARCH_VIEW_ANIMATION === 4)
|
||||||
this.SEARCH_VIEW_ANIMATION = 3;
|
this.SEARCH_VIEW_ANIMATION = 3;
|
||||||
|
|
||||||
this.WS_ANIMATION = this.get('workspaceAnimation');
|
|
||||||
|
|
||||||
this.WIN_PREVIEW_ICON_SIZE = [64, 48, 32, 22, 8][this.get('winPreviewIconSize')];
|
this.WIN_PREVIEW_ICON_SIZE = [64, 48, 32, 22, 8][this.get('winPreviewIconSize')];
|
||||||
this.WIN_TITLES_POSITION = this.get('winTitlePosition');
|
this.WIN_TITLES_POSITION = this.get('winTitlePosition');
|
||||||
this.ALWAYS_SHOW_WIN_TITLES = this.WIN_TITLES_POSITION === 1;
|
this.ALWAYS_SHOW_WIN_TITLES = this.WIN_TITLES_POSITION === 1;
|
||||||
|
@ -421,6 +411,7 @@ export const Options = class Options {
|
||||||
this.SEARCH_VIEW_SCALE = this.get('searchViewScale') / 100;
|
this.SEARCH_VIEW_SCALE = this.get('searchViewScale') / 100;
|
||||||
this.SEARCH_MAX_ROWS = this.get('searchMaxResultsRows');
|
this.SEARCH_MAX_ROWS = this.get('searchMaxResultsRows');
|
||||||
this.SEARCH_FUZZY = this.get('searchFuzzy');
|
this.SEARCH_FUZZY = this.get('searchFuzzy');
|
||||||
|
this.SEARCH_DELAY = 0;
|
||||||
|
|
||||||
this.APP_GRID_ALLOW_INCOMPLETE_PAGES = this.get('appGridIncompletePages');
|
this.APP_GRID_ALLOW_INCOMPLETE_PAGES = this.get('appGridIncompletePages');
|
||||||
this.APP_GRID_ICON_SIZE = this.get('appGridIconSize');
|
this.APP_GRID_ICON_SIZE = this.get('appGridIconSize');
|
||||||
|
@ -484,8 +475,10 @@ export const Options = class Options {
|
||||||
this.WS_SW_POPUP_V_POSITION = this.get('wsSwPopupVPosition') / 100;
|
this.WS_SW_POPUP_V_POSITION = this.get('wsSwPopupVPosition') / 100;
|
||||||
this.WS_SW_POPUP_MODE = this.get('wsSwPopupMode');
|
this.WS_SW_POPUP_MODE = this.get('wsSwPopupMode');
|
||||||
|
|
||||||
|
this.WS_ANIMATION = this.get('workspaceAnimation');
|
||||||
this.WS_WRAPAROUND = this.get('wsSwitcherWraparound');
|
this.WS_WRAPAROUND = this.get('wsSwitcherWraparound');
|
||||||
this.WS_IGNORE_LAST = this.get('wsSwitcherIgnoreLast');
|
this.WS_IGNORE_LAST = this.get('wsSwitcherIgnoreLast');
|
||||||
|
this.WS_SWITCHER_CURRENT_MONITOR = this.get('wsSwitcherMode') === 1;
|
||||||
|
|
||||||
this.SHOW_FAV_NOTIFICATION = this.get('favoritesNotify');
|
this.SHOW_FAV_NOTIFICATION = this.get('favoritesNotify');
|
||||||
this.NOTIFICATION_POSITION = this.get('notificationPosition');
|
this.NOTIFICATION_POSITION = this.get('notificationPosition');
|
||||||
|
@ -522,10 +515,15 @@ export const Options = class Options {
|
||||||
|
|
||||||
this.ESC_BEHAVIOR = this.get('overviewEscBehavior');
|
this.ESC_BEHAVIOR = this.get('overviewEscBehavior');
|
||||||
|
|
||||||
this.WINDOW_THUMBNAIL_ENABLED = this.get('windowThumbnailModule');
|
this.WINDOW_THUMBNAIL_ENABLED = !!Me.Util.getEnabledExtensions('window-thumbnails').length;
|
||||||
this.WINDOW_THUMBNAIL_SCALE = this.get('windowThumbnailScale') / 100;
|
|
||||||
|
|
||||||
this.FIX_NEW_WINDOW_FOCUS = this.get('newWindowFocusFix');
|
this.FIX_NEW_WINDOW_FOCUS = this.get('newWindowFocusFix');
|
||||||
|
this.FIX_NEW_WINDOW_MONITOR = this.get('newWindowMonitorFix');
|
||||||
|
|
||||||
|
this.HIGHLIGHTING_STYLE = this.get('highlightingStyle');
|
||||||
|
this.HIGHLIGHT_DEFAULT = this.HIGHLIGHTING_STYLE === 0;
|
||||||
|
this.HIGHLIGHT_UNDERLINE = this.HIGHLIGHTING_STYLE === 1;
|
||||||
|
this.HIGHLIGHT_NONE = this.HIGHLIGHTING_STYLE === 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
_getAnimationDirection() {
|
_getAnimationDirection() {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* swipeTracker.js
|
* swipeTracker.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* util.js
|
* util.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -285,9 +285,9 @@ export function isMoreRelevant(stringA, stringB, pattern) {
|
||||||
|
|
||||||
export function getEnabledExtensions(pattern = '') {
|
export function getEnabledExtensions(pattern = '') {
|
||||||
let result = [];
|
let result = [];
|
||||||
// extensionManager is unreliable at startup (if not all extensions were loaded)
|
// extensionManager is unreliable at startup because it is uncertain whether all extensions have been loaded
|
||||||
// but gsettings key can contain removed extensions...
|
// also gsettings key can contain already removed extensions (user deleted them without disabling them first)
|
||||||
// therefore we have to look into filesystem, what's really installed
|
// therefore we have to check what's really installed in the filesystem
|
||||||
if (!_installedExtensions) {
|
if (!_installedExtensions) {
|
||||||
const extensionFiles = [...collectFromDatadirs('extensions', true)];
|
const extensionFiles = [...collectFromDatadirs('extensions', true)];
|
||||||
_installedExtensions = extensionFiles.map(({ info }) => {
|
_installedExtensions = extensionFiles.map(({ info }) => {
|
||||||
|
@ -298,8 +298,19 @@ export function getEnabledExtensions(pattern = '') {
|
||||||
return uuid;
|
return uuid;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// _enabledExtensions contains content of the enabled-extensions key from gsettings, not actual state
|
||||||
const enabled = Main.extensionManager._enabledExtensions;
|
const enabled = Main.extensionManager._enabledExtensions;
|
||||||
result = _installedExtensions.filter(ext => enabled.includes(ext));
|
result = _installedExtensions.filter(ext => enabled.includes(ext));
|
||||||
|
// _extensions contains already loaded extensions, so we can try to filter out broken or incompatible extensions
|
||||||
|
const active = Main.extensionManager._extensions;
|
||||||
|
result = result.filter(ext => {
|
||||||
|
const extension = active.get(ext);
|
||||||
|
if (extension)
|
||||||
|
return ![3, 4].includes(extension.state); // 3 - ERROR, 4 - OUT_OF_TIME (not supported by shell-version in metadata)
|
||||||
|
// extension can be enabled but not yet loaded, we just cannot see its state at this moment, so let it pass as enabled
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
// return only extensions matching the search pattern
|
||||||
return result.filter(uuid => uuid !== null && uuid.includes(pattern));
|
return result.filter(uuid => uuid !== null && uuid.includes(pattern));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,525 +0,0 @@
|
||||||
/**
|
|
||||||
* V-Shell (Vertical Workspaces)
|
|
||||||
* WinTmb
|
|
||||||
*
|
|
||||||
* @author GdH <G-dH@github.com>
|
|
||||||
* @copyright 2021-2023
|
|
||||||
* @license GPL-3.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import GLib from 'gi://GLib';
|
|
||||||
import Clutter from 'gi://Clutter';
|
|
||||||
import St from 'gi://St';
|
|
||||||
import Meta from 'gi://Meta';
|
|
||||||
import GObject from 'gi://GObject';
|
|
||||||
|
|
||||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
|
||||||
import * as DND from 'resource:///org/gnome/shell/ui/dnd.js';
|
|
||||||
import * as AltTab from 'resource:///org/gnome/shell/ui/altTab.js';
|
|
||||||
|
|
||||||
let Me;
|
|
||||||
let opt;
|
|
||||||
|
|
||||||
const SCROLL_ICON_OPACITY = 240;
|
|
||||||
const DRAG_OPACITY = 200;
|
|
||||||
const CLOSE_BTN_OPACITY = 240;
|
|
||||||
|
|
||||||
|
|
||||||
export const WinTmbModule = class {
|
|
||||||
constructor(me) {
|
|
||||||
Me = me;
|
|
||||||
opt = Me.opt;
|
|
||||||
|
|
||||||
this._firstActivation = true;
|
|
||||||
this.moduleEnabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanGlobals() {
|
|
||||||
Me = null;
|
|
||||||
opt = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
update(reset) {
|
|
||||||
this._removeTimeouts();
|
|
||||||
|
|
||||||
this.moduleEnabled = opt.get('windowThumbnailModule');
|
|
||||||
|
|
||||||
reset = reset || !this.moduleEnabled;
|
|
||||||
|
|
||||||
// don't touch the original code if module disabled
|
|
||||||
if (reset && !this._firstActivation) {
|
|
||||||
this._disableModule();
|
|
||||||
} else if (!reset) {
|
|
||||||
this._firstActivation = false;
|
|
||||||
this._activateModule();
|
|
||||||
}
|
|
||||||
if (reset && this._firstActivation)
|
|
||||||
console.debug(' WinTmb - Keeping untouched');
|
|
||||||
}
|
|
||||||
|
|
||||||
_activateModule() {
|
|
||||||
this._timeouts = {};
|
|
||||||
if (!this._windowThumbnails)
|
|
||||||
this._windowThumbnails = [];
|
|
||||||
|
|
||||||
Main.overview.connectObject('hidden', () => this.showThumbnails(), this);
|
|
||||||
console.debug(' WinTmb - Activated');
|
|
||||||
}
|
|
||||||
|
|
||||||
_disableModule() {
|
|
||||||
Main.overview.disconnectObject(this);
|
|
||||||
this._disconnectStateAdjustment();
|
|
||||||
this.removeAllThumbnails();
|
|
||||||
console.debug(' WinTmb - Disabled');
|
|
||||||
}
|
|
||||||
|
|
||||||
_removeTimeouts() {
|
|
||||||
if (this._timeouts) {
|
|
||||||
Object.values(this._timeouts).forEach(t => {
|
|
||||||
if (t)
|
|
||||||
GLib.source_remove(t);
|
|
||||||
});
|
|
||||||
this._timeouts = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
createThumbnail(metaWin) {
|
|
||||||
const thumbnail = new WindowThumbnail(metaWin, {
|
|
||||||
'height': Math.floor(opt.WINDOW_THUMBNAIL_SCALE * global.display.get_monitor_geometry(global.display.get_current_monitor()).height),
|
|
||||||
'thumbnailsOnScreen': this._windowThumbnails.length,
|
|
||||||
});
|
|
||||||
|
|
||||||
this._windowThumbnails.push(thumbnail);
|
|
||||||
thumbnail.connect('removed', tmb => {
|
|
||||||
this._windowThumbnails.splice(this._windowThumbnails.indexOf(tmb), 1);
|
|
||||||
tmb.destroy();
|
|
||||||
if (!this._windowThumbnails.length)
|
|
||||||
this._disconnectStateAdjustment();
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!this._stateAdjustmentConId) {
|
|
||||||
this._stateAdjustmentConId = Main.overview._overview.controls._stateAdjustment.connectObject('notify::value', () => {
|
|
||||||
if (!this._thumbnailsHidden && (!opt.OVERVIEW_MODE2 || opt.WORKSPACE_MODE))
|
|
||||||
this.hideThumbnails();
|
|
||||||
}, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hideThumbnails() {
|
|
||||||
this._windowThumbnails.forEach(tmb => {
|
|
||||||
tmb.ease({
|
|
||||||
opacity: 0,
|
|
||||||
duration: 200,
|
|
||||||
mode: Clutter.AnimationMode.LINEAR,
|
|
||||||
onComplete: () => tmb.hide(),
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this._thumbnailsHidden = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
showThumbnails() {
|
|
||||||
this._windowThumbnails.forEach(tmb => {
|
|
||||||
tmb.show();
|
|
||||||
tmb.ease({
|
|
||||||
opacity: 255,
|
|
||||||
duration: 100,
|
|
||||||
mode: Clutter.AnimationMode.LINEAR,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this._thumbnailsHidden = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
removeAllThumbnails() {
|
|
||||||
this._windowThumbnails.forEach(tmb => tmb.remove());
|
|
||||||
this._windowThumbnails = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
_disconnectStateAdjustment() {
|
|
||||||
Main.overview._overview.controls._stateAdjustment.disconnectObject(this);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const WindowThumbnail = GObject.registerClass({
|
|
||||||
Signals: { 'removed': {} },
|
|
||||||
}, class WindowThumbnail extends St.Widget {
|
|
||||||
_init(metaWin, args) {
|
|
||||||
this._hoverShowsPreview = false;
|
|
||||||
this._customOpacity = 255;
|
|
||||||
this._initTmbHeight = args.height;
|
|
||||||
this._minimumHeight = Math.floor(5 / 100 * global.display.get_monitor_geometry(global.display.get_current_monitor()).height);
|
|
||||||
this._scrollTimeout = 100;
|
|
||||||
this._positionOffset = args.thumbnailsOnScreen;
|
|
||||||
this._reverseTmbWheelFunc = false;
|
|
||||||
this._click_count = 1;
|
|
||||||
this._prevBtnPressTime = 0;
|
|
||||||
this.w = metaWin;
|
|
||||||
super._init({
|
|
||||||
layout_manager: new Clutter.BinLayout(),
|
|
||||||
visible: true,
|
|
||||||
reactive: true,
|
|
||||||
can_focus: true,
|
|
||||||
track_hover: true,
|
|
||||||
});
|
|
||||||
this.connect('button-release-event', this._onBtnReleased.bind(this));
|
|
||||||
this.connect('scroll-event', this._onScrollEvent.bind(this));
|
|
||||||
// this.connect('motion-event', this._onMouseMove.bind(this)); // may be useful in the future..
|
|
||||||
|
|
||||||
this._delegate = this;
|
|
||||||
this._draggable = DND.makeDraggable(this, { dragActorOpacity: DRAG_OPACITY });
|
|
||||||
this._draggable.connect('drag-end', this._end_drag.bind(this));
|
|
||||||
this._draggable.connect('drag-cancelled', this._end_drag.bind(this));
|
|
||||||
this._draggable._animateDragEnd = eventTime => {
|
|
||||||
this._draggable._animationInProgress = true;
|
|
||||||
this._draggable._onAnimationComplete(this._draggable._dragActor, eventTime);
|
|
||||||
this.opacity = this._customOpacity;
|
|
||||||
};
|
|
||||||
|
|
||||||
this.clone = new Clutter.Clone({ reactive: true });
|
|
||||||
Main.layoutManager.addChrome(this);
|
|
||||||
|
|
||||||
this.window = this.w.get_compositor_private();
|
|
||||||
|
|
||||||
this.clone.set_source(this.window);
|
|
||||||
|
|
||||||
this.add_child(this.clone);
|
|
||||||
this._addCloseButton();
|
|
||||||
this._addScrollModeIcon();
|
|
||||||
|
|
||||||
this.connect('enter-event', () => {
|
|
||||||
global.display.set_cursor(Meta.Cursor.POINTING_HAND);
|
|
||||||
this._closeButton.opacity = CLOSE_BTN_OPACITY;
|
|
||||||
this._scrollModeBin.opacity = SCROLL_ICON_OPACITY;
|
|
||||||
if (this._hoverShowsPreview && !Main.overview._shown) {
|
|
||||||
this._closeButton.opacity = 50;
|
|
||||||
this._showWindowPreview(false, true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.connect('leave-event', () => {
|
|
||||||
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
|
||||||
this._closeButton.opacity = 0;
|
|
||||||
this._scrollModeBin.opacity = 0;
|
|
||||||
if (this._winPreview)
|
|
||||||
this._destroyWindowPreview();
|
|
||||||
});
|
|
||||||
|
|
||||||
this._setSize(true);
|
|
||||||
this.set_position(...this._getInitialPosition());
|
|
||||||
this.show();
|
|
||||||
this.window_id = this.w.get_id();
|
|
||||||
this.tmbRedrawDirection = true;
|
|
||||||
|
|
||||||
// remove thumbnail content and hide thumbnail if its window is destroyed
|
|
||||||
this.windowConnect = this.window.connect('destroy', () => {
|
|
||||||
if (this)
|
|
||||||
this.remove();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
_getInitialPosition() {
|
|
||||||
const offset = 20;
|
|
||||||
let monitor = Main.layoutManager.monitors[global.display.get_current_monitor()];
|
|
||||||
let x = Math.min(monitor.x + monitor.width - (this.window.width * this.scale) - offset);
|
|
||||||
let y = Math.min(monitor.y + monitor.height - (this.window.height * this.scale) - offset - ((this._positionOffset * this._initTmbHeight) % (monitor.height - this._initTmbHeight)));
|
|
||||||
return [x, y];
|
|
||||||
}
|
|
||||||
|
|
||||||
_setSize(resetScale = false) {
|
|
||||||
if (resetScale)
|
|
||||||
this.scale = Math.min(1.0, this._initTmbHeight / this.window.height);
|
|
||||||
|
|
||||||
const width = this.window.width * this.scale;
|
|
||||||
const height = this.window.height * this.scale;
|
|
||||||
this.set_size(width, height);
|
|
||||||
/* if (this.icon) {
|
|
||||||
this.icon.scale_x = this.scale;
|
|
||||||
this.icon.scale_y = this.scale;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// when the scale of this. actor change, this.clone resize accordingly,
|
|
||||||
// but the reactive area of the actor doesn't change until the actor is redrawn
|
|
||||||
// this updates the actor's input region area:
|
|
||||||
Main.layoutManager._queueUpdateRegions();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* _onMouseMove(actor, event) {
|
|
||||||
let [pos_x, pos_y] = event.get_coords();
|
|
||||||
let state = event.get_state();
|
|
||||||
if (this._ctrlPressed(state)) {
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
_onBtnReleased(actor, event) {
|
|
||||||
// Clutter.Event.click_count property in no longer available, since GS42
|
|
||||||
if ((event.get_time() - this._prevBtnPressTime) < Clutter.Settings.get_default().double_click_time)
|
|
||||||
this._click_count += 1;
|
|
||||||
else
|
|
||||||
this._click_count = 1;
|
|
||||||
|
|
||||||
this._prevBtnPressTime = event.get_time();
|
|
||||||
|
|
||||||
if (this._click_count === 2 && event.get_button() === Clutter.BUTTON_PRIMARY)
|
|
||||||
this.w.activate(global.get_current_time());
|
|
||||||
|
|
||||||
|
|
||||||
const button = event.get_button();
|
|
||||||
const state = event.get_state();
|
|
||||||
switch (button) {
|
|
||||||
case Clutter.BUTTON_PRIMARY:
|
|
||||||
if (this._ctrlPressed(state)) {
|
|
||||||
this._setSize();
|
|
||||||
} else {
|
|
||||||
this._reverseTmbWheelFunc = !this._reverseTmbWheelFunc;
|
|
||||||
this._scrollModeBin.set_child(this._reverseTmbWheelFunc ? this._scrollModeSourceIcon : this._scrollModeResizeIcon);
|
|
||||||
}
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
case Clutter.BUTTON_SECONDARY:
|
|
||||||
if (this._ctrlPressed(state)) {
|
|
||||||
this.remove();
|
|
||||||
} else {
|
|
||||||
this._hoverShowsPreview = !this._hoverShowsPreview;
|
|
||||||
this._showWindowPreview();
|
|
||||||
}
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
case Clutter.BUTTON_MIDDLE:
|
|
||||||
if (this._ctrlPressed(state))
|
|
||||||
this.w.delete(global.get_current_time());
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
default:
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_onScrollEvent(actor, event) {
|
|
||||||
let direction = Me.Util.getScrollDirection(event);
|
|
||||||
|
|
||||||
if (this._actionTimeoutActive())
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
let state = event.get_state();
|
|
||||||
switch (direction) {
|
|
||||||
case Clutter.ScrollDirection.UP:
|
|
||||||
if (this._shiftPressed(state)) {
|
|
||||||
this.opacity = Math.min(255, this.opacity + 24);
|
|
||||||
this._customOpacity = this.opacity;
|
|
||||||
} else if (this._reverseTmbWheelFunc !== this._ctrlPressed(state)) {
|
|
||||||
this._switchSourceWin(-1);
|
|
||||||
} else if (this._reverseTmbWheelFunc === this._ctrlPressed(state)) {
|
|
||||||
this.scale = Math.max(0.05, this.scale - 0.025);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case Clutter.ScrollDirection.DOWN:
|
|
||||||
if (this._shiftPressed(state)) {
|
|
||||||
this.opacity = Math.max(48, this.opacity - 24);
|
|
||||||
this._customOpacity = this.opacity;
|
|
||||||
} else if (this._reverseTmbWheelFunc !== this._ctrlPressed(state)) {
|
|
||||||
this._switchSourceWin(+1);
|
|
||||||
} else if (this._reverseTmbWheelFunc === this._ctrlPressed(state)) {
|
|
||||||
this.scale = Math.min(1, this.scale + 0.025);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
}
|
|
||||||
this._setSize();
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
}
|
|
||||||
|
|
||||||
remove() {
|
|
||||||
if (this.clone) {
|
|
||||||
this.window.disconnect(this.windowConnect);
|
|
||||||
this.clone.set_source(null);
|
|
||||||
}
|
|
||||||
if (this._winPreview)
|
|
||||||
this._destroyWindowPreview();
|
|
||||||
|
|
||||||
this.emit('removed');
|
|
||||||
}
|
|
||||||
|
|
||||||
_end_drag() {
|
|
||||||
this.set_position(this._draggable._dragOffsetX + this._draggable._dragX, this._draggable._dragOffsetY + this._draggable._dragY);
|
|
||||||
this._setSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
_ctrlPressed(state) {
|
|
||||||
return (state & Clutter.ModifierType.CONTROL_MASK) !== 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
_shiftPressed(state) {
|
|
||||||
return (state & Clutter.ModifierType.SHIFT_MASK) !== 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
_switchSourceWin(direction) {
|
|
||||||
let windows = global.display.get_tab_list(Meta.TabList.NORMAL_ALL, null);
|
|
||||||
windows = windows.filter(w => !(w.skip_taskbar || w.minimized));
|
|
||||||
let idx = -1;
|
|
||||||
for (let i = 0; i < windows.length; i++) {
|
|
||||||
if (windows[i] === this.w) {
|
|
||||||
idx = i + direction;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
idx = idx >= windows.length ? 0 : idx;
|
|
||||||
idx = idx < 0 ? windows.length - 1 : idx;
|
|
||||||
let w = windows[idx];
|
|
||||||
let win = w.get_compositor_private();
|
|
||||||
this.clone.set_source(win);
|
|
||||||
this.window.disconnect(this.windowConnect);
|
|
||||||
// the new thumbnail should be the same height as the previous one
|
|
||||||
this.scale = (this.scale * this.window.height) / win.height;
|
|
||||||
this.window = win;
|
|
||||||
this.windowConnect = this.window.connect('destroy', () => {
|
|
||||||
if (this)
|
|
||||||
this.remove();
|
|
||||||
});
|
|
||||||
this.w = w;
|
|
||||||
|
|
||||||
if (this._winPreview)
|
|
||||||
this._showWindowPreview(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
_actionTimeoutActive() {
|
|
||||||
const timeout = this._reverseTmbWheelFunc ? this._scrollTimeout : this._scrollTimeout / 4;
|
|
||||||
if (!this._lastActionTime || Date.now() - this._lastActionTime > timeout) {
|
|
||||||
this._lastActionTime = Date.now();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* _setIcon() {
|
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
|
||||||
let app = tracker.get_window_app(this.w);
|
|
||||||
let icon = app
|
|
||||||
? app.create_icon_texture(this.height)
|
|
||||||
: new St.Icon({ icon_name: 'icon-missing', icon_size: this.height });
|
|
||||||
icon.x_expand = icon.y_expand = true;
|
|
||||||
if (this.icon)
|
|
||||||
this.icon.destroy();
|
|
||||||
this.icon = icon;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
_addCloseButton() {
|
|
||||||
const closeButton = new St.Button({
|
|
||||||
opacity: 0,
|
|
||||||
style_class: 'window-close',
|
|
||||||
child: new St.Icon({ icon_name: 'preview-close-symbolic' }),
|
|
||||||
x_align: Clutter.ActorAlign.END,
|
|
||||||
y_align: Clutter.ActorAlign.START,
|
|
||||||
x_expand: true,
|
|
||||||
y_expand: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
closeButton.set_style(`
|
|
||||||
margin: 3px;
|
|
||||||
background-color: rgba(200, 0, 0, 0.9);
|
|
||||||
`);
|
|
||||||
|
|
||||||
closeButton.connect('clicked', () => {
|
|
||||||
this.remove();
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
});
|
|
||||||
|
|
||||||
this._closeButton = closeButton;
|
|
||||||
this.add_child(this._closeButton);
|
|
||||||
}
|
|
||||||
|
|
||||||
_addScrollModeIcon() {
|
|
||||||
this._scrollModeBin = new St.Bin({
|
|
||||||
x_expand: true,
|
|
||||||
y_expand: true,
|
|
||||||
});
|
|
||||||
this._scrollModeResizeIcon = new St.Icon({
|
|
||||||
icon_name: 'view-fullscreen-symbolic',
|
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
|
||||||
y_align: Clutter.ActorAlign.END,
|
|
||||||
x_expand: true,
|
|
||||||
y_expand: true,
|
|
||||||
opacity: SCROLL_ICON_OPACITY,
|
|
||||||
style_class: 'icon-dropshadow',
|
|
||||||
scale_x: 0.5,
|
|
||||||
scale_y: 0.5,
|
|
||||||
});
|
|
||||||
this._scrollModeResizeIcon.set_style(`
|
|
||||||
margin: 13px;
|
|
||||||
color: rgb(255, 255, 255);
|
|
||||||
box-shadow: 0 0 40px 40px rgba(0,0,0,0.7);
|
|
||||||
`);
|
|
||||||
this._scrollModeSourceIcon = new St.Icon({
|
|
||||||
icon_name: 'media-skip-forward-symbolic',
|
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
|
||||||
y_align: Clutter.ActorAlign.END,
|
|
||||||
x_expand: true,
|
|
||||||
y_expand: true,
|
|
||||||
opacity: SCROLL_ICON_OPACITY,
|
|
||||||
style_class: 'icon-dropshadow',
|
|
||||||
scale_x: 0.5,
|
|
||||||
scale_y: 0.5,
|
|
||||||
});
|
|
||||||
this._scrollModeSourceIcon.set_style(`
|
|
||||||
margin: 13px;
|
|
||||||
color: rgb(255, 255, 255);
|
|
||||||
box-shadow: 0 0 40px 40px rgba(0,0,0,0.7);
|
|
||||||
`);
|
|
||||||
this._scrollModeBin.set_child(this._scrollModeResizeIcon);
|
|
||||||
this.add_child(this._scrollModeBin);
|
|
||||||
this._scrollModeBin.opacity = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
_showWindowPreview(update = false, dontDestroy = false) {
|
|
||||||
if (this._winPreview && !dontDestroy) {
|
|
||||||
this._destroyWindowPreview();
|
|
||||||
this._previewCreationTime = 0;
|
|
||||||
this._closeButton.opacity = CLOSE_BTN_OPACITY;
|
|
||||||
if (!update)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this._winPreview) {
|
|
||||||
this._winPreview = new AltTab.CyclerHighlight();
|
|
||||||
global.window_group.add_actor(this._winPreview);
|
|
||||||
[this._winPreview._xPointer, this._winPreview._yPointer] = global.get_pointer();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!update) {
|
|
||||||
this._winPreview.opacity = 0;
|
|
||||||
this._winPreview.ease({
|
|
||||||
opacity: 255,
|
|
||||||
duration: 70,
|
|
||||||
mode: Clutter.AnimationMode.LINEAR,
|
|
||||||
/* onComplete: () => {
|
|
||||||
this._closeButton.opacity = 50;
|
|
||||||
},*/
|
|
||||||
});
|
|
||||||
|
|
||||||
this.ease({
|
|
||||||
opacity: Math.min(50, this._customOpacity),
|
|
||||||
duration: 70,
|
|
||||||
mode: Clutter.AnimationMode.LINEAR,
|
|
||||||
onComplete: () => {
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this._winPreview.opacity = 255;
|
|
||||||
}
|
|
||||||
this._winPreview.window = this.w;
|
|
||||||
this._winPreview._window = this.w;
|
|
||||||
global.window_group.set_child_above_sibling(this._winPreview, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
_destroyWindowPreview() {
|
|
||||||
if (this._winPreview) {
|
|
||||||
this._winPreview.ease({
|
|
||||||
opacity: 0,
|
|
||||||
duration: 100,
|
|
||||||
mode: Clutter.AnimationMode.LINEAR,
|
|
||||||
onComplete: () => {
|
|
||||||
this._winPreview.destroy();
|
|
||||||
this._winPreview = null;
|
|
||||||
this.opacity = this._customOpacity;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -3,7 +3,7 @@
|
||||||
* windowAttentionHandler.js
|
* windowAttentionHandler.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -87,7 +87,13 @@ const WindowAttentionHandlerCommon = {
|
||||||
|
|
||||||
const app = this._tracker.get_window_app(window);
|
const app = this._tracker.get_window_app(window);
|
||||||
// const source = new WindowAttentionHandler.WindowAttentionSource(app, window);
|
// const source = new WindowAttentionHandler.WindowAttentionSource(app, window);
|
||||||
const source = new MessageTray.Source(app.get_name());
|
let args;
|
||||||
|
if (!Main.overview.dash.add_actor) // detects GS 46 - Clutter.Container has been removed
|
||||||
|
args = { title: app.get_name() };
|
||||||
|
else
|
||||||
|
args = app.get_name();
|
||||||
|
|
||||||
|
const source = new MessageTray.Source(args);
|
||||||
new Me.Util.Overrides().addOverride('MessageSource', source, WindowAttentionSourceCommon);
|
new Me.Util.Overrides().addOverride('MessageSource', source, WindowAttentionSourceCommon);
|
||||||
source._init(app, window);
|
source._init(app, window);
|
||||||
Main.messageTray.add(source);
|
Main.messageTray.add(source);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* windowManager.js
|
* windowManager.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -16,6 +16,10 @@ import GObject from 'gi://GObject';
|
||||||
|
|
||||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||||
import * as WindowManager from 'resource:///org/gnome/shell/ui/windowManager.js';
|
import * as WindowManager from 'resource:///org/gnome/shell/ui/windowManager.js';
|
||||||
|
import * as WorkspaceAnimation from 'resource:///org/gnome/shell/ui/workspaceAnimation.js';
|
||||||
|
|
||||||
|
const MINIMIZE_WINDOW_ANIMATION_TIME = 400; // windowManager.MINIMIZE_WINDOW_ANIMATION_TIME
|
||||||
|
const MINIMIZE_WINDOW_ANIMATION_MODE = Clutter.AnimationMode.EASE_OUT_EXPO; // WindowManager.MINIMIZE_WINDOW_ANIMATION_MODE
|
||||||
|
|
||||||
let Me;
|
let Me;
|
||||||
let opt;
|
let opt;
|
||||||
|
@ -62,6 +66,8 @@ export const WindowManagerModule = class {
|
||||||
this._overrides = new Me.Util.Overrides();
|
this._overrides = new Me.Util.Overrides();
|
||||||
|
|
||||||
this._overrides.addOverride('WindowManager', WindowManager.WindowManager.prototype, WindowManagerCommon);
|
this._overrides.addOverride('WindowManager', WindowManager.WindowManager.prototype, WindowManagerCommon);
|
||||||
|
if (opt.WS_SWITCHER_CURRENT_MONITOR)
|
||||||
|
this._overrides.addOverride('WorkspaceAnimationController', WorkspaceAnimation.WorkspaceAnimationController.prototype, WorkspaceAnimationController);
|
||||||
|
|
||||||
if (!this._minimizeSigId) {
|
if (!this._minimizeSigId) {
|
||||||
this._originalMinimizeSigId = GObject.signal_handler_find(Main.wm._shellwm, { signalId: 'minimize' });
|
this._originalMinimizeSigId = GObject.signal_handler_find(Main.wm._shellwm, { signalId: 'minimize' });
|
||||||
|
@ -106,11 +112,108 @@ export const WindowManagerModule = class {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// fix for mainstream bug - fullscreen windows should minimize using opacity transition
|
|
||||||
// but its being applied directly on window actor and that doesn't work
|
|
||||||
// anyway, animation is better, even if the Activities button is not visible...
|
|
||||||
// and also add support for bottom position of the panel
|
|
||||||
const WindowManagerCommon = {
|
const WindowManagerCommon = {
|
||||||
|
actionMoveWorkspace(workspace) {
|
||||||
|
if (!Main.sessionMode.hasWorkspaces)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (opt.WS_SWITCHER_CURRENT_MONITOR)
|
||||||
|
this._switchWorkspaceCurrentMonitor(workspace);
|
||||||
|
else if (!workspace.active)
|
||||||
|
workspace.activate(global.get_current_time());
|
||||||
|
},
|
||||||
|
|
||||||
|
actionMoveWindow(window, workspace) {
|
||||||
|
if (!Main.sessionMode.hasWorkspaces)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!workspace.active) {
|
||||||
|
// This won't have any effect for "always sticky" windows
|
||||||
|
// (like desktop windows or docks)
|
||||||
|
|
||||||
|
this._workspaceAnimation.movingWindow = window;
|
||||||
|
window.change_workspace(workspace);
|
||||||
|
|
||||||
|
global.display.clear_mouse_mode();
|
||||||
|
|
||||||
|
if (opt.SWITCH_ONLY_CURRENT_MONITOR_WS) {
|
||||||
|
this._switchWorkspaceCurrentMonitor(workspace, window.get_monitor());
|
||||||
|
window.activate(global.get_current_time());
|
||||||
|
} else {
|
||||||
|
workspace.activate_with_focus(window, global.get_current_time());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_switchWorkspaceCurrentMonitor(workspace, monitor) {
|
||||||
|
// const focusedWindow = global.display.get_focus_window();
|
||||||
|
// const currentMonitor = focusedWindow ? focusedWindow.get_monitor() : global.display.get_current_monitor();
|
||||||
|
// using focused window to determine the current monitor can lead to inconsistent behavior and switching monitors between switches
|
||||||
|
// depending on which window takes focus on each workspace
|
||||||
|
// mouse pointer is more stable and predictable source
|
||||||
|
const currentMonitor = monitor ? monitor : global.display.get_current_monitor();
|
||||||
|
const primaryMonitor = currentMonitor === Main.layoutManager.primaryIndex;
|
||||||
|
const nMonitors = Main.layoutManager.monitors.length;
|
||||||
|
const lastIndexCorrection = Meta.prefs_get_dynamic_workspaces() ? 2 : 1;
|
||||||
|
const lastIndex = global.workspaceManager.get_n_workspaces() - lastIndexCorrection;
|
||||||
|
const targetWsIndex = workspace.index();
|
||||||
|
const activeWs = global.workspaceManager.get_active_workspace();
|
||||||
|
const activeWsIndex = activeWs.index();
|
||||||
|
const diff = activeWsIndex - targetWsIndex;
|
||||||
|
|
||||||
|
let direction = diff > 0 ? Meta.MotionDirection.UP : Meta.MotionDirection.DOWN;
|
||||||
|
if (diff === 0) {
|
||||||
|
// no actual ws to switch, but secondary monitors are always in wraparound mode so we need to get direction
|
||||||
|
direction = activeWsIndex >= lastIndex ? Meta.MotionDirection.DOWN : Meta.MotionDirection.UP;
|
||||||
|
}
|
||||||
|
if (Math.abs(diff) > 1) {
|
||||||
|
// workspace is probably in wraparound mode and just wrapped so so we need to translate direction
|
||||||
|
direction = diff > 0 ? Meta.MotionDirection.DOWN : Meta.MotionDirection.UP;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!primaryMonitor) {
|
||||||
|
this._rotateWorkspaces(direction, currentMonitor);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// avoid ws rotations if the last empty dynamic workspace is involved, but allow to rotate from the last to the first, if wraparound is enabled
|
||||||
|
if (workspace !== activeWs && !((targetWsIndex > lastIndex && direction === Meta.MotionDirection.DOWN) || (activeWsIndex > lastIndex && targetWsIndex >= lastIndex))) {
|
||||||
|
for (let i = 0; i < nMonitors; i++) {
|
||||||
|
if (i !== currentMonitor) {
|
||||||
|
const oppositeDirection = direction === Meta.MotionDirection.UP ? Meta.MotionDirection.DOWN : Meta.MotionDirection.UP;
|
||||||
|
this._rotateWorkspaces(oppositeDirection, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
workspace.activate(global.get_current_time());
|
||||||
|
},
|
||||||
|
|
||||||
|
_rotateWorkspaces(direction = 0, monitorIndex = -1, step = 1) {
|
||||||
|
step = direction === Meta.MotionDirection.UP ? Number(step) : -step;
|
||||||
|
const monitor = monitorIndex > -1 ? monitorIndex : global.display.get_current_monitor();
|
||||||
|
// don't move windows to the last empty workspace if dynamic workspaces are enabled
|
||||||
|
const lastIndexCorrection = Meta.prefs_get_dynamic_workspaces() ? 2 : 1;
|
||||||
|
const lastIndex = global.workspaceManager.get_n_workspaces() - lastIndexCorrection;
|
||||||
|
let windows = Me.Util.getWindows(null);
|
||||||
|
for (let win of windows.reverse()) {
|
||||||
|
// avoid moving modal windows as they move with their parents (and vice versa) immediately, before we move the parent window.
|
||||||
|
if (win.get_monitor() === monitor && !win.is_always_on_all_workspaces() && !win.is_attached_dialog() && !win.get_transient_for()) {
|
||||||
|
let wWs = win.get_workspace().index();
|
||||||
|
wWs += step;
|
||||||
|
if (wWs < 0)
|
||||||
|
wWs = lastIndex;
|
||||||
|
if (wWs > lastIndex)
|
||||||
|
wWs = 0;
|
||||||
|
const ws = global.workspaceManager.get_workspace_by_index(wWs);
|
||||||
|
win.change_workspace(ws);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// fix for mainstream bug - fullscreen windows should minimize using opacity transition
|
||||||
|
// but its being applied directly on window actor and that doesn't work
|
||||||
|
// anyway, animation is better, even if the Activities button is not visible...
|
||||||
|
// and also add support for bottom position of the panel
|
||||||
_minimizeWindow(shellwm, actor) {
|
_minimizeWindow(shellwm, actor) {
|
||||||
const types = [
|
const types = [
|
||||||
Meta.WindowType.NORMAL,
|
Meta.WindowType.NORMAL,
|
||||||
|
@ -129,8 +232,8 @@ const WindowManagerCommon = {
|
||||||
/* if (actor.meta_window.is_monitor_sized()) {
|
/* if (actor.meta_window.is_monitor_sized()) {
|
||||||
actor.get_first_child().ease({
|
actor.get_first_child().ease({
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
duration: WindowManager.MINIMIZE_WINDOW_ANIMATION_TIME,
|
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
|
||||||
mode: WindowManager.MINIMIZE_WINDOW_ANIMATION_MODE,
|
mode: MINIMIZE_WINDOW_ANIMATION_MODE,
|
||||||
onStopped: () => this._minimizeWindowDone(shellwm, actor),
|
onStopped: () => this._minimizeWindowDone(shellwm, actor),
|
||||||
});
|
});
|
||||||
} else { */
|
} else { */
|
||||||
|
@ -160,8 +263,8 @@ const WindowManagerCommon = {
|
||||||
scale_y: yScale,
|
scale_y: yScale,
|
||||||
x: xDest,
|
x: xDest,
|
||||||
y: yDest,
|
y: yDest,
|
||||||
duration: WindowManager.MINIMIZE_WINDOW_ANIMATION_TIME,
|
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
|
||||||
mode: WindowManager.MINIMIZE_WINDOW_ANIMATION_MODE,
|
mode: MINIMIZE_WINDOW_ANIMATION_MODE,
|
||||||
onStopped: () => this._minimizeWindowDone(shellwm, actor),
|
onStopped: () => this._minimizeWindowDone(shellwm, actor),
|
||||||
});
|
});
|
||||||
// }
|
// }
|
||||||
|
@ -196,8 +299,8 @@ const WindowManagerCommon = {
|
||||||
actor.set_scale(1.0, 1.0);
|
actor.set_scale(1.0, 1.0);
|
||||||
actor.ease({
|
actor.ease({
|
||||||
opacity: 255,
|
opacity: 255,
|
||||||
duration: WindowManager.MINIMIZE_WINDOW_ANIMATION_TIME,
|
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
|
||||||
mode: WindowManager.MINIMIZE_WINDOW_ANIMATION_MODE,
|
mode: MINIMIZE_WINDOW_ANIMATION_MODE,
|
||||||
onStopped: () => this._unminimizeWindowDone(shellwm, actor),
|
onStopped: () => this._unminimizeWindowDone(shellwm, actor),
|
||||||
});
|
});
|
||||||
} else { */
|
} else { */
|
||||||
|
@ -228,10 +331,50 @@ const WindowManagerCommon = {
|
||||||
scale_y: 1,
|
scale_y: 1,
|
||||||
x: xDest,
|
x: xDest,
|
||||||
y: yDest,
|
y: yDest,
|
||||||
duration: WindowManager.MINIMIZE_WINDOW_ANIMATION_TIME,
|
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
|
||||||
mode: WindowManager.MINIMIZE_WINDOW_ANIMATION_MODE,
|
mode: MINIMIZE_WINDOW_ANIMATION_MODE,
|
||||||
onStopped: () => this._unminimizeWindowDone(shellwm, actor),
|
onStopped: () => this._unminimizeWindowDone(shellwm, actor),
|
||||||
});
|
});
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const WorkspaceAnimationController = {
|
||||||
|
_prepareWorkspaceSwitch(workspaceIndices) {
|
||||||
|
if (this._switchData)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const workspaceManager = global.workspace_manager;
|
||||||
|
const nWorkspaces = workspaceManager.get_n_workspaces();
|
||||||
|
|
||||||
|
const switchData = {};
|
||||||
|
|
||||||
|
this._switchData = switchData;
|
||||||
|
switchData.monitors = [];
|
||||||
|
|
||||||
|
switchData.gestureActivated = false;
|
||||||
|
switchData.inProgress = false;
|
||||||
|
|
||||||
|
if (!workspaceIndices)
|
||||||
|
workspaceIndices = [...Array(nWorkspaces).keys()];
|
||||||
|
|
||||||
|
let monitors = opt.WS_SWITCHER_CURRENT_MONITOR
|
||||||
|
? [Main.layoutManager.currentMonitor] : Main.layoutManager.monitors;
|
||||||
|
monitors = Meta.prefs_get_workspaces_only_on_primary()
|
||||||
|
? [Main.layoutManager.primaryMonitor] : monitors;
|
||||||
|
|
||||||
|
for (const monitor of monitors) {
|
||||||
|
if (Meta.prefs_get_workspaces_only_on_primary() &&
|
||||||
|
monitor.index !== Main.layoutManager.primaryIndex)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
const group = new WorkspaceAnimation.MonitorGroup(monitor, workspaceIndices, this.movingWindow);
|
||||||
|
|
||||||
|
Main.uiGroup.insert_child_above(group, global.window_group);
|
||||||
|
|
||||||
|
switchData.monitors.push(group);
|
||||||
|
}
|
||||||
|
|
||||||
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* windowPreview.js
|
* windowPreview.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -173,9 +173,9 @@ const WindowPreviewCommon = {
|
||||||
} else if (opt.WIN_PREVIEW_SEC_BTN_ACTION === 2) {
|
} else if (opt.WIN_PREVIEW_SEC_BTN_ACTION === 2) {
|
||||||
this._searchAppWindowsAction();
|
this._searchAppWindowsAction();
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
} else if (opt.WIN_PREVIEW_SEC_BTN_ACTION === 3 && opt.WINDOW_THUMBNAIL_ENABLED) {
|
} else if (opt.WIN_PREVIEW_SEC_BTN_ACTION === 3 && global.windowThumbnails) {
|
||||||
this._removeLaters();
|
this._removeLaters();
|
||||||
Me.Modules.winTmbModule.createThumbnail(metaWindow);
|
global.windowThumbnails?.createThumbnail(metaWindow);
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
}
|
}
|
||||||
} else if (button === Clutter.BUTTON_MIDDLE) {
|
} else if (button === Clutter.BUTTON_MIDDLE) {
|
||||||
|
@ -185,9 +185,9 @@ const WindowPreviewCommon = {
|
||||||
} else if (opt.WIN_PREVIEW_MID_BTN_ACTION === 2) {
|
} else if (opt.WIN_PREVIEW_MID_BTN_ACTION === 2) {
|
||||||
this._searchAppWindowsAction();
|
this._searchAppWindowsAction();
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
} else if (opt.WIN_PREVIEW_SEC_BTN_ACTION === 3 && opt.WINDOW_THUMBNAIL_ENABLED) {
|
} else if (opt.WIN_PREVIEW_SEC_BTN_ACTION === 3 && global.windowThumbnails) {
|
||||||
this._removeLaters();
|
this._removeLaters();
|
||||||
Me.Modules.winTmbModule.createThumbnail(metaWindow);
|
global.windowThumbnails?.createThumbnail(metaWindow);
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -262,9 +262,9 @@ const WindowPreviewCommon = {
|
||||||
if (opt.WINDOW_ICON_CLICK_ACTION === 1) {
|
if (opt.WINDOW_ICON_CLICK_ACTION === 1) {
|
||||||
this._searchAppWindowsAction();
|
this._searchAppWindowsAction();
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
} else if (opt.WINDOW_ICON_CLICK_ACTION === 2 && opt.WINDOW_THUMBNAIL_ENABLED) {
|
} else if (opt.WINDOW_ICON_CLICK_ACTION === 2 && global.windowThumbnails) {
|
||||||
this._removeLaters();
|
this._removeLaters();
|
||||||
Me.Modules.winTmbModule.createThumbnail(metaWindow);
|
global.windowThumbnails?.createThumbnail(metaWindow);
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
}
|
}
|
||||||
} /* else if (act.get_button() === Clutter.BUTTON_SECONDARY) {
|
} /* else if (act.get_button() === Clutter.BUTTON_SECONDARY) {
|
||||||
|
@ -458,12 +458,12 @@ const WindowPreviewCommon = {
|
||||||
// in static workspace mode show icon and title on windows expose
|
// in static workspace mode show icon and title on windows expose
|
||||||
if (opt.OVERVIEW_MODE) {
|
if (opt.OVERVIEW_MODE) {
|
||||||
if (currentState === 1)
|
if (currentState === 1)
|
||||||
scale = opt.WORKSPACE_MODE;
|
scale = this._workspace._background._stateAdjustment.value;
|
||||||
else if (finalState === 1 || (finalState === 0 && !opt.WORKSPACE_MODE))
|
else if ((finalState === 1 && !opt.WORKSPACE_MODE) || (finalState === 0 && !opt.WORKSPACE_MODE))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!opt.WS_ANIMATION && (Main.overview._overview.controls._searchController.searchActive ||
|
if (!opt.WS_ANIMATION && (Main.overview.searchController.searchActive ||
|
||||||
((initialState === ControlsState.WINDOW_PICKER && finalState === ControlsState.APP_GRID) ||
|
((initialState === ControlsState.WINDOW_PICKER && finalState === ControlsState.APP_GRID) ||
|
||||||
(initialState === ControlsState.APP_GRID && finalState === ControlsState.WINDOW_PICKER)))
|
(initialState === ControlsState.APP_GRID && finalState === ControlsState.WINDOW_PICKER)))
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,331 +0,0 @@
|
||||||
/**
|
|
||||||
* V-Shell (Vertical Workspaces)
|
|
||||||
* windowSearchProvider.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 Meta from 'gi://Meta';
|
|
||||||
import Shell from 'gi://Shell';
|
|
||||||
import St from 'gi://St';
|
|
||||||
|
|
||||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
|
||||||
|
|
||||||
let Me;
|
|
||||||
let opt;
|
|
||||||
// gettext
|
|
||||||
let _;
|
|
||||||
|
|
||||||
// prefix helps to eliminate results from other search providers
|
|
||||||
// so it needs to be something less common
|
|
||||||
// needs to be accessible from vw module
|
|
||||||
export const PREFIX = 'wq//';
|
|
||||||
|
|
||||||
const Action = {
|
|
||||||
NONE: 0,
|
|
||||||
CLOSE: 1,
|
|
||||||
CLOSE_ALL: 2,
|
|
||||||
MOVE_TO_WS: 3,
|
|
||||||
MOVE_ALL_TO_WS: 4,
|
|
||||||
};
|
|
||||||
|
|
||||||
export const WindowSearchProviderModule = class {
|
|
||||||
// export for other modules
|
|
||||||
static _PREFIX = PREFIX;
|
|
||||||
constructor(me) {
|
|
||||||
Me = me;
|
|
||||||
opt = Me.opt;
|
|
||||||
_ = Me.gettext;
|
|
||||||
|
|
||||||
this._firstActivation = true;
|
|
||||||
this.moduleEnabled = false;
|
|
||||||
|
|
||||||
this._windowSearchProvider = null;
|
|
||||||
this._enableTimeoutId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanGlobals() {
|
|
||||||
Me = null;
|
|
||||||
opt = null;
|
|
||||||
_ = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
update(reset) {
|
|
||||||
this.moduleEnabled = opt.get('windowSearchProviderModule');
|
|
||||||
|
|
||||||
reset = reset || !this.moduleEnabled;
|
|
||||||
|
|
||||||
if (reset && !this._firstActivation) {
|
|
||||||
this._disableModule();
|
|
||||||
} else if (!reset) {
|
|
||||||
this._firstActivation = false;
|
|
||||||
this._activateModule();
|
|
||||||
}
|
|
||||||
if (reset && this._firstActivation)
|
|
||||||
console.debug(' WindowSearchProviderModule - Keeping untouched');
|
|
||||||
}
|
|
||||||
|
|
||||||
_activateModule() {
|
|
||||||
// delay because Fedora had problem to register a new provider soon after Shell restarts
|
|
||||||
this._enableTimeoutId = GLib.timeout_add(
|
|
||||||
GLib.PRIORITY_DEFAULT,
|
|
||||||
2000,
|
|
||||||
() => {
|
|
||||||
if (!this._windowSearchProvider) {
|
|
||||||
this._windowSearchProvider = new WindowSearchProvider(opt);
|
|
||||||
this._getOverviewSearchResult()._registerProvider(this._windowSearchProvider);
|
|
||||||
}
|
|
||||||
this._enableTimeoutId = 0;
|
|
||||||
return GLib.SOURCE_REMOVE;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
console.debug(' WindowSearchProviderModule - Activated');
|
|
||||||
}
|
|
||||||
|
|
||||||
_disableModule() {
|
|
||||||
if (this._windowSearchProvider) {
|
|
||||||
this._getOverviewSearchResult()._unregisterProvider(this._windowSearchProvider);
|
|
||||||
this._windowSearchProvider = null;
|
|
||||||
}
|
|
||||||
if (this._enableTimeoutId) {
|
|
||||||
GLib.source_remove(this._enableTimeoutId);
|
|
||||||
this._enableTimeoutId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.debug(' WindowSearchProviderModule - Disabled');
|
|
||||||
}
|
|
||||||
|
|
||||||
_getOverviewSearchResult() {
|
|
||||||
return Main.overview._overview.controls._searchController._searchResults;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/* const closeSelectedRegex = /^\/x!$/;
|
|
||||||
const closeAllResultsRegex = /^\/xa!$/;
|
|
||||||
const moveToWsRegex = /^\/m[0-9]+$/;
|
|
||||||
const moveAllToWsRegex = /^\/ma[0-9]+$/;*/
|
|
||||||
|
|
||||||
class WindowSearchProvider {
|
|
||||||
constructor() {
|
|
||||||
this.id = 'open-windows';
|
|
||||||
// use arbitrary app to get complete appInfo object
|
|
||||||
// Gio.AppInfo.create_from_commandline lacks something that causes error with parental content / malcontent
|
|
||||||
const appSystem = Shell.AppSystem.get_default();
|
|
||||||
let appInfo = appSystem.lookup_app('com.matjakeman.ExtensionManager.desktop')?.get_app_info();
|
|
||||||
if (!appInfo)
|
|
||||||
appInfo = appSystem.lookup_app('org.gnome.Extensions.desktop')?.get_app_info();
|
|
||||||
if (!appInfo)
|
|
||||||
appInfo = Gio.AppInfo.create_from_commandline('true', _('Open Windows'), null);
|
|
||||||
appInfo.get_description = () => _('Search open windows');
|
|
||||||
appInfo.get_name = () => _('Open Windows');
|
|
||||||
appInfo.get_id = () => this.id;
|
|
||||||
appInfo.get_icon = () => Gio.icon_new_for_string('focus-windows-symbolic');
|
|
||||||
appInfo.should_show = () => true;
|
|
||||||
|
|
||||||
this.appInfo = appInfo;
|
|
||||||
this.canLaunchSearch = false;
|
|
||||||
this.isRemoteProvider = false;
|
|
||||||
|
|
||||||
this.action = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
_getResultSet(terms) {
|
|
||||||
// do not modify original terms
|
|
||||||
let termsCopy = [...terms];
|
|
||||||
// search for terms without prefix
|
|
||||||
termsCopy[0] = termsCopy[0].replace(PREFIX, '');
|
|
||||||
|
|
||||||
/* if (gOptions.get('searchWindowsCommands')) {
|
|
||||||
this.action = 0;
|
|
||||||
this.targetWs = 0;
|
|
||||||
|
|
||||||
const lastTerm = terms[terms.length - 1];
|
|
||||||
if (lastTerm.match(closeSelectedRegex)) {
|
|
||||||
this.action = Action.CLOSE;
|
|
||||||
} else if (lastTerm.match(closeAllResultsRegex)) {
|
|
||||||
this.action = Action.CLOSE_ALL;
|
|
||||||
} else if (lastTerm.match(moveToWsRegex)) {
|
|
||||||
this.action = Action.MOVE_TO_WS;
|
|
||||||
} else if (lastTerm.match(moveAllToWsRegex)) {
|
|
||||||
this.action = Action.MOVE_ALL_TO_WS;
|
|
||||||
}
|
|
||||||
if (this.action) {
|
|
||||||
terms.pop();
|
|
||||||
if (this.action === Action.MOVE_TO_WS || this.action === Action.MOVE_ALL_TO_WS) {
|
|
||||||
this.targetWs = parseInt(lastTerm.replace(/^[^0-9]+/, '')) - 1;
|
|
||||||
}
|
|
||||||
} else if (lastTerm.startsWith('/')) {
|
|
||||||
terms.pop();
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
const candidates = this.windows;
|
|
||||||
const _terms = [].concat(termsCopy);
|
|
||||||
// let match;
|
|
||||||
|
|
||||||
const term = _terms.join(' ');
|
|
||||||
/* match = s => {
|
|
||||||
return fuzzyMatch(term, s);
|
|
||||||
}; */
|
|
||||||
|
|
||||||
const results = [];
|
|
||||||
let m;
|
|
||||||
for (let key in candidates) {
|
|
||||||
if (opt.SEARCH_FUZZY)
|
|
||||||
m = Me.Util.fuzzyMatch(term, candidates[key].name);
|
|
||||||
else
|
|
||||||
m = Me.Util.strictMatch(term, candidates[key].name);
|
|
||||||
|
|
||||||
if (m !== -1)
|
|
||||||
results.push({ weight: m, id: key });
|
|
||||||
}
|
|
||||||
|
|
||||||
results.sort((a, b) => a.weight > b.weight);
|
|
||||||
const currentWs = global.workspace_manager.get_active_workspace_index();
|
|
||||||
// prefer current workspace
|
|
||||||
switch (opt.WINDOW_SEARCH_ORDER) {
|
|
||||||
case 1: // MRU - current ws first
|
|
||||||
results.sort((a, b) => (this.windows[a.id].window.get_workspace().index() !== currentWs) && (this.windows[b.id].window.get_workspace().index() === currentWs));
|
|
||||||
break;
|
|
||||||
case 2: // MRU - by workspace
|
|
||||||
results.sort((a, b) => this.windows[a.id].window.get_workspace().index() > this.windows[b.id].window.get_workspace().index());
|
|
||||||
break;
|
|
||||||
case 3: // Stable sequence - by workspace
|
|
||||||
results.sort((a, b) => this.windows[a.id].window.get_stable_sequence() > this.windows[b.id].window.get_stable_sequence());
|
|
||||||
results.sort((a, b) => this.windows[a.id].window.get_workspace().index() > this.windows[b.id].window.get_workspace().index());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
results.sort((a, b) => (_terms !== ' ') && (a.weight > 0 && b.weight === 0));
|
|
||||||
|
|
||||||
this.resultIds = results.map(item => item.id);
|
|
||||||
return this.resultIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
getResultMetas(resultIds/* , callback = null*/) {
|
|
||||||
const metas = resultIds.map(id => this.getResultMeta(id));
|
|
||||||
return new Promise(resolve => resolve(metas));
|
|
||||||
}
|
|
||||||
|
|
||||||
getResultMeta(resultId) {
|
|
||||||
const result = this.windows[resultId];
|
|
||||||
const wsIndex = result.window.get_workspace().index();
|
|
||||||
const app = Shell.WindowTracker.get_default().get_window_app(result.window);
|
|
||||||
return {
|
|
||||||
'id': resultId,
|
|
||||||
'name': `${wsIndex + 1}: ${result.windowTitle}`,
|
|
||||||
'description': result.appName,
|
|
||||||
'createIcon': size => {
|
|
||||||
return app
|
|
||||||
? app.create_icon_texture(size)
|
|
||||||
: new St.Icon({ icon_name: 'icon-missing', icon_size: size });
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
makeResult(window, i) {
|
|
||||||
const app = Shell.WindowTracker.get_default().get_window_app(window);
|
|
||||||
const appName = app ? app.get_name() : 'Unknown';
|
|
||||||
const windowTitle = window.get_title();
|
|
||||||
const wsIndex = window.get_workspace().index();
|
|
||||||
|
|
||||||
return {
|
|
||||||
'id': i,
|
|
||||||
// convert all accented chars to their basic form and lower case for search
|
|
||||||
'name': `${wsIndex + 1}: ${windowTitle} ${appName}`.normalize('NFD').replace(/[\u0300-\u036f]/g, '').toLowerCase(),
|
|
||||||
appName,
|
|
||||||
windowTitle,
|
|
||||||
window,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
launchSearch(/* terms, timeStamp*/) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
activateResult(resultId/* , terms, timeStamp*/) {
|
|
||||||
const isCtrlPressed = Me.Util.isCtrlPressed();
|
|
||||||
const isShiftPressed = Me.Util.isShiftPressed();
|
|
||||||
|
|
||||||
this.action = 0;
|
|
||||||
this.targetWs = 0;
|
|
||||||
|
|
||||||
this.targetWs = global.workspaceManager.get_active_workspace().index() + 1;
|
|
||||||
if (isShiftPressed && !isCtrlPressed)
|
|
||||||
this.action = Action.MOVE_TO_WS;
|
|
||||||
else if (isShiftPressed && isCtrlPressed)
|
|
||||||
this.action = Action.MOVE_ALL_TO_WS;
|
|
||||||
|
|
||||||
|
|
||||||
if (!this.action) {
|
|
||||||
const result = this.windows[resultId];
|
|
||||||
Main.activateWindow(result.window);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (this.action) {
|
|
||||||
case Action.CLOSE:
|
|
||||||
this._closeWindows([resultId]);
|
|
||||||
break;
|
|
||||||
case Action.CLOSE_ALL:
|
|
||||||
this._closeWindows(this.resultIds);
|
|
||||||
break;
|
|
||||||
case Action.MOVE_TO_WS:
|
|
||||||
this._moveWindowsToWs(resultId, [resultId]);
|
|
||||||
break;
|
|
||||||
case Action.MOVE_ALL_TO_WS:
|
|
||||||
this._moveWindowsToWs(resultId, this.resultIds);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_closeWindows(ids) {
|
|
||||||
let time = global.get_current_time();
|
|
||||||
for (let i = 0; i < ids.length; i++)
|
|
||||||
this.windows[ids[i]].window.delete(time + i);
|
|
||||||
|
|
||||||
Main.notify('Window Search Provider', `Closed ${ids.length} windows.`);
|
|
||||||
}
|
|
||||||
|
|
||||||
_moveWindowsToWs(selectedId, resultIds) {
|
|
||||||
const workspace = global.workspaceManager.get_active_workspace();
|
|
||||||
|
|
||||||
for (let i = 0; i < resultIds.length; i++)
|
|
||||||
this.windows[resultIds[i]].window.change_workspace(workspace);
|
|
||||||
|
|
||||||
const selectedWin = this.windows[selectedId].window;
|
|
||||||
selectedWin.activate_with_workspace(global.get_current_time(), workspace);
|
|
||||||
}
|
|
||||||
|
|
||||||
getInitialResultSet(terms/* , callback*/) {
|
|
||||||
let windows;
|
|
||||||
this.windows = windows = {};
|
|
||||||
global.display.get_tab_list(Meta.TabList.NORMAL, null).filter(w => w.get_workspace() !== null).map(
|
|
||||||
(v, i) => {
|
|
||||||
windows[`${i}-${v.get_id()}`] = this.makeResult(v, `${i}-${v.get_id()}`);
|
|
||||||
return windows[`${i}-${v.get_id()}`];
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return new Promise(resolve => resolve(this._getResultSet(terms)));
|
|
||||||
}
|
|
||||||
|
|
||||||
filterResults(results /* , maxResults*/) {
|
|
||||||
// return results.slice(0, maxResults);
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
getSubsearchResultSet(previousResults, terms/* , callback*/) {
|
|
||||||
return this.getInitialResultSet(terms);
|
|
||||||
}
|
|
||||||
|
|
||||||
getSubsearchResultSet42(terms, callback) {
|
|
||||||
callback(this._getResultSet(terms));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -3,7 +3,7 @@
|
||||||
* workspace.js
|
* workspace.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* workspacesAnimation.js
|
* workspacesAnimation.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* workspacesSwitcherPopup.js
|
* workspacesSwitcherPopup.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -73,6 +73,7 @@ const WorkspaceSwitcherPopupCommon = {
|
||||||
after__init() {
|
after__init() {
|
||||||
if (opt.ORIENTATION) { // 1-VERTICAL, 0-HORIZONTAL
|
if (opt.ORIENTATION) { // 1-VERTICAL, 0-HORIZONTAL
|
||||||
this._list.vertical = true;
|
this._list.vertical = true;
|
||||||
|
this._list.add_style_class_name('ws-switcher-vertical');
|
||||||
}
|
}
|
||||||
this._list.set_style('margin: 0;');
|
this._list.set_style('margin: 0;');
|
||||||
if (this.get_constraints()[0])
|
if (this.get_constraints()[0])
|
||||||
|
@ -89,13 +90,11 @@ const WorkspaceSwitcherPopupCommon = {
|
||||||
|
|
||||||
_setPopupPosition() {
|
_setPopupPosition() {
|
||||||
let workArea;
|
let workArea;
|
||||||
if (opt.WS_SW_POPUP_MODE === 1) {
|
if (opt.WS_SW_POPUP_MODE === 1)
|
||||||
// workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);*/
|
|
||||||
workArea = global.display.get_monitor_geometry(Main.layoutManager.primaryIndex);
|
workArea = global.display.get_monitor_geometry(Main.layoutManager.primaryIndex);
|
||||||
} else {
|
else
|
||||||
// workArea = Main.layoutManager.getWorkAreaForMonitor(global.display.get_current_monitor());
|
|
||||||
workArea = global.display.get_monitor_geometry(global.display.get_current_monitor());
|
workArea = global.display.get_monitor_geometry(global.display.get_current_monitor());
|
||||||
}
|
|
||||||
|
|
||||||
let [, natHeight] = this.get_preferred_height(global.screen_width);
|
let [, natHeight] = this.get_preferred_height(global.screen_width);
|
||||||
let [, natWidth] = this.get_preferred_width(natHeight);
|
let [, natWidth] = this.get_preferred_width(natHeight);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* workspaceThumbnail.js
|
* workspaceThumbnail.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -335,7 +335,7 @@ const WorkspaceThumbnailCommon = {
|
||||||
// in OVERVIEW MODE 2 windows are not spread and workspace is not scaled
|
// in OVERVIEW MODE 2 windows are not spread and workspace is not scaled
|
||||||
// we need to repeat transition to the overview state 1 (window picker), but with spreading windows animation
|
// we need to repeat transition to the overview state 1 (window picker), but with spreading windows animation
|
||||||
if (this.metaWorkspace.active) {
|
if (this.metaWorkspace.active) {
|
||||||
Main.overview._overview.controls._searchController._setSearchActive(false);
|
Main.overview.searchController._setSearchActive(false);
|
||||||
opt.WORKSPACE_MODE = 1;
|
opt.WORKSPACE_MODE = 1;
|
||||||
// setting value to 0 would reset WORKSPACE_MODE
|
// setting value to 0 would reset WORKSPACE_MODE
|
||||||
stateAdjustment.value = 0.01;
|
stateAdjustment.value = 0.01;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* workspacesView.js
|
* workspacesView.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -263,6 +263,7 @@ const WorkspacesViewCommon = {
|
||||||
adjustments.push(this._workspaces[workspaceIndex]._background._stateAdjustment);
|
adjustments.push(this._workspaces[workspaceIndex]._background._stateAdjustment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opt.WORKSPACE_MODE = 1;
|
||||||
adjustments.forEach(adj => {
|
adjustments.forEach(adj => {
|
||||||
if (adj.value === 0) {
|
if (adj.value === 0) {
|
||||||
adj.value = 0;
|
adj.value = 0;
|
||||||
|
@ -270,7 +271,6 @@ const WorkspacesViewCommon = {
|
||||||
duration: 200,
|
duration: 200,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
opt.WORKSPACE_MODE = 1;
|
|
||||||
if (callback)
|
if (callback)
|
||||||
callback();
|
callback();
|
||||||
},
|
},
|
||||||
|
@ -333,12 +333,13 @@ const SecondaryMonitorDisplayVertical = {
|
||||||
Math.round(scaledWidth));
|
Math.round(scaledWidth));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getWorkspacesBoxForState(state, box, padding, thumbnailsWidth, spacing) {
|
_getWorkspacesBoxForState(state, box, thumbnailsWidth, spacing, startY, panelHeight) {
|
||||||
// const { ControlsState } = OverviewControls;
|
// const { ControlsState } = OverviewControls;
|
||||||
const workspaceBox = box.copy();
|
const workspaceBox = box.copy();
|
||||||
const [width, height] = workspaceBox.get_size();
|
let [width, height] = workspaceBox.get_size();
|
||||||
|
height -= panelHeight;
|
||||||
|
|
||||||
let wWidth, wHeight, wsbX, wsbY, offset, yShift;
|
let wWidth, wHeight, wsbX, wsbY, offset;
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case ControlsState.HIDDEN:
|
case ControlsState.HIDDEN:
|
||||||
break;
|
break;
|
||||||
|
@ -347,16 +348,8 @@ const SecondaryMonitorDisplayVertical = {
|
||||||
if (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)
|
if (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
yShift = 0;
|
|
||||||
if (opt.SEC_WS_PREVIEW_SHIFT && !opt.PANEL_DISABLED) {
|
|
||||||
if (opt.PANEL_POSITION_TOP)
|
|
||||||
yShift = Main.panel.height;
|
|
||||||
else
|
|
||||||
yShift = -Main.panel.height;
|
|
||||||
}
|
|
||||||
|
|
||||||
wWidth = width - thumbnailsWidth - 5 * spacing;
|
wWidth = width - thumbnailsWidth - 5 * spacing;
|
||||||
wHeight = Math.min(wWidth / (width / height) - Math.abs(yShift), height - 4 * spacing);
|
wHeight = Math.min(wWidth / (width / height), height - 4 * spacing);
|
||||||
wWidth = Math.round(wWidth * opt.SEC_WS_PREVIEW_SCALE);
|
wWidth = Math.round(wWidth * opt.SEC_WS_PREVIEW_SCALE);
|
||||||
wHeight = Math.round(wHeight * opt.SEC_WS_PREVIEW_SCALE);
|
wHeight = Math.round(wHeight * opt.SEC_WS_PREVIEW_SCALE);
|
||||||
|
|
||||||
|
@ -366,7 +359,7 @@ const SecondaryMonitorDisplayVertical = {
|
||||||
else
|
else
|
||||||
wsbX = offset;
|
wsbX = offset;
|
||||||
|
|
||||||
wsbY = Math.round((height - wHeight - Math.abs(yShift)) / 2 + yShift);
|
wsbY = Math.round((startY + height - wHeight) / 2);
|
||||||
|
|
||||||
workspaceBox.set_origin(wsbX, wsbY);
|
workspaceBox.set_origin(wsbX, wsbY);
|
||||||
workspaceBox.set_size(wWidth, wHeight);
|
workspaceBox.set_size(wWidth, wHeight);
|
||||||
|
@ -381,24 +374,31 @@ const SecondaryMonitorDisplayVertical = {
|
||||||
|
|
||||||
const themeNode = this.get_theme_node();
|
const themeNode = this.get_theme_node();
|
||||||
const contentBox = themeNode.get_content_box(box);
|
const contentBox = themeNode.get_content_box(box);
|
||||||
const [width, height] = contentBox.get_size();
|
let [width, height] = contentBox.get_size();
|
||||||
|
let [, startY] = contentBox.get_origin();
|
||||||
|
// Save some resources
|
||||||
|
if (this._startY === undefined) {
|
||||||
|
this._panelHeight = opt.SEC_WS_PREVIEW_SHIFT && Main.panel.visible ? Main.panel.height : 0;
|
||||||
|
startY += opt.SEC_WS_PREVIEW_SHIFT && opt.PANEL_POSITION_TOP ? this._panelHeight : 0;
|
||||||
|
this._startY = startY;
|
||||||
|
}
|
||||||
|
|
||||||
|
startY = this._startY;
|
||||||
|
height -= this._panelHeight;
|
||||||
const { expandFraction } = this._thumbnails;
|
const { expandFraction } = this._thumbnails;
|
||||||
const spacing = themeNode.get_length('spacing') * expandFraction;
|
const spacing = themeNode.get_length('spacing') * expandFraction;
|
||||||
const padding = Math.round(0.1 * height);
|
|
||||||
|
|
||||||
let thumbnailsWidth = 0;
|
let thumbnailsWidth = 0;
|
||||||
let thumbnailsHeight = 0;
|
let thumbnailsHeight = 0;
|
||||||
this._thumbnails.visible = !opt.SEC_WS_TMB_HIDDEN;
|
this._thumbnails.visible = !opt.SEC_WS_TMB_HIDDEN;
|
||||||
if (this._thumbnails.visible) {
|
if (this._thumbnails.visible) {
|
||||||
const reduceBoxHeight = opt.SEC_WS_PREVIEW_SHIFT && Main.panel.visible ? Main.panel.height : 0;
|
thumbnailsWidth = Math.round(width * opt.SEC_MAX_THUMBNAIL_SCALE);
|
||||||
|
|
||||||
thumbnailsWidth = width * opt.SEC_MAX_THUMBNAIL_SCALE;
|
|
||||||
|
|
||||||
let totalTmbSpacing;
|
let totalTmbSpacing;
|
||||||
[totalTmbSpacing, thumbnailsHeight] = this._thumbnails.get_preferred_height(thumbnailsWidth);
|
[totalTmbSpacing, thumbnailsHeight] = this._thumbnails.get_preferred_height(thumbnailsWidth);
|
||||||
thumbnailsHeight = Math.round(thumbnailsHeight + totalTmbSpacing);
|
thumbnailsHeight = Math.round(thumbnailsHeight + totalTmbSpacing);
|
||||||
|
|
||||||
const thumbnailsHeightMax = height - spacing - reduceBoxHeight;
|
const thumbnailsHeightMax = height - spacing;
|
||||||
|
|
||||||
if (thumbnailsHeight > thumbnailsHeightMax) {
|
if (thumbnailsHeight > thumbnailsHeightMax) {
|
||||||
thumbnailsHeight = thumbnailsHeightMax;
|
thumbnailsHeight = thumbnailsHeightMax;
|
||||||
|
@ -406,11 +406,11 @@ const SecondaryMonitorDisplayVertical = {
|
||||||
}
|
}
|
||||||
|
|
||||||
let wsTmbX;
|
let wsTmbX;
|
||||||
if (opt.SEC_WS_TMB_LEFT) { // left
|
if (opt.SEC_WS_TMB_LEFT) {
|
||||||
wsTmbX = spacing / 2;
|
wsTmbX = 0;
|
||||||
this._thumbnails._positionLeft = true;
|
this._thumbnails._positionLeft = true;
|
||||||
} else {
|
} else {
|
||||||
wsTmbX = width - spacing / 2 - thumbnailsWidth;
|
wsTmbX = width - thumbnailsWidth;
|
||||||
this._thumbnails._positionLeft = false;
|
this._thumbnails._positionLeft = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,8 +418,9 @@ const SecondaryMonitorDisplayVertical = {
|
||||||
const availSpace = height - thumbnailsHeight;
|
const availSpace = height - thumbnailsHeight;
|
||||||
|
|
||||||
let wsTmbY = availSpace / 2;
|
let wsTmbY = availSpace / 2;
|
||||||
wsTmbY -= opt.SEC_WS_TMB_POSITION_ADJUSTMENT * wsTmbY;
|
|
||||||
wsTmbY += opt.SEC_WS_PREVIEW_SHIFT && Main.panel.visible ? Main.panel.height : 0;
|
wsTmbY -= opt.SEC_WS_TMB_POSITION_ADJUSTMENT * (wsTmbY - spacing / 2);
|
||||||
|
wsTmbY += startY;
|
||||||
|
|
||||||
childBox.set_origin(Math.round(wsTmbX), Math.round(wsTmbY));
|
childBox.set_origin(Math.round(wsTmbX), Math.round(wsTmbY));
|
||||||
childBox.set_size(thumbnailsWidth, thumbnailsHeight);
|
childBox.set_size(thumbnailsWidth, thumbnailsHeight);
|
||||||
|
@ -431,7 +432,7 @@ const SecondaryMonitorDisplayVertical = {
|
||||||
} = this._overviewAdjustment.getStateTransitionParams();
|
} = this._overviewAdjustment.getStateTransitionParams();
|
||||||
|
|
||||||
let workspacesBox;
|
let workspacesBox;
|
||||||
const workspaceParams = [contentBox, padding, thumbnailsWidth, spacing];
|
const workspaceParams = [contentBox, thumbnailsWidth, spacing, startY, this._panelHeight];
|
||||||
if (!transitioning) {
|
if (!transitioning) {
|
||||||
workspacesBox =
|
workspacesBox =
|
||||||
this._getWorkspacesBoxForState(currentState, ...workspaceParams);
|
this._getWorkspacesBoxForState(currentState, ...workspaceParams);
|
||||||
|
@ -561,12 +562,13 @@ const SecondaryMonitorDisplayHorizontal = {
|
||||||
return { opacity, scale, translationY };
|
return { opacity, scale, translationY };
|
||||||
},
|
},
|
||||||
|
|
||||||
_getWorkspacesBoxForState(state, box, padding, thumbnailsHeight, spacing) {
|
_getWorkspacesBoxForState(state, box, thumbnailsHeight, spacing, startY, panelHeight) {
|
||||||
// const { ControlsState } = OverviewControls;
|
// const { ControlsState } = OverviewControls;
|
||||||
const workspaceBox = box.copy();
|
const workspaceBox = box.copy();
|
||||||
const [width, height] = workspaceBox.get_size();
|
let [width, height] = workspaceBox.get_size();
|
||||||
|
height -= panelHeight;
|
||||||
|
|
||||||
let wWidth, wHeight, wsbX, wsbY, offset, yShift;
|
let wWidth, wHeight, wsbX, wsbY, offset;
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case ControlsState.HIDDEN:
|
case ControlsState.HIDDEN:
|
||||||
break;
|
break;
|
||||||
|
@ -575,26 +577,18 @@ const SecondaryMonitorDisplayHorizontal = {
|
||||||
if (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)
|
if (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
yShift = 0;
|
wHeight = height - (thumbnailsHeight ? thumbnailsHeight + 4 * spacing : 4 * spacing);
|
||||||
if (opt.SEC_WS_PREVIEW_SHIFT && !opt.PANEL_DISABLED) {
|
|
||||||
if (opt.PANEL_POSITION_TOP)
|
|
||||||
yShift = Main.panel.height;
|
|
||||||
else
|
|
||||||
yShift = -Main.panel.height;
|
|
||||||
}
|
|
||||||
|
|
||||||
wHeight = height - Math.abs(yShift) - (thumbnailsHeight ? thumbnailsHeight + 4 * spacing : padding);
|
|
||||||
wWidth = Math.min(wHeight * (width / height), width - 5 * spacing);
|
wWidth = Math.min(wHeight * (width / height), width - 5 * spacing);
|
||||||
wWidth = Math.round(wWidth * opt.SEC_WS_PREVIEW_SCALE);
|
wWidth = Math.round(wWidth * opt.SEC_WS_PREVIEW_SCALE);
|
||||||
wHeight = Math.round(wHeight * opt.SEC_WS_PREVIEW_SCALE);
|
wHeight = Math.round(wHeight * opt.SEC_WS_PREVIEW_SCALE);
|
||||||
|
|
||||||
offset = Math.round((height - thumbnailsHeight - wHeight - Math.abs(yShift)) / 2);
|
offset = Math.round((height - thumbnailsHeight - wHeight) / 2);
|
||||||
if (opt.SEC_WS_TMB_TOP)
|
if (opt.SEC_WS_TMB_TOP)
|
||||||
wsbY = thumbnailsHeight + offset;
|
wsbY = thumbnailsHeight + offset;
|
||||||
else
|
else
|
||||||
wsbY = offset;
|
wsbY = offset;
|
||||||
|
|
||||||
wsbY += yShift;
|
wsbY += startY;
|
||||||
wsbX = Math.round((width - wWidth) / 2);
|
wsbX = Math.round((width - wWidth) / 2);
|
||||||
|
|
||||||
workspaceBox.set_origin(wsbX, wsbY);
|
workspaceBox.set_origin(wsbX, wsbY);
|
||||||
|
@ -610,17 +604,24 @@ const SecondaryMonitorDisplayHorizontal = {
|
||||||
|
|
||||||
const themeNode = this.get_theme_node();
|
const themeNode = this.get_theme_node();
|
||||||
const contentBox = themeNode.get_content_box(box);
|
const contentBox = themeNode.get_content_box(box);
|
||||||
const [width, height] = contentBox.get_size();
|
let [width, height] = contentBox.get_size();
|
||||||
|
let [, startY] = contentBox.get_origin();
|
||||||
|
// Save some resources
|
||||||
|
if (this._startY === undefined) {
|
||||||
|
this._panelHeight = opt.SEC_WS_PREVIEW_SHIFT && Main.panel.visible ? Main.panel.height : 0;
|
||||||
|
startY += opt.SEC_WS_PREVIEW_SHIFT && opt.PANEL_POSITION_TOP ? this._panelHeight : 0;
|
||||||
|
this._startY = startY;
|
||||||
|
}
|
||||||
|
startY = this._startY;
|
||||||
|
height -= this._panelHeight;
|
||||||
|
|
||||||
const { expandFraction } = this._thumbnails;
|
const { expandFraction } = this._thumbnails;
|
||||||
const spacing = themeNode.get_length('spacing') * expandFraction;
|
const spacing = themeNode.get_length('spacing') * expandFraction;
|
||||||
const padding = Math.round(0.1 * height);
|
|
||||||
|
|
||||||
let thumbnailsWidth = 0;
|
let thumbnailsWidth = 0;
|
||||||
let thumbnailsHeight = 0;
|
let thumbnailsHeight = 0;
|
||||||
this._thumbnails.visible = !opt.SEC_WS_TMB_HIDDEN;
|
this._thumbnails.visible = !opt.SEC_WS_TMB_HIDDEN;
|
||||||
if (this._thumbnails.visible) {
|
if (this._thumbnails.visible) {
|
||||||
const reservedHeight = opt.SEC_WS_PREVIEW_SHIFT && Main.panel.visible ? Main.panel.height : 0;
|
|
||||||
|
|
||||||
thumbnailsHeight = height * opt.SEC_MAX_THUMBNAIL_SCALE;
|
thumbnailsHeight = height * opt.SEC_MAX_THUMBNAIL_SCALE;
|
||||||
|
|
||||||
let totalTmbSpacing;
|
let totalTmbSpacing;
|
||||||
|
@ -636,9 +637,9 @@ const SecondaryMonitorDisplayHorizontal = {
|
||||||
|
|
||||||
let wsTmbY;
|
let wsTmbY;
|
||||||
if (opt.SEC_WS_TMB_TOP)
|
if (opt.SEC_WS_TMB_TOP)
|
||||||
wsTmbY = spacing / 2 + reservedHeight;
|
wsTmbY = spacing / 2 + startY;
|
||||||
else
|
else
|
||||||
wsTmbY = height - spacing / 2 - thumbnailsHeight;
|
wsTmbY = height - spacing / 2 - thumbnailsHeight + startY;
|
||||||
|
|
||||||
const childBox = new Clutter.ActorBox();
|
const childBox = new Clutter.ActorBox();
|
||||||
const availSpace = width - thumbnailsWidth;
|
const availSpace = width - thumbnailsWidth;
|
||||||
|
@ -656,7 +657,7 @@ const SecondaryMonitorDisplayHorizontal = {
|
||||||
} = this._overviewAdjustment.getStateTransitionParams();
|
} = this._overviewAdjustment.getStateTransitionParams();
|
||||||
|
|
||||||
let workspacesBox;
|
let workspacesBox;
|
||||||
const workspaceParams = [contentBox, padding, thumbnailsHeight, spacing];
|
const workspaceParams = [contentBox, thumbnailsHeight, spacing, startY, this._panelHeight];
|
||||||
if (!transitioning) {
|
if (!transitioning) {
|
||||||
workspacesBox =
|
workspacesBox =
|
||||||
this._getWorkspacesBoxForState(currentState, ...workspaceParams);
|
this._getWorkspacesBoxForState(currentState, ...workspaceParams);
|
||||||
|
@ -759,14 +760,12 @@ const ExtraWorkspaceViewCommon = {
|
||||||
|
|
||||||
exposeWindows() {
|
exposeWindows() {
|
||||||
const adjustment = this._workspace._background._stateAdjustment;
|
const adjustment = this._workspace._background._stateAdjustment;
|
||||||
|
opt.WORKSPACE_MODE = 1;
|
||||||
if (adjustment.value === 0) {
|
if (adjustment.value === 0) {
|
||||||
adjustment.value = 0;
|
adjustment.value = 0;
|
||||||
adjustment.ease(1, {
|
adjustment.ease(1, {
|
||||||
duration: 200,
|
duration: 200,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
onComplete: () => {
|
|
||||||
opt.WORKSPACE_MODE = 1;
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -805,7 +804,7 @@ const WorkspacesDisplayCommon = {
|
||||||
upper: 0, // FitMode.SINGLE,
|
upper: 0, // FitMode.SINGLE,
|
||||||
}),
|
}),
|
||||||
this._overviewAdjustment);
|
this._overviewAdjustment);
|
||||||
Main.layoutManager.overviewGroup.add_actor(view);
|
Main.layoutManager.overviewGroup.add_child(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._workspacesViews.push(view);
|
this._workspacesViews.push(view);
|
||||||
|
@ -906,15 +905,15 @@ const WorkspacesDisplayCommon = {
|
||||||
break;
|
break;
|
||||||
case Clutter.KEY_space:
|
case Clutter.KEY_space:
|
||||||
if (Me.Util.isCtrlPressed() && Me.Util.isShiftPressed()) {
|
if (Me.Util.isCtrlPressed() && Me.Util.isShiftPressed()) {
|
||||||
Me.Util.activateSearchProvider(Me.ESP_PREFIX);
|
Me.Util.openPreferences();
|
||||||
} else if (Me.Util.isAltPressed()) {
|
} else if (Me.Util.isAltPressed()) {
|
||||||
Main.ctrlAltTabManager._items.forEach(i => {
|
Main.ctrlAltTabManager._items.forEach(i => {
|
||||||
if (i.sortGroup === 1 && i.name === 'Dash')
|
if (i.sortGroup === 1 && i.name === 'Dash')
|
||||||
Main.ctrlAltTabManager.focusGroup(i);
|
Main.ctrlAltTabManager.focusGroup(i);
|
||||||
});
|
});
|
||||||
} else if (opt.get('recentFilesSearchProviderModule') && Me.Util.isCtrlPressed()) {
|
} else if (Me.Util.getEnabledExtensions('extensions-search-provider').length && Me.Util.isCtrlPressed()) {
|
||||||
Me.Util.activateSearchProvider(Me.RFSP_PREFIX);
|
Me.Util.activateSearchProvider(Me.ESP_PREFIX);
|
||||||
} else if (opt.get('windowSearchProviderModule')) {
|
} else if (Me.Util.getEnabledExtensions('windows-search-provider').length) {
|
||||||
Me.Util.activateSearchProvider(Me.WSP_PREFIX);
|
Me.Util.activateSearchProvider(Me.WSP_PREFIX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -924,7 +923,7 @@ const WorkspacesDisplayCommon = {
|
||||||
case Clutter.KEY_Right:
|
case Clutter.KEY_Right:
|
||||||
case Clutter.KEY_Up:
|
case Clutter.KEY_Up:
|
||||||
case Clutter.KEY_Tab:
|
case Clutter.KEY_Tab:
|
||||||
if (Main.overview._overview._controls._searchController.searchActive) {
|
if (Main.overview.searchController.searchActive) {
|
||||||
Main.overview.searchEntry.grab_key_focus();
|
Main.overview.searchEntry.grab_key_focus();
|
||||||
} else if (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE && state === 1) {
|
} else if (opt.OVERVIEW_MODE2 && !opt.WORKSPACE_MODE && state === 1) {
|
||||||
// expose windows by "clicking" on ws thumbnail
|
// expose windows by "clicking" on ws thumbnail
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
"uuid": "vertical-workspaces@G-dH.github.com",
|
"uuid": "vertical-workspaces@G-dH.github.com",
|
||||||
"description": "Customize your GNOME Shell UX to suit your workflow, whether you like horizontally or vertically stacked workspaces.",
|
"description": "Customize your GNOME Shell UX to suit your workflow, whether you like horizontally or vertically stacked workspaces.",
|
||||||
"shell-version": [
|
"shell-version": [
|
||||||
"45"
|
"45",
|
||||||
|
"46"
|
||||||
],
|
],
|
||||||
"session-modes": [
|
"session-modes": [
|
||||||
"user",
|
"user",
|
||||||
|
@ -15,5 +16,7 @@
|
||||||
},
|
},
|
||||||
"gettext-domain": "vertical-workspaces",
|
"gettext-domain": "vertical-workspaces",
|
||||||
"settings-schema": "org.gnome.shell.extensions.vertical-workspaces",
|
"settings-schema": "org.gnome.shell.extensions.vertical-workspaces",
|
||||||
"version-name": "45.2"
|
"version-name": "46.1",
|
||||||
|
"version": 999
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
||||||
* prefs.js
|
* prefs.js
|
||||||
*
|
*
|
||||||
* @author GdH <G-dH@github.com>
|
* @author GdH <G-dH@github.com>
|
||||||
* @copyright 2022 - 2023
|
* @copyright 2022 - 2024
|
||||||
* @license GPL-3.0
|
* @license GPL-3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -26,43 +26,36 @@ export default class VShell extends ExtensionPreferences {
|
||||||
const itemFactory = new OptionsFactory.ItemFactory();
|
const itemFactory = new OptionsFactory.ItemFactory();
|
||||||
const pageList = [
|
const pageList = [
|
||||||
{
|
{
|
||||||
name: 'profiles',
|
|
||||||
title: _('Profiles'),
|
title: _('Profiles'),
|
||||||
iconName: 'open-menu-symbolic',
|
iconName: 'open-menu-symbolic',
|
||||||
optionList: this._getProfilesOptionList(itemFactory),
|
optionList: this._getProfilesOptionList(itemFactory),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'layout',
|
|
||||||
title: _('Layout'),
|
title: _('Layout'),
|
||||||
iconName: 'view-grid-symbolic',
|
iconName: 'view-grid-symbolic',
|
||||||
optionList: this._getLayoutOptionList(itemFactory),
|
optionList: this._getLayoutOptionList(itemFactory),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'appearance',
|
|
||||||
title: _('Appearance'),
|
title: _('Appearance'),
|
||||||
iconName: 'view-reveal-symbolic',
|
iconName: 'view-reveal-symbolic',
|
||||||
optionList: this._getAppearanceOptionList(itemFactory),
|
optionList: this._getAppearanceOptionList(itemFactory),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'behavior',
|
|
||||||
title: _('Behavior'),
|
title: _('Behavior'),
|
||||||
iconName: 'system-run-symbolic',
|
iconName: 'system-run-symbolic',
|
||||||
optionList: this._getBehaviorOptionList(itemFactory),
|
optionList: this._getBehaviorOptionList(itemFactory),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'modules',
|
|
||||||
title: _('Modules'),
|
title: _('Modules'),
|
||||||
iconName: 'application-x-addon-symbolic',
|
iconName: 'application-x-addon-symbolic',
|
||||||
optionList: this._getModulesOptionList(itemFactory),
|
optionList: this._getModulesOptionList(itemFactory),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'misc',
|
|
||||||
title: _('Misc'),
|
title: _('Misc'),
|
||||||
iconName: 'preferences-other-symbolic',
|
iconName: 'preferences-other-symbolic',
|
||||||
optionList: this._getMiscOptionList(itemFactory),
|
optionList: this._getMiscOptionList(itemFactory),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'about',
|
|
||||||
title: _('About'),
|
title: _('About'),
|
||||||
iconName: 'preferences-system-details-symbolic',
|
iconName: 'preferences-system-details-symbolic',
|
||||||
optionList: this._getAboutOptionList(itemFactory),
|
optionList: this._getAboutOptionList(itemFactory),
|
||||||
|
@ -153,14 +146,13 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Dash Position'),
|
_('Dash Position'),
|
||||||
null,
|
null,
|
||||||
// // itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'dashPosition',
|
'dashPosition',
|
||||||
[
|
[
|
||||||
[_('Top'), 0],
|
|
||||||
[_('Right'), 1],
|
|
||||||
[_('Bottom'), 2],
|
[_('Bottom'), 2],
|
||||||
[_('Left'), 3],
|
[_('Left'), 3],
|
||||||
|
[_('Top'), 0],
|
||||||
|
[_('Right'), 1],
|
||||||
[_('Hide'), 4],
|
[_('Hide'), 4],
|
||||||
],
|
],
|
||||||
'dashModule'
|
'dashModule'
|
||||||
|
@ -202,7 +194,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Show Apps Icon Position'),
|
_('Show Apps Icon Position'),
|
||||||
_('Sets the position of the "Show Applications" icon in the Dash'),
|
_('Sets the position of the "Show Applications" icon in the Dash'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'showAppsIconPosition',
|
'showAppsIconPosition',
|
||||||
[
|
[
|
||||||
|
@ -214,55 +205,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
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(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Workspace Thumbnails / Orientation')
|
_('Workspace Thumbnails / Orientation')
|
||||||
|
@ -273,7 +215,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Thumbnails Position / Workspaces Orientation'),
|
_('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.'),
|
_('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.newDropDown(),
|
||||||
'workspaceThumbnailsPosition',
|
'workspaceThumbnailsPosition',
|
||||||
// this mess is just because of backward compatibility
|
// this mess is just because of backward compatibility
|
||||||
|
@ -483,7 +424,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Main Panel Position'),
|
_('Main Panel Position'),
|
||||||
_('Allows to place the main panel at the bottom of the primary display'),
|
_('Allows to place the main panel at the bottom of the primary display'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'panelPosition',
|
'panelPosition',
|
||||||
[
|
[
|
||||||
|
@ -498,7 +438,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Main Panel Visibility'),
|
_('Main Panel Visibility'),
|
||||||
_('Allows to hide main panel when not needed'),
|
_('Allows to hide main panel when not needed'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'panelVisibility',
|
'panelVisibility',
|
||||||
[
|
[
|
||||||
|
@ -570,7 +509,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Notification Banner Position'),
|
_('Notification Banner Position'),
|
||||||
_('Choose where the notification banners appear on the screen'),
|
_('Choose where the notification banners appear on the screen'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'notificationPosition',
|
'notificationPosition',
|
||||||
[
|
[
|
||||||
|
@ -589,7 +527,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('OSD Popup Position'),
|
_('OSD Popup Position'),
|
||||||
_('Choose where the OSD pop-ups (like sound volume level) appear on the screen'),
|
_('Choose where the OSD pop-ups (like sound volume level) appear on the screen'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'osdPosition',
|
'osdPosition',
|
||||||
[
|
[
|
||||||
|
@ -616,7 +553,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Workspace Thumbnails Position'),
|
_('Workspace Thumbnails Position'),
|
||||||
_('Allows to place workspace thumbnails of secondary monitors on the opposite side than on the primary monitor'),
|
_('Allows to place workspace thumbnails of secondary monitors on the opposite side than on the primary monitor'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'secWsThumbnailsPosition',
|
'secWsThumbnailsPosition',
|
||||||
[
|
[
|
||||||
|
@ -684,8 +620,8 @@ export default class VShell extends ExtensionPreferences {
|
||||||
|
|
||||||
optionList.push(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Shift Workspace Preview by Panel Height'),
|
_('Shift Overview by Panel Height'),
|
||||||
_('This option can help align overview of the secondary monitor with the primary monitor'),
|
_('This option can help align the overview of the secondary monitor with the primary one'),
|
||||||
itemFactory.newSwitch(),
|
itemFactory.newSwitch(),
|
||||||
'secWsPreviewShift'
|
'secWsPreviewShift'
|
||||||
)
|
)
|
||||||
|
@ -712,7 +648,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Dash Max Icon Size'),
|
_('Dash Max Icon Size'),
|
||||||
_('Maximum size of Dash icons in pixels'),
|
_('Maximum size of Dash icons in pixels'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'dashMaxIconSize',
|
'dashMaxIconSize',
|
||||||
[
|
[
|
||||||
|
@ -732,7 +667,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Dash Background Style'),
|
_('Dash Background Style'),
|
||||||
_('Allows you to change the background color of the dash to match the search results an app folders'),
|
_('Allows you to change the background color of the dash to match the search results an app folders'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'dashBgColor',
|
'dashBgColor',
|
||||||
[
|
[
|
||||||
|
@ -796,7 +730,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Running App Indicator'),
|
_('Running App Indicator'),
|
||||||
_('Allows you to change style of the running app indicator under the app icon'),
|
_('Allows you to change style of the running app indicator under the app icon'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'runningDotStyle',
|
'runningDotStyle',
|
||||||
[
|
[
|
||||||
|
@ -817,7 +750,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Show Workspace Thumbnail Labels'),
|
_('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'),
|
_('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.newDropDown(),
|
||||||
'showWsTmbLabels',
|
'showWsTmbLabels',
|
||||||
[
|
[
|
||||||
|
@ -858,7 +790,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Window Preview App Icon Size'),
|
_('Window Preview App Icon Size'),
|
||||||
null,
|
null,
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'winPreviewIconSize',
|
'winPreviewIconSize',
|
||||||
[
|
[
|
||||||
|
@ -876,7 +807,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Window Title Position / Visibility'),
|
_('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'),
|
_('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(),
|
itemFactory.newDropDown(),
|
||||||
'winTitlePosition',
|
'winTitlePosition',
|
||||||
[
|
[
|
||||||
|
@ -943,7 +873,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Icon Size'),
|
_('Icon Size'),
|
||||||
_('Allows to set a fixed app grid icon size and bypass the default adaptive algorithm'),
|
_('Allows to set a fixed app grid icon size and bypass the default adaptive algorithm'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'appGridIconSize',
|
'appGridIconSize',
|
||||||
[
|
[
|
||||||
|
@ -971,7 +900,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Folder Icon Size'),
|
_('Folder Icon Size'),
|
||||||
_('Allows to set a fixed icon size and bypass the default adaptive algorithm in the open folder dialog'),
|
_('Allows to set a fixed icon size and bypass the default adaptive algorithm in the open folder dialog'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'appGridFolderIconSize',
|
'appGridFolderIconSize',
|
||||||
[
|
[
|
||||||
|
@ -1102,7 +1030,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('App Search Icon Size'),
|
_('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'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'searchIconSize',
|
'searchIconSize',
|
||||||
[
|
[
|
||||||
|
@ -1141,6 +1068,20 @@ export default class VShell extends ExtensionPreferences {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
optionList.push(
|
||||||
|
itemFactory.getRowWidget(
|
||||||
|
_('Highlighting'),
|
||||||
|
_('The GNOME default highlighting style (bold) causes strings to be "randomly" ellipsized, often preventing you from seeing the whole string, even if there is space for it. The selected style will be applied to all search results globally. If you are using other extensions that offer this option, make sure you set the same setting in all of them.'),
|
||||||
|
itemFactory.newDropDown(),
|
||||||
|
'highlightingStyle',
|
||||||
|
[
|
||||||
|
[_('Bold (Default)'), 0],
|
||||||
|
[_('Underline'), 1],
|
||||||
|
[_('None'), 2],
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
optionList.push(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
|
@ -1234,31 +1175,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
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;
|
return optionList;
|
||||||
}
|
}
|
||||||
// ----------------------------------------------------------------
|
// ----------------------------------------------------------------
|
||||||
|
@ -1276,7 +1192,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Overview Mode'),
|
_('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'),
|
_('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.newDropDown(),
|
||||||
'overviewMode',
|
'overviewMode',
|
||||||
[
|
[
|
||||||
|
@ -1291,7 +1206,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Startup State'),
|
_('Startup State'),
|
||||||
_('Allows to change the state in which GNOME Shell starts a session'),
|
_('Allows to change the state in which GNOME Shell starts a session'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'startupState',
|
'startupState',
|
||||||
[
|
[
|
||||||
|
@ -1306,7 +1220,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Escape Key Behavior'),
|
_('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'),
|
_('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(),
|
itemFactory.newDropDown(),
|
||||||
'overviewEscBehavior',
|
'overviewEscBehavior',
|
||||||
[
|
[
|
||||||
|
@ -1326,14 +1239,13 @@ export default class VShell extends ExtensionPreferences {
|
||||||
optionList.push(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Single-Press Action'),
|
_('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'),
|
_('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'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'overlayKeyPrimary',
|
'overlayKeyPrimary',
|
||||||
[
|
[
|
||||||
[_('Disable'), 0],
|
[_('Disable'), 0],
|
||||||
[_('Follow Global Overview Mode'), 1],
|
[_('Follow Global Overview Mode'), 1],
|
||||||
[_('Overview (Default)'), 2],
|
[_('Overview - Window Picker (Default)'), 2],
|
||||||
[_('Applications'), 3],
|
[_('Applications'), 3],
|
||||||
[_('Overview - Static WS Preview'), 4],
|
[_('Overview - Static WS Preview'), 4],
|
||||||
[_('Overview - Static Workspace'), 5],
|
[_('Overview - Static Workspace'), 5],
|
||||||
|
@ -1347,8 +1259,7 @@ export default class VShell extends ExtensionPreferences {
|
||||||
optionList.push(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Double-Press Action'),
|
_('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'),
|
_('Disable or change behavior when you double-press the Super key. The "Search Windows" option requires the "WSP (Window Search Provider)" extension installed and enabled. 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(),
|
itemFactory.newDropDown(),
|
||||||
'overlayKeySecondary',
|
'overlayKeySecondary',
|
||||||
[
|
[
|
||||||
|
@ -1372,7 +1283,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Hot Corner Action'),
|
_('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'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'hotCornerAction',
|
'hotCornerAction',
|
||||||
[
|
[
|
||||||
|
@ -1392,7 +1302,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Hot Corner Position'),
|
_('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'),
|
_('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(),
|
itemFactory.newDropDown(),
|
||||||
'hotCornerPosition',
|
'hotCornerPosition',
|
||||||
[
|
[
|
||||||
|
@ -1451,7 +1360,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('App Icon - Click Behavior'),
|
_('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'),
|
_('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(),
|
itemFactory.newDropDown(),
|
||||||
'dashShowWindowsBeforeActivation',
|
'dashShowWindowsBeforeActivation',
|
||||||
[
|
[
|
||||||
|
@ -1468,7 +1376,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('App Icon - Scroll Action'),
|
_('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'),
|
_('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.newDropDown(),
|
||||||
'dashIconScroll',
|
'dashIconScroll',
|
||||||
[
|
[
|
||||||
|
@ -1484,7 +1391,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Search Windows Icon - Scroll Action'),
|
_('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.'),
|
_('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.newDropDown(),
|
||||||
'searchWindowsIconScroll',
|
'searchWindowsIconScroll',
|
||||||
[
|
[
|
||||||
|
@ -1506,7 +1412,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Close Workspace Button'),
|
_('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'),
|
_('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.newDropDown(),
|
||||||
'closeWsButtonMode',
|
'closeWsButtonMode',
|
||||||
[
|
[
|
||||||
|
@ -1528,14 +1433,13 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Secondary Button Click Action'),
|
_('Secondary Button Click Action'),
|
||||||
_('Allows you to add a secondary mouse click action to the window preview'),
|
_('Allows you to add a secondary mouse click action to the window preview'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'winPreviewSecBtnAction',
|
'winPreviewSecBtnAction',
|
||||||
[
|
[
|
||||||
[_('Activate Window (Default)'), 0],
|
[_('Activate Window (Default)'), 0],
|
||||||
[_('Close Window'), 1],
|
[_('Close Window'), 1],
|
||||||
[_('Search For Same App Windows'), 2],
|
[_('Search For Same App Windows'), 2],
|
||||||
[_('Create Window Thumbnail - PIP'), 3],
|
[_('Create Window Thumbnail/PiP (requires WTMB extension)'), 3],
|
||||||
],
|
],
|
||||||
'windowPreviewModule'
|
'windowPreviewModule'
|
||||||
)
|
)
|
||||||
|
@ -1545,14 +1449,13 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Middle Button Click Action'),
|
_('Middle Button Click Action'),
|
||||||
_('Allows you to add a middle mouse click action to the window preview'),
|
_('Allows you to add a middle mouse click action to the window preview'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'winPreviewMidBtnAction',
|
'winPreviewMidBtnAction',
|
||||||
[
|
[
|
||||||
[_('Activate Window (Default)'), 0],
|
[_('Activate Window (Default)'), 0],
|
||||||
[_('Close Window'), 1],
|
[_('Close Window'), 1],
|
||||||
[_('Search For Same App Windows'), 2],
|
[_('Search For Same App Windows'), 2],
|
||||||
[_('Create Window Thumbnail - PIP'), 3],
|
[_('Create Window Thumbnail/PiP (requires WTMB extension)'), 3],
|
||||||
],
|
],
|
||||||
'windowPreviewModule'
|
'windowPreviewModule'
|
||||||
)
|
)
|
||||||
|
@ -1562,13 +1465,12 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('App Icon Click Action'),
|
_('App Icon Click Action'),
|
||||||
_('Select the action to take when the application icon on the window preview is clicked'),
|
_('Select the action to take when the application icon on the window preview is clicked'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'windowIconClickAction',
|
'windowIconClickAction',
|
||||||
[
|
[
|
||||||
[_('Activate Window (Default)'), 0],
|
[_('Activate Window (Default)'), 0],
|
||||||
[_('Search For Same App Windows'), 1],
|
[_('Search For Same App Windows'), 1],
|
||||||
[_('Create Window Thumbnail - PIP'), 2],
|
[_('Create Window Thumbnail/PiP (requires WTMB extension)'), 2],
|
||||||
],
|
],
|
||||||
'windowPreviewModule'
|
'windowPreviewModule'
|
||||||
)
|
)
|
||||||
|
@ -1595,7 +1497,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('App Grid Order'),
|
_('App Grid Order'),
|
||||||
_('Choose sorting method for the app grid. Note that sorting by usage ignores folders'),
|
_('Choose sorting method for the app grid. Note that sorting by usage ignores folders'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'appGridOrder',
|
'appGridOrder',
|
||||||
[
|
[
|
||||||
|
@ -1612,7 +1513,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('App Folder Order'),
|
_('App Folder Order'),
|
||||||
_('Choose sorting method for app folders'),
|
_('Choose sorting method for app folders'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'appFolderOrder',
|
'appFolderOrder',
|
||||||
[
|
[
|
||||||
|
@ -1628,7 +1528,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('App Grid Content'),
|
_('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'),
|
_('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.newDropDown(),
|
||||||
'appGridContent',
|
'appGridContent',
|
||||||
[
|
[
|
||||||
|
@ -1679,7 +1578,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('App Labels Behavior'),
|
_('App Labels Behavior'),
|
||||||
_('Choose how and when to display app names'),
|
_('Choose how and when to display app names'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'appGridNamesMode',
|
'appGridNamesMode',
|
||||||
[
|
[
|
||||||
|
@ -1716,42 +1614,15 @@ export default class VShell extends ExtensionPreferences {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
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(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Enable Fuzzy Match'),
|
_('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'),
|
_('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, Windows, Extensions and Recent files search providers'),
|
||||||
itemFactory.newSwitch(),
|
itemFactory.newSwitch(),
|
||||||
'searchFuzzy'
|
'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(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Animations - General')
|
_('Animations - General')
|
||||||
|
@ -1786,7 +1657,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('App Grid Animation'),
|
_('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'),
|
_('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.newDropDown(),
|
||||||
'appGridAnimation',
|
'appGridAnimation',
|
||||||
[
|
[
|
||||||
|
@ -1804,7 +1674,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Search View Animation'),
|
_('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.'),
|
_('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.newDropDown(),
|
||||||
'searchViewAnimation',
|
'searchViewAnimation',
|
||||||
[
|
[
|
||||||
|
@ -1823,7 +1692,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Workspace Preview Animation'),
|
_('Workspace Preview Animation'),
|
||||||
_('When entering / leaving the App Grid / Search view, the workspace preview can animate to/from workspace thumbnail.'),
|
_('When entering / leaving the App Grid / Search view, the workspace preview can animate to/from workspace thumbnail.'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'workspaceAnimation',
|
'workspaceAnimation',
|
||||||
[
|
[
|
||||||
|
@ -1862,7 +1730,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Workspace Switcher Animation'),
|
_('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.'),
|
_('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.newDropDown(),
|
||||||
'workspaceSwitcherAnimation',
|
'workspaceSwitcherAnimation',
|
||||||
[
|
[
|
||||||
|
@ -1873,11 +1740,24 @@ export default class VShell extends ExtensionPreferences {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
optionList.push(
|
||||||
|
itemFactory.getRowWidget(
|
||||||
|
_('Workspace Switcher Mode (Isolate Monitors)'),
|
||||||
|
_('Note that this is a workaround, not full-fledged feature. GNOME Shell does not support separate workspaces for each monitor, so V-Shell switches workspaces only on the primary monitor and moves windows across workspaces on secondary monitors in order to simulate independent behavior. The current monitor is determined by the position of the mouse pointer'),
|
||||||
|
itemFactory.newDropDown(),
|
||||||
|
'wsSwitcherMode',
|
||||||
|
[
|
||||||
|
[_('Default'), 0],
|
||||||
|
[_('Current Monitor'), 1],
|
||||||
|
],
|
||||||
|
'windowManagerModule'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
optionList.push(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Workspace Switcher Popup Mode'),
|
_('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.'),
|
_('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.newDropDown(),
|
||||||
'wsSwPopupMode',
|
'wsSwPopupMode',
|
||||||
[
|
[
|
||||||
|
@ -1899,7 +1779,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Window Attention Handler'),
|
_('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'),
|
_('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.newDropDown(),
|
||||||
'windowAttentionMode',
|
'windowAttentionMode',
|
||||||
[
|
[
|
||||||
|
@ -1915,7 +1794,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Favorites'),
|
_('Favorites'),
|
||||||
_('Disable pin/unpin app notifications'),
|
_('Disable pin/unpin app notifications'),
|
||||||
// itemFactory.newComboBox(),
|
|
||||||
itemFactory.newDropDown(),
|
itemFactory.newDropDown(),
|
||||||
'favoritesNotify',
|
'favoritesNotify',
|
||||||
[
|
[
|
||||||
|
@ -1941,28 +1819,25 @@ export default class VShell extends ExtensionPreferences {
|
||||||
|
|
||||||
optionList.push(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('WindowSearchProvider'),
|
_('Windows Search Provider - Moved from V-Shell to the standalone "WSP" extension'),
|
||||||
_('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'),
|
_('NOTE: This module has been released as a standalone extension with new features, click to learn more. Related V-Shell options are still available if you install the WSP extension.\n\nWSP adds adds open windows to the search results. You can search app names and window titles. You can also use "wq//" or custom prefix (also by pressing the Space hotkey in the overview, or clicking dash icon) to suppress results from other search providers'),
|
||||||
itemFactory.newSwitch(),
|
itemFactory.newLinkButton('https://github.com/G-dH/windows-search-provider?tab=readme-ov-file#wsp-windows-search-provider')
|
||||||
'windowSearchProviderModule'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
optionList.push(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('RecentFilesSearchProvider'),
|
_('Extensions Search Provider - Moved from V-Shell to the standalone "ESP" extension'),
|
||||||
_('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'),
|
_('NOTE: This module has been released as a standalone extension with new features, click to learn more. Related V-Shell options are still available if you install the ESP extension.\n\nESP adds extensions to the search results. You can also use "eq//" or custom 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(),
|
itemFactory.newLinkButton('https://github.com/G-dH/extensions-search-provider?tab=readme-ov-file#esp-extensions-search-provider')
|
||||||
'recentFilesSearchProviderModule'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
optionList.push(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('ExtensionsSearchProvider'),
|
_('Window Thumbnails (PiP) - Moved from V-Shell to the standalone "WTMB" extension'),
|
||||||
_('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'),
|
_('NOTE: This module has been released as a standalone extension with new features, click to learn more. Related V-Shell options are still available if you install the WTMB extension.\n\nWTMB allows the creation of Picture-in-Picture like window thumbnails that you can use for monitoring of windows on another workspace'),
|
||||||
itemFactory.newSwitch(),
|
itemFactory.newLinkButton('https://github.com/G-dH/window-thumbnails?tab=readme-ov-file#wtmb-window-thumbnails')
|
||||||
'extensionsSearchProviderModule'
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -2092,15 +1967,6 @@ export default class VShell extends ExtensionPreferences {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
optionList.push(
|
|
||||||
itemFactory.getRowWidget(
|
|
||||||
_('WindowThumbnail'),
|
|
||||||
_('Create Window Thumbnail (PIP) option in the app icon menu and window preview actions'),
|
|
||||||
itemFactory.newSwitch(),
|
|
||||||
'windowThumbnailModule'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
optionList.push(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('Workspace'),
|
_('Workspace'),
|
||||||
|
@ -2122,7 +1988,7 @@ export default class VShell extends ExtensionPreferences {
|
||||||
optionList.push(
|
optionList.push(
|
||||||
itemFactory.getRowWidget(
|
itemFactory.getRowWidget(
|
||||||
_('WorkspaceSwitcherPopup'),
|
_('WorkspaceSwitcherPopup'),
|
||||||
_('Workspace switcher popup position options'),
|
_('Workspace switcher popup orientation and position options'),
|
||||||
itemFactory.newSwitch(),
|
itemFactory.newSwitch(),
|
||||||
'workspaceSwitcherPopupModule'
|
'workspaceSwitcherPopupModule'
|
||||||
)
|
)
|
||||||
|
@ -2196,6 +2062,15 @@ export default class VShell extends ExtensionPreferences {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
optionList.push(
|
||||||
|
itemFactory.getRowWidget(
|
||||||
|
_('Fix New Window Not On Current Monitor (experimental)'),
|
||||||
|
_('If you use multiple monitors, you may encounter the issue of new windows opening on a different monitor than expected. This option moves those windows to the current monitor, determined by the position of the mouse pointer. However, this is a workaround, and some windows may override it, moving the window back to the previous monitor during initialization'),
|
||||||
|
itemFactory.newSwitch(),
|
||||||
|
'newWindowMonitorFix'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
return optionList;
|
return optionList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2218,7 +2093,7 @@ export default class VShell extends ExtensionPreferences {
|
||||||
|
|
||||||
optionList.push(itemFactory.getRowWidget(
|
optionList.push(itemFactory.getRowWidget(
|
||||||
_('Reset all options'),
|
_('Reset all options'),
|
||||||
_('Set all options to default values.'),
|
_('Reset all options to their default values'),
|
||||||
itemFactory.newOptionsResetButton()
|
itemFactory.newOptionsResetButton()
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -2253,7 +2128,7 @@ export default class VShell extends ExtensionPreferences {
|
||||||
|
|
||||||
optionList.push(itemFactory.getRowWidget(
|
optionList.push(itemFactory.getRowWidget(
|
||||||
_('Buy Me a Coffee'),
|
_('Buy Me a Coffee'),
|
||||||
_('If you like V-Shell, you can help me with my coffee expenses'),
|
_('Enjoying V-Shell? Consider supporting it by buying me a coffee!'),
|
||||||
itemFactory.newLinkButton('https://buymeacoffee.com/georgdh')
|
itemFactory.newLinkButton('https://buymeacoffee.com/georgdh')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<default>350</default>
|
<default>350</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="ws-preview-scale">
|
<key type="i" name="ws-preview-scale">
|
||||||
<default>95</default>
|
<default>100</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="secondary-ws-preview-scale">
|
<key type="i" name="secondary-ws-preview-scale">
|
||||||
<default>100</default>
|
<default>100</default>
|
||||||
|
@ -23,13 +23,13 @@
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="dash-position">
|
<key type="i" name="dash-position">
|
||||||
<default>2</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-position-adjust">
|
|
||||||
<default>0</default>
|
<default>0</default>
|
||||||
</key>
|
</key>
|
||||||
|
<key type="i" name="dash-position-adjust">
|
||||||
|
<default>-100</default>
|
||||||
|
</key>
|
||||||
<key type="i" name="show-app-icon-position">
|
<key type="i" name="show-app-icon-position">
|
||||||
<default>1</default>
|
<default>0</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="dash-show-windows-icon">
|
<key type="i" name="dash-show-windows-icon">
|
||||||
<default>1</default>
|
<default>1</default>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<default>1</default>
|
<default>1</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="wst-position-adjust">
|
<key type="i" name="wst-position-adjust">
|
||||||
<default>0</default>
|
<default>-100</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="show-wst-labels">
|
<key type="i" name="show-wst-labels">
|
||||||
<default>3</default>
|
<default>3</default>
|
||||||
|
@ -80,10 +80,10 @@
|
||||||
<default>48</default>
|
<default>48</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="dash-bg-opacity">
|
<key type="i" name="dash-bg-opacity">
|
||||||
<default>85</default>
|
<default>20</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="dash-bg-color">
|
<key type="i" name="dash-bg-color">
|
||||||
<default>0</default>
|
<default>1</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="dash-bg-radius">
|
<key type="i" name="dash-bg-radius">
|
||||||
<default>18</default>
|
<default>18</default>
|
||||||
|
@ -98,10 +98,10 @@
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="show-ws-switcher-bg">
|
<key type="b" name="show-ws-switcher-bg">
|
||||||
<default>true</default>
|
<default>false</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="show-ws-preview-bg">
|
<key type="b" name="show-ws-preview-bg">
|
||||||
<default>false</default>
|
<default>true</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="ws-preview-bg-radius">
|
<key type="i" name="ws-preview-bg-radius">
|
||||||
<default>30</default>
|
<default>30</default>
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="overview-bg-blur-sigma">
|
<key type="i" name="overview-bg-blur-sigma">
|
||||||
<default>0</default>
|
<default>30</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="app-grid-bg-blur-sigma">
|
<key type="i" name="app-grid-bg-blur-sigma">
|
||||||
<default>40</default>
|
<default>40</default>
|
||||||
|
@ -136,6 +136,9 @@
|
||||||
<key type="i" name="workspace-switcher-animation">
|
<key type="i" name="workspace-switcher-animation">
|
||||||
<default>1</default>
|
<default>1</default>
|
||||||
</key>
|
</key>
|
||||||
|
<key type="i" name="ws-switcher-mode">
|
||||||
|
<default>0</default>
|
||||||
|
</key>
|
||||||
<key type="i" name="animation-speed-factor">
|
<key type="i" name="animation-speed-factor">
|
||||||
<default>100</default>
|
<default>100</default>
|
||||||
</key>
|
</key>
|
||||||
|
@ -146,7 +149,7 @@
|
||||||
<default>0</default>
|
<default>0</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="startup-state">
|
<key type="i" name="startup-state">
|
||||||
<default>2</default>
|
<default>0</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="overview-mode">
|
<key type="i" name="overview-mode">
|
||||||
<default>0</default>
|
<default>0</default>
|
||||||
|
@ -266,7 +269,7 @@
|
||||||
<default>1</default>
|
<default>1</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="hot-corner-position">
|
<key type="i" name="hot-corner-position">
|
||||||
<default>6</default>
|
<default>0</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="hot-corner-fullscreen">
|
<key type="b" name="hot-corner-fullscreen">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
|
@ -278,7 +281,7 @@
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="win-preview-sec-mouse-btn-action">
|
<key type="i" name="win-preview-sec-mouse-btn-action">
|
||||||
<default>2</default>
|
<default>3</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="win-preview-mid-mouse-btn-action">
|
<key type="i" name="win-preview-mid-mouse-btn-action">
|
||||||
<default>0</default>
|
<default>0</default>
|
||||||
|
@ -301,11 +304,14 @@
|
||||||
<key type="b" name="new-window-focus-fix">
|
<key type="b" name="new-window-focus-fix">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
</key>
|
</key>
|
||||||
|
<key type="b" name="new-window-monitor-fix">
|
||||||
|
<default>false</default>
|
||||||
|
</key>
|
||||||
<key type="b" name="app-grid-performance">
|
<key type="b" name="app-grid-performance">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="window-thumbnail-scale">
|
<key name='highlighting-style' type='i'>
|
||||||
<default>15</default>
|
<default>1</default>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<key type="b" name="workspace-switcher-popup-module">
|
<key type="b" name="workspace-switcher-popup-module">
|
||||||
|
@ -326,9 +332,6 @@
|
||||||
<key type="b" name="win-attention-handler-module">
|
<key type="b" name="win-attention-handler-module">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="window-thumbnail-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="swipe-tracker-module">
|
<key type="b" name="swipe-tracker-module">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
</key>
|
</key>
|
||||||
|
@ -362,15 +365,9 @@
|
||||||
<key type="b" name="app-favorites-module">
|
<key type="b" name="app-favorites-module">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="window-search-provider-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="recent-files-search-provider-module">
|
<key type="b" name="recent-files-search-provider-module">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="extensions-search-provider-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key type="b" name="aaa-loading-profile">
|
<key type="b" name="aaa-loading-profile">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
|
@ -380,28 +377,504 @@
|
||||||
<default>""</default>
|
<default>""</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="a{ss}" name="profile-data-1">
|
<key type="a{ss}" name="profile-data-1">
|
||||||
<default>{'workspaceThumbnailsPosition': '1', 'wsMaxSpacing': '350', 'wsPreviewScale': '95', 'secWsPreviewScale': '100', 'secWsPreviewShift': 'false', 'wsThumbnailsFull': 'false', 'secWsThumbnailsPosition': '2', 'dashPosition': '3', 'dashPositionAdjust': '0', 'wsTmbPositionAdjust': '-80', 'showWsTmbLabels': '3', 'showWsTmbLabelsOnHover': 'false', 'closeWsButtonMode': '2', 'secWsTmbPositionAdjust': '-80', 'dashMaxIconSize': '64', 'dashShowWindowsIcon': '2', 'dashShowRecentFilesIcon': '2', 'dashShowExtensionsIcon': '2', 'centerDashToWs': 'false', 'showAppsIconPosition': '1', 'wsThumbnailScale': '13', 'wsThumbnailScaleAppGrid': '13', 'secWsThumbnailScale': '13', 'showSearchEntry': 'true', 'centerSearch': 'true', 'centerAppGrid': 'true', 'dashBgOpacity': '80', 'dashBgColor': '0', 'dashBgRadius': '0', 'dashBgGS3Style': 'true', 'runningDotStyle': '1', 'enablePageShortcuts': 'false', 'showWsSwitcherBg': 'true', 'showWsPreviewBg': 'false', 'wsPreviewBgRadius': '30', 'showBgInOverview': 'true', 'overviewBgBrightness': '30', 'searchBgBrightness': '30', 'overviewBgBlurSigma': '0', 'appGridBgBlurSigma': '40', 'smoothBlurTransitions': 'false', 'appGridAnimation': '4', 'searchViewAnimation': '0', 'workspaceAnimation': '1', 'animationSpeedFactor': '100', 'winPreviewIconSize': '1', 'winTitlePosition': '0', 'startupState': '0', 'overviewMode': '0', 'workspaceSwitcherAnimation': '1', 'searchIconSize': '96', 'searchViewScale': '104', 'appGridIconSize': '-1', 'appGridColumns': '0', 'appGridRows': '0', 'appGridFolderIconSize': '-1', 'appGridFolderColumns': '0', 'appGridFolderRows': '0', 'appGridFolderIconGrid': '2', 'appGridContent': '2', 'appGridIncompletePages': 'false', 'appGridOrder': '0', 'appFolderOrder': '0', 'appGridNamesMode': '1', 'appGridActivePreview': 'false', 'appGridFolderCenter': 'false', 'appGridPageWidthScale': '100', 'appGridSpacing': '12', 'searchWindowsOrder': '1', 'searchFuzzy': 'false', 'searchMaxResultsRows': '5', 'dashShowWindowsBeforeActivation': '1', 'dashIconScroll': '1', 'dashIsolateWorkspaces': 'false', 'searchWindowsIconScroll': '1', 'panelVisibility': '0', 'panelPosition': '0', 'windowAttentionMode': '0', 'wsSwPopupHPosition': '50', 'wsSwPopupVPosition': '95', 'wsSwPopupMode': '1', 'wsSwitcherWraparound': 'false', 'wsSwitcherIgnoreLast': 'false', 'favoritesNotify': '1', 'notificationPosition': '1', 'osdPosition': '6', 'hotCornerAction': '1', 'hotCornerPosition': '0', 'hotCornerFullscreen': 'true', 'hotCornerRipples': 'true', 'alwaysActivateSelectedWindow': 'false', 'winPreviewSecBtnAction': '3', 'winPreviewMidBtnAction': '1', 'winPreviewShowCloseButton': 'true', 'windowIconClickAction': '1', 'overlayKeyPrimary': '1', 'overlayKeySecondary': '1', 'overviewEscBehavior': '0', 'newWindowFocusFix': 'false', 'appGridPerformance': 'true', 'windowThumbnailScale': '20', 'workspaceSwitcherPopupModule': 'true', 'workspaceAnimationModule': 'true', 'workspaceModule': 'true', 'windowManagerModule': 'true', 'windowPreviewModule': 'true', 'windowAttentionHandlerModule': 'true', 'windowThumbnailModule': 'true', 'swipeTrackerModule': 'true', 'searchControllerModule': 'true', 'searchModule': 'true', 'panelModule': 'true', 'overlayKeyModule': 'true', 'osdWindowModule': 'true', 'messageTrayModule': 'true', 'layoutModule': 'true', 'dashModule': 'true', 'appFavoritesModule': 'true', 'appDisplayModule': 'true', 'windowSearchProviderModule': 'true', 'extensionsSearchProviderModule': 'true'}</default>
|
<default>{
|
||||||
|
'workspaceThumbnailsPosition': '1',
|
||||||
|
'wsMaxSpacing': '350',
|
||||||
|
'wsPreviewScale': '95',
|
||||||
|
'secWsPreviewScale': '100',
|
||||||
|
'secWsPreviewShift': 'false',
|
||||||
|
'wsThumbnailsFull': 'false',
|
||||||
|
'secWsThumbnailsPosition': '2',
|
||||||
|
'dashPosition': '3',
|
||||||
|
'dashPositionAdjust': '0',
|
||||||
|
'wsTmbPositionAdjust': '-80',
|
||||||
|
'showWsTmbLabels': '3',
|
||||||
|
'showWsTmbLabelsOnHover': 'false',
|
||||||
|
'closeWsButtonMode': '2',
|
||||||
|
'secWsTmbPositionAdjust': '-80',
|
||||||
|
'dashMaxIconSize': '64',
|
||||||
|
'centerDashToWs': 'false',
|
||||||
|
'showAppsIconPosition': '1',
|
||||||
|
'wsThumbnailScale': '13',
|
||||||
|
'wsThumbnailScaleAppGrid': '13',
|
||||||
|
'secWsThumbnailScale': '13',
|
||||||
|
'showSearchEntry': 'true',
|
||||||
|
'centerSearch': 'true',
|
||||||
|
'centerAppGrid': 'true',
|
||||||
|
'dashBgOpacity': '80',
|
||||||
|
'dashBgColor': '0',
|
||||||
|
'dashBgRadius': '0',
|
||||||
|
'dashBgGS3Style': 'true',
|
||||||
|
'runningDotStyle': '1',
|
||||||
|
'enablePageShortcuts': 'false',
|
||||||
|
'showWsSwitcherBg': 'true',
|
||||||
|
'showWsPreviewBg': 'false',
|
||||||
|
'wsPreviewBgRadius': '30',
|
||||||
|
'showBgInOverview': 'true',
|
||||||
|
'overviewBgBrightness': '30',
|
||||||
|
'searchBgBrightness': '30',
|
||||||
|
'overviewBgBlurSigma': '0',
|
||||||
|
'appGridBgBlurSigma': '40',
|
||||||
|
'smoothBlurTransitions': 'false',
|
||||||
|
'appGridAnimation': '4',
|
||||||
|
'searchViewAnimation': '0',
|
||||||
|
'workspaceAnimation': '1',
|
||||||
|
'animationSpeedFactor': '100',
|
||||||
|
'winPreviewIconSize': '1',
|
||||||
|
'winTitlePosition': '0',
|
||||||
|
'startupState': '0',
|
||||||
|
'overviewMode': '0',
|
||||||
|
'wsSwitcherMode': '0',
|
||||||
|
'workspaceSwitcherAnimation': '1',
|
||||||
|
'searchIconSize': '96',
|
||||||
|
'searchViewScale': '104',
|
||||||
|
'appGridIconSize': '-1',
|
||||||
|
'appGridColumns': '0',
|
||||||
|
'appGridRows': '0',
|
||||||
|
'appGridFolderIconSize': '-1',
|
||||||
|
'appGridFolderColumns': '0',
|
||||||
|
'appGridFolderRows': '0',
|
||||||
|
'appGridFolderIconGrid': '2',
|
||||||
|
'appGridContent': '2',
|
||||||
|
'appGridIncompletePages': 'false',
|
||||||
|
'appGridOrder': '0',
|
||||||
|
'appFolderOrder': '0',
|
||||||
|
'appGridNamesMode': '1',
|
||||||
|
'appGridActivePreview': 'false',
|
||||||
|
'appGridFolderCenter': 'false',
|
||||||
|
'appGridPageWidthScale': '100',
|
||||||
|
'appGridSpacing': '12',
|
||||||
|
'searchWindowsOrder': '1',
|
||||||
|
'searchFuzzy': 'false',
|
||||||
|
'searchMaxResultsRows': '5',
|
||||||
|
'dashShowWindowsBeforeActivation': '1',
|
||||||
|
'dashIconScroll': '1',
|
||||||
|
'dashIsolateWorkspaces': 'false',
|
||||||
|
'searchWindowsIconScroll': '1',
|
||||||
|
'panelVisibility': '0',
|
||||||
|
'panelPosition': '0',
|
||||||
|
'windowAttentionMode': '0',
|
||||||
|
'wsSwPopupHPosition': '50',
|
||||||
|
'wsSwPopupVPosition': '95',
|
||||||
|
'wsSwPopupMode': '1',
|
||||||
|
'wsSwitcherWraparound': 'false',
|
||||||
|
'wsSwitcherIgnoreLast': 'false',
|
||||||
|
'favoritesNotify': '1',
|
||||||
|
'notificationPosition': '1',
|
||||||
|
'osdPosition': '6',
|
||||||
|
'hotCornerAction': '1',
|
||||||
|
'hotCornerPosition': '0',
|
||||||
|
'hotCornerFullscreen': 'true',
|
||||||
|
'hotCornerRipples': 'true',
|
||||||
|
'alwaysActivateSelectedWindow': 'false',
|
||||||
|
'winPreviewSecBtnAction': '3',
|
||||||
|
'winPreviewMidBtnAction': '1',
|
||||||
|
'winPreviewShowCloseButton': 'true',
|
||||||
|
'windowIconClickAction': '1',
|
||||||
|
'overlayKeyPrimary': '1',
|
||||||
|
'overlayKeySecondary': '1',
|
||||||
|
'overviewEscBehavior': '0',
|
||||||
|
'newWindowFocusFix': 'false',
|
||||||
|
'newWindowMonitorFix': '0',
|
||||||
|
'appGridPerformance': 'true',
|
||||||
|
'highlightingStyle': '1',
|
||||||
|
|
||||||
|
'workspaceSwitcherPopupModule': 'true',
|
||||||
|
'workspaceAnimationModule': 'true',
|
||||||
|
'workspaceModule': 'true',
|
||||||
|
'windowManagerModule': 'true',
|
||||||
|
'windowPreviewModule': 'true',
|
||||||
|
'windowAttentionHandlerModule': 'true',
|
||||||
|
'swipeTrackerModule': 'true',
|
||||||
|
'searchControllerModule': 'true',
|
||||||
|
'searchModule': 'true',
|
||||||
|
'panelModule': 'true',
|
||||||
|
'overlayKeyModule': 'true',
|
||||||
|
'osdWindowModule': 'true',
|
||||||
|
'messageTrayModule': 'true',
|
||||||
|
'layoutModule': 'true',
|
||||||
|
'dashModule': 'true',
|
||||||
|
'appFavoritesModule': 'true',
|
||||||
|
'appDisplayModule': 'true'
|
||||||
|
}</default>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<key type="s" name="profile-name-2">
|
<key type="s" name="profile-name-2">
|
||||||
<default>""</default>
|
<default>""</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="a{ss}" name="profile-data-2">
|
<key type="a{ss}" name="profile-data-2">
|
||||||
<default>{'workspaceThumbnailsPosition': '5', 'wsMaxSpacing': '80', 'wsPreviewScale': '100', 'secWsPreviewScale': '100', 'secWsPreviewShift': 'false', 'wsThumbnailsFull': 'false', 'secWsThumbnailsPosition': '2', 'dashPosition': '2', 'dashPositionAdjust': '0', 'wsTmbPositionAdjust': '0', 'showWsTmbLabels': '0', 'showWsTmbLabelsOnHover': 'false', 'closeWsButtonMode': '2', 'secWsTmbPositionAdjust': '0', 'dashMaxIconSize': '64', 'dashShowWindowsIcon': '2', 'dashShowRecentFilesIcon': '2', 'dashShowExtensionsIcon': '2', 'centerDashToWs': 'false', 'showAppsIconPosition': '1', 'wsThumbnailScale': '5', 'wsThumbnailScaleAppGrid': '15', 'secWsThumbnailScale': '5', 'showSearchEntry': 'true', 'centerSearch': 'true', 'centerAppGrid': 'true', 'dashBgOpacity': '20', 'dashBgColor': '1', 'dashBgRadius': '0', 'dashBgGS3Style': 'false', 'runningDotStyle': '1', 'enablePageShortcuts': 'true', 'showWsSwitcherBg': 'false', 'showWsPreviewBg': 'true', 'wsPreviewBgRadius': '30', 'showBgInOverview': 'true', 'overviewBgBrightness': '50', 'searchBgBrightness': '30', 'overviewBgBlurSigma': '50', 'appGridBgBlurSigma': '40', 'smoothBlurTransitions': 'false', 'appGridAnimation': '4', 'searchViewAnimation': '4', 'workspaceAnimation': '1', 'animationSpeedFactor': '100', 'winPreviewIconSize': '1', 'winTitlePosition': '0', 'startupState': '0', 'overviewMode': '0', 'workspaceSwitcherAnimation': '0', 'searchIconSize': '96', 'searchViewScale': '104', 'appGridIconSize': '-1', 'appGridColumns': '0', 'appGridRows': '0', 'appGridFolderIconSize': '-1', 'appGridFolderColumns': '0', 'appGridFolderRows': '0', 'appGridFolderIconGrid': '2', 'appGridContent': '2', 'appGridIncompletePages': 'false', 'appGridOrder': '0', 'appFolderOrder': '0', 'appGridNamesMode': '1', 'appGridActivePreview': 'false', 'appGridFolderCenter': 'true', 'appGridPageWidthScale': '90', 'appGridSpacing': '12', 'searchWindowsOrder': '1', 'searchFuzzy': 'false', 'searchMaxResultsRows': '5', 'dashShowWindowsBeforeActivation': '1', 'dashIconScroll': '1', 'dashIsolateWorkspaces': 'false', 'searchWindowsIconScroll': '1', 'panelVisibility': '0', 'panelPosition': '0', 'windowAttentionMode': '0', 'wsSwPopupHPosition': '50', 'wsSwPopupVPosition': '95', 'wsSwPopupMode': '1', 'wsSwitcherWraparound': 'false', 'wsSwitcherIgnoreLast': 'false', 'favoritesNotify': '1', 'notificationPosition': '1', 'osdPosition': '6', 'hotCornerAction': '1', 'hotCornerPosition': '6', 'hotCornerFullscreen': 'true', 'hotCornerRipples': 'false', 'alwaysActivateSelectedWindow': 'false', 'winPreviewSecBtnAction': '2', 'winPreviewMidBtnAction': '1', 'winPreviewShowCloseButton': 'true', 'windowIconClickAction': '1', 'overlayKeyPrimary': '1', 'overlayKeySecondary': '1', 'overviewEscBehavior': '0', 'newWindowFocusFix': 'false', 'appGridPerformance': 'true', 'windowThumbnailScale': '20', 'workspaceSwitcherPopupModule': 'true', 'workspaceAnimationModule': 'true', 'workspaceModule': 'true', 'windowManagerModule': 'true', 'windowPreviewModule': 'true', 'windowAttentionHandlerModule': 'true', 'windowThumbnailModule': 'true', 'swipeTrackerModule': 'true', 'searchControllerModule': 'true', 'searchModule': 'true', 'panelModule': 'true', 'overlayKeyModule': 'true', 'osdWindowModule': 'true', 'messageTrayModule': 'true', 'layoutModule': 'true', 'dashModule': 'true', 'appFavoritesModule': 'true', 'appDisplayModule': 'true', 'windowSearchProviderModule': 'true', 'extensionsSearchProviderModule': 'true'}</default>
|
<default>{
|
||||||
|
'workspaceThumbnailsPosition': '5',
|
||||||
|
'wsMaxSpacing': '80',
|
||||||
|
'wsPreviewScale': '100',
|
||||||
|
'secWsPreviewScale': '100',
|
||||||
|
'secWsPreviewShift': 'false',
|
||||||
|
'wsThumbnailsFull': 'false',
|
||||||
|
'secWsThumbnailsPosition': '2',
|
||||||
|
'dashPosition': '2',
|
||||||
|
'dashPositionAdjust': '0',
|
||||||
|
'wsTmbPositionAdjust': '0',
|
||||||
|
'showWsTmbLabels': '0',
|
||||||
|
'showWsTmbLabelsOnHover': 'false',
|
||||||
|
'closeWsButtonMode': '2',
|
||||||
|
'secWsTmbPositionAdjust': '0',
|
||||||
|
'dashMaxIconSize': '64',
|
||||||
|
'centerDashToWs': 'false',
|
||||||
|
'showAppsIconPosition': '1',
|
||||||
|
'wsThumbnailScale': '5',
|
||||||
|
'wsThumbnailScaleAppGrid': '15',
|
||||||
|
'secWsThumbnailScale': '5',
|
||||||
|
'showSearchEntry': 'false',
|
||||||
|
'centerSearch': 'true',
|
||||||
|
'centerAppGrid': 'true',
|
||||||
|
'dashBgOpacity': '20',
|
||||||
|
'dashBgColor': '1',
|
||||||
|
'dashBgRadius': '0',
|
||||||
|
'dashBgGS3Style': 'false',
|
||||||
|
'runningDotStyle': '1',
|
||||||
|
'enablePageShortcuts': 'true',
|
||||||
|
'showWsSwitcherBg': 'false',
|
||||||
|
'showWsPreviewBg': 'true',
|
||||||
|
'wsPreviewBgRadius': '30',
|
||||||
|
'showBgInOverview': 'true',
|
||||||
|
'overviewBgBrightness': '50',
|
||||||
|
'searchBgBrightness': '30',
|
||||||
|
'overviewBgBlurSigma': '50',
|
||||||
|
'appGridBgBlurSigma': '40',
|
||||||
|
'smoothBlurTransitions': 'false',
|
||||||
|
'appGridAnimation': '4',
|
||||||
|
'searchViewAnimation': '0',
|
||||||
|
'workspaceAnimation': '1',
|
||||||
|
'animationSpeedFactor': '100',
|
||||||
|
'winPreviewIconSize': '1',
|
||||||
|
'winTitlePosition': '0',
|
||||||
|
'startupState': '0',
|
||||||
|
'overviewMode': '0',
|
||||||
|
'wsSwitcherMode': '0',
|
||||||
|
'workspaceSwitcherAnimation': '0',
|
||||||
|
'searchIconSize': '96',
|
||||||
|
'searchViewScale': '104',
|
||||||
|
'appGridIconSize': '-1',
|
||||||
|
'appGridColumns': '0',
|
||||||
|
'appGridRows': '0',
|
||||||
|
'appGridFolderIconSize': '-1',
|
||||||
|
'appGridFolderColumns': '0',
|
||||||
|
'appGridFolderRows': '0',
|
||||||
|
'appGridFolderIconGrid': '2',
|
||||||
|
'appGridContent': '2',
|
||||||
|
'appGridIncompletePages': 'false',
|
||||||
|
'appGridOrder': '0',
|
||||||
|
'appFolderOrder': '0',
|
||||||
|
'appGridNamesMode': '1',
|
||||||
|
'appGridActivePreview': 'false',
|
||||||
|
'appGridFolderCenter': 'true',
|
||||||
|
'appGridPageWidthScale': '90',
|
||||||
|
'appGridSpacing': '12',
|
||||||
|
'searchWindowsOrder': '1',
|
||||||
|
'searchFuzzy': 'false',
|
||||||
|
'searchMaxResultsRows': '5',
|
||||||
|
'dashShowWindowsBeforeActivation': '1',
|
||||||
|
'dashIconScroll': '1',
|
||||||
|
'dashIsolateWorkspaces': 'false',
|
||||||
|
'searchWindowsIconScroll': '1',
|
||||||
|
'panelVisibility': '0',
|
||||||
|
'panelPosition': '0',
|
||||||
|
'windowAttentionMode': '0',
|
||||||
|
'wsSwPopupHPosition': '50',
|
||||||
|
'wsSwPopupVPosition': '95',
|
||||||
|
'wsSwPopupMode': '1',
|
||||||
|
'wsSwitcherWraparound': 'false',
|
||||||
|
'wsSwitcherIgnoreLast': 'false',
|
||||||
|
'favoritesNotify': '1',
|
||||||
|
'notificationPosition': '1',
|
||||||
|
'osdPosition': '6',
|
||||||
|
'hotCornerAction': '1',
|
||||||
|
'hotCornerPosition': '6',
|
||||||
|
'hotCornerFullscreen': 'true',
|
||||||
|
'hotCornerRipples': 'false',
|
||||||
|
'alwaysActivateSelectedWindow': 'false',
|
||||||
|
'winPreviewSecBtnAction': '2',
|
||||||
|
'winPreviewMidBtnAction': '1',
|
||||||
|
'winPreviewShowCloseButton': 'true',
|
||||||
|
'windowIconClickAction': '1',
|
||||||
|
'overlayKeyPrimary': '1',
|
||||||
|
'overlayKeySecondary': '1',
|
||||||
|
'overviewEscBehavior': '0',
|
||||||
|
'newWindowFocusFix': 'false',
|
||||||
|
'newWindowMonitorFix': '0',
|
||||||
|
'appGridPerformance': 'true',
|
||||||
|
'highlightingStyle': '1',
|
||||||
|
|
||||||
|
'workspaceSwitcherPopupModule': 'true',
|
||||||
|
'workspaceAnimationModule': 'true',
|
||||||
|
'workspaceModule': 'true',
|
||||||
|
'windowManagerModule': 'true',
|
||||||
|
'windowPreviewModule': 'true',
|
||||||
|
'windowAttentionHandlerModule': 'true',
|
||||||
|
'swipeTrackerModule': 'true',
|
||||||
|
'searchControllerModule': 'true',
|
||||||
|
'searchModule': 'true',
|
||||||
|
'panelModule': 'true',
|
||||||
|
'overlayKeyModule': 'true',
|
||||||
|
'osdWindowModule': 'true',
|
||||||
|
'messageTrayModule': 'true',
|
||||||
|
'layoutModule': 'true',
|
||||||
|
'dashModule': 'true',
|
||||||
|
'appFavoritesModule': 'true',
|
||||||
|
'appDisplayModule': 'true'
|
||||||
|
}</default>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<key type="s" name="profile-name-3">
|
<key type="s" name="profile-name-3">
|
||||||
<default>""</default>
|
<default>""</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="a{ss}" name="profile-data-3">
|
<key type="a{ss}" name="profile-data-3">
|
||||||
<default>{'workspaceThumbnailsPosition': '0', 'wsMaxSpacing': '350', 'wsPreviewScale': '95', 'secWsPreviewScale': '100', 'secWsPreviewShift': 'false', 'wsThumbnailsFull': 'false', 'secWsThumbnailsPosition': '2', 'dashPosition': '0', 'dashPositionAdjust': '-100', 'wsTmbPositionAdjust': '-100', 'showWsTmbLabels': '3', 'showWsTmbLabelsOnHover': 'false', 'closeWsButtonMode': '2', 'secWsTmbPositionAdjust': '0', 'dashMaxIconSize': '48', 'dashShowWindowsIcon': '1', 'dashShowRecentFilesIcon': '1', 'dashShowExtensionsIcon': '1', 'centerDashToWs': 'false', 'showAppsIconPosition': '0', 'wsThumbnailScale': '13', 'wsThumbnailScaleAppGrid': '13', 'secWsThumbnailScale': '13', 'showSearchEntry': 'false', 'centerSearch': 'true', 'centerAppGrid': 'false', 'dashBgOpacity': '20', 'dashBgColor': '1', 'dashBgRadius': '0', 'dashBgGS3Style': 'false', 'runningDotStyle': '1', 'enablePageShortcuts': 'true', 'showWsSwitcherBg': 'false', 'showWsPreviewBg': 'true', 'wsPreviewBgRadius': '30', 'showBgInOverview': 'true', 'overviewBgBrightness': '60', 'searchBgBrightness': '30', 'overviewBgBlurSigma': '30', 'appGridBgBlurSigma': '80', 'smoothBlurTransitions': 'false', 'appGridAnimation': '4', 'searchViewAnimation': '4', 'workspaceAnimation': '1', 'animationSpeedFactor': '100', 'winPreviewIconSize': '1', 'winTitlePosition': '0', 'startupState': '2', 'overviewMode': '1', 'workspaceSwitcherAnimation': '1', 'searchIconSize': '96', 'searchViewScale': '104', 'appGridIconSize': '-1', 'appGridColumns': '0', 'appGridRows': '0', 'appGridFolderIconSize': '-1', 'appGridFolderColumns': '0', 'appGridFolderRows': '0', 'appGridFolderIconGrid': '3', 'appGridContent': '0', 'appGridIncompletePages': 'false', 'appGridOrder': '0', 'appFolderOrder': '0', 'appGridNamesMode': '1', 'appGridActivePreview': 'true', 'appGridFolderCenter': 'false', 'appGridPageWidthScale': '90', 'appGridSpacing': '12', 'searchWindowsOrder': '1', 'searchFuzzy': 'false', 'searchMaxResultsRows': '5', 'dashShowWindowsBeforeActivation': '1', 'dashIconScroll': '1', 'dashIsolateWorkspaces': 'false', 'searchWindowsIconScroll': '1', 'panelVisibility': '0', 'panelPosition': '0', 'windowAttentionMode': '0', 'wsSwPopupHPosition': '50', 'wsSwPopupVPosition': '95', 'wsSwPopupMode': '1', 'wsSwitcherWraparound': 'false', 'wsSwitcherIgnoreLast': 'false', 'favoritesNotify': '0', 'notificationPosition': '2', 'osdPosition': '6', 'hotCornerAction': '1', 'hotCornerPosition': '1', 'hotCornerFullscreen': 'true', 'hotCornerRipples': 'true', 'alwaysActivateSelectedWindow': 'false', 'winPreviewSecBtnAction': '2', 'winPreviewMidBtnAction': '1', 'winPreviewShowCloseButton': 'true', 'windowIconClickAction': '1', 'overlayKeyPrimary': '1', 'overlayKeySecondary': '1', 'overviewEscBehavior': '0', 'newWindowFocusFix': 'false', 'appGridPerformance': 'true', 'windowThumbnailScale': '20', 'workspaceSwitcherPopupModule': 'true', 'workspaceAnimationModule': 'true', 'workspaceModule': 'true', 'windowManagerModule': 'true', 'windowPreviewModule': 'true', 'windowAttentionHandlerModule': 'true', 'windowThumbnailModule': 'true', 'swipeTrackerModule': 'true', 'searchControllerModule': 'true', 'searchModule': 'true', 'panelModule': 'true', 'overlayKeyModule': 'true', 'osdWindowModule': 'true', 'messageTrayModule': 'true', 'layoutModule': 'true', 'dashModule': 'true', 'appFavoritesModule': 'true', 'appDisplayModule': 'true', 'windowSearchProviderModule': 'true', 'extensionsSearchProviderModule': 'true'}</default>
|
<default>{
|
||||||
|
'workspaceThumbnailsPosition': '0',
|
||||||
|
'wsMaxSpacing': '350',
|
||||||
|
'wsPreviewScale': '95',
|
||||||
|
'secWsPreviewScale': '100',
|
||||||
|
'secWsPreviewShift': 'false',
|
||||||
|
'wsThumbnailsFull': 'false',
|
||||||
|
'secWsThumbnailsPosition': '2',
|
||||||
|
'dashPosition': '0',
|
||||||
|
'dashPositionAdjust': '-100',
|
||||||
|
'wsTmbPositionAdjust': '-100',
|
||||||
|
'showWsTmbLabels': '3',
|
||||||
|
'showWsTmbLabelsOnHover': 'false',
|
||||||
|
'closeWsButtonMode': '2',
|
||||||
|
'secWsTmbPositionAdjust': '0',
|
||||||
|
'dashMaxIconSize': '48',
|
||||||
|
'centerDashToWs': 'false',
|
||||||
|
'showAppsIconPosition': '0',
|
||||||
|
'wsThumbnailScale': '13',
|
||||||
|
'wsThumbnailScaleAppGrid': '13',
|
||||||
|
'secWsThumbnailScale': '13',
|
||||||
|
'showSearchEntry': 'false',
|
||||||
|
'centerSearch': 'true',
|
||||||
|
'centerAppGrid': 'false',
|
||||||
|
'dashBgOpacity': '15',
|
||||||
|
'dashBgColor': '1',
|
||||||
|
'dashBgRadius': '0',
|
||||||
|
'dashBgGS3Style': 'false',
|
||||||
|
'runningDotStyle': '1',
|
||||||
|
'enablePageShortcuts': 'true',
|
||||||
|
'showWsSwitcherBg': 'false',
|
||||||
|
'showWsPreviewBg': 'true',
|
||||||
|
'wsPreviewBgRadius': '30',
|
||||||
|
'showBgInOverview': 'true',
|
||||||
|
'overviewBgBrightness': '60',
|
||||||
|
'searchBgBrightness': '30',
|
||||||
|
'overviewBgBlurSigma': '30',
|
||||||
|
'appGridBgBlurSigma': '80',
|
||||||
|
'smoothBlurTransitions': 'false',
|
||||||
|
'appGridAnimation': '4',
|
||||||
|
'searchViewAnimation': '0',
|
||||||
|
'workspaceAnimation': '1',
|
||||||
|
'animationSpeedFactor': '100',
|
||||||
|
'winPreviewIconSize': '1',
|
||||||
|
'winTitlePosition': '0',
|
||||||
|
'startupState': '2',
|
||||||
|
'overviewMode': '1',
|
||||||
|
'wsSwitcherMode': '0',
|
||||||
|
'workspaceSwitcherAnimation': '1',
|
||||||
|
'searchIconSize': '96',
|
||||||
|
'searchViewScale': '104',
|
||||||
|
'appGridIconSize': '-1',
|
||||||
|
'appGridColumns': '0',
|
||||||
|
'appGridRows': '0',
|
||||||
|
'appGridFolderIconSize': '-1',
|
||||||
|
'appGridFolderColumns': '0',
|
||||||
|
'appGridFolderRows': '0',
|
||||||
|
'appGridFolderIconGrid': '3',
|
||||||
|
'appGridContent': '0',
|
||||||
|
'appGridIncompletePages': 'false',
|
||||||
|
'appGridOrder': '0',
|
||||||
|
'appFolderOrder': '0',
|
||||||
|
'appGridNamesMode': '1',
|
||||||
|
'appGridActivePreview': 'true',
|
||||||
|
'appGridFolderCenter': 'false',
|
||||||
|
'appGridPageWidthScale': '90',
|
||||||
|
'appGridSpacing': '12',
|
||||||
|
'searchWindowsOrder': '1',
|
||||||
|
'searchFuzzy': 'false',
|
||||||
|
'searchMaxResultsRows': '5',
|
||||||
|
'dashShowWindowsBeforeActivation': '1',
|
||||||
|
'dashIconScroll': '1',
|
||||||
|
'dashIsolateWorkspaces': 'false',
|
||||||
|
'searchWindowsIconScroll': '1',
|
||||||
|
'panelVisibility': '0',
|
||||||
|
'panelPosition': '0',
|
||||||
|
'windowAttentionMode': '0',
|
||||||
|
'wsSwPopupHPosition': '50',
|
||||||
|
'wsSwPopupVPosition': '95',
|
||||||
|
'wsSwPopupMode': '1',
|
||||||
|
'wsSwitcherWraparound': 'false',
|
||||||
|
'wsSwitcherIgnoreLast': 'false',
|
||||||
|
'favoritesNotify': '0',
|
||||||
|
'notificationPosition': '2',
|
||||||
|
'osdPosition': '6',
|
||||||
|
'hotCornerAction': '1',
|
||||||
|
'hotCornerPosition': '1',
|
||||||
|
'hotCornerFullscreen': 'true',
|
||||||
|
'hotCornerRipples': 'true',
|
||||||
|
'alwaysActivateSelectedWindow': 'false',
|
||||||
|
'winPreviewSecBtnAction': '2',
|
||||||
|
'winPreviewMidBtnAction': '1',
|
||||||
|
'winPreviewShowCloseButton': 'true',
|
||||||
|
'windowIconClickAction': '1',
|
||||||
|
'overlayKeyPrimary': '1',
|
||||||
|
'overlayKeySecondary': '1',
|
||||||
|
'overviewEscBehavior': '0',
|
||||||
|
'newWindowFocusFix': 'false',
|
||||||
|
'newWindowMonitorFix': '0',
|
||||||
|
'appGridPerformance': 'true',
|
||||||
|
'highlightingStyle': '1',
|
||||||
|
|
||||||
|
'workspaceSwitcherPopupModule': 'true',
|
||||||
|
'workspaceAnimationModule': 'true',
|
||||||
|
'workspaceModule': 'true',
|
||||||
|
'windowManagerModule': 'true',
|
||||||
|
'windowPreviewModule': 'true',
|
||||||
|
'windowAttentionHandlerModule': 'true',
|
||||||
|
'swipeTrackerModule': 'true',
|
||||||
|
'searchControllerModule': 'true',
|
||||||
|
'searchModule': 'true',
|
||||||
|
'panelModule': 'true',
|
||||||
|
'overlayKeyModule': 'true',
|
||||||
|
'osdWindowModule': 'true',
|
||||||
|
'messageTrayModule': 'true',
|
||||||
|
'layoutModule': 'true',
|
||||||
|
'dashModule': 'true',
|
||||||
|
'appFavoritesModule': 'true',
|
||||||
|
'appDisplayModule': 'true'
|
||||||
|
}</default>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<key type="s" name="profile-name-4">
|
<key type="s" name="profile-name-4">
|
||||||
<default>""</default>
|
<default>""</default>
|
||||||
</key>
|
</key>
|
||||||
<key type="a{ss}" name="profile-data-4">
|
<key type="a{ss}" name="profile-data-4">
|
||||||
<default>{'workspaceThumbnailsPosition': '6', 'wsMaxSpacing': '65', 'wsPreviewScale': '95', 'secWsPreviewScale': '100', 'secWsPreviewShift': 'false', 'wsThumbnailsFull': 'false', 'secWsThumbnailsPosition': '2', 'dashPosition': '2', 'dashPositionAdjust': '0', 'wsTmbPositionAdjust': '0', 'showWsTmbLabels': '3', 'showWsTmbLabelsOnHover': 'false', 'closeWsButtonMode': '2', 'secWsTmbPositionAdjust': '0', 'dashMaxIconSize': '48', 'dashShowWindowsIcon': '1', 'dashShowRecentFilesIcon': '1', 'dashShowExtensionsIcon': '1', 'centerDashToWs': 'false', 'showAppsIconPosition': '1', 'wsThumbnailScale': '10', 'wsThumbnailScaleAppGrid': '10', 'secWsThumbnailScale': '10', 'showSearchEntry': 'false', 'centerSearch': 'true', 'centerAppGrid': 'false', 'dashBgOpacity': '100', 'dashBgColor': '0', 'dashBgRadius': '0', 'dashBgGS3Style': 'false', 'runningDotStyle': '1', 'enablePageShortcuts': 'true', 'showWsSwitcherBg': 'true', 'showWsPreviewBg': 'true', 'wsPreviewBgRadius': '30', 'showBgInOverview': 'true', 'overviewBgBrightness': '60', 'searchBgBrightness': '30', 'overviewBgBlurSigma': '80', 'appGridBgBlurSigma': '80', 'smoothBlurTransitions': 'false', 'appGridAnimation': '4', 'searchViewAnimation': '4', 'workspaceAnimation': '1', 'animationSpeedFactor': '100', 'winPreviewIconSize': '1', 'winTitlePosition': '0', 'startupState': '2', 'overviewMode': '2', 'workspaceSwitcherAnimation': '1', 'searchIconSize': '96', 'searchViewScale': '104', 'appGridIconSize': '-1', 'appGridColumns': '0', 'appGridRows': '0', 'appGridFolderIconSize': '-1', 'appGridFolderColumns': '0', 'appGridFolderRows': '0', 'appGridFolderIconGrid': '3', 'appGridContent': '0', 'appGridIncompletePages': 'false', 'appGridOrder': '0', 'appFolderOrder': '0', 'appGridNamesMode': '1', 'appGridActivePreview': 'true', 'appGridFolderCenter': 'false', 'appGridPageWidthScale': '90', 'appGridSpacing': '5', 'searchWindowsOrder': '1', 'searchFuzzy': 'false', 'searchMaxResultsRows': '5', 'dashShowWindowsBeforeActivation': '1', 'dashIconScroll': '1', 'dashIsolateWorkspaces': 'false', 'searchWindowsIconScroll': '1', 'panelVisibility': '0', 'panelPosition': '0', 'windowAttentionMode': '0', 'wsSwPopupHPosition': '50', 'wsSwPopupVPosition': '95', 'wsSwPopupMode': '1', 'wsSwitcherWraparound': 'false', 'wsSwitcherIgnoreLast': 'false', 'favoritesNotify': '0', 'notificationPosition': '1', 'osdPosition': '6', 'hotCornerAction': '1', 'hotCornerPosition': '6', 'hotCornerFullscreen': 'true', 'hotCornerRipples': 'false', 'alwaysActivateSelectedWindow': 'false', 'winPreviewSecBtnAction': '2', 'winPreviewMidBtnAction': '1', 'winPreviewShowCloseButton': 'true', 'windowIconClickAction': '1', 'overlayKeyPrimary': '1', 'overlayKeySecondary': '1', 'overviewEscBehavior': '0', 'newWindowFocusFix': 'false', 'appGridPerformance': 'true', 'windowThumbnailScale': '20', 'workspaceSwitcherPopupModule': 'true', 'workspaceAnimationModule': 'true', 'workspaceModule': 'true', 'windowManagerModule': 'true', 'windowPreviewModule': 'true', 'windowAttentionHandlerModule': 'true', 'windowThumbnailModule': 'true', 'swipeTrackerModule': 'true', 'searchControllerModule': 'true', 'searchModule': 'true', 'panelModule': 'true', 'overlayKeyModule': 'true', 'osdWindowModule': 'true', 'messageTrayModule': 'true', 'layoutModule': 'true', 'dashModule': 'true', 'appFavoritesModule': 'true', 'appDisplayModule': 'true', 'windowSearchProviderModule': 'true', 'extensionsSearchProviderModule': 'true'}</default>
|
<default>{
|
||||||
|
'workspaceThumbnailsPosition': '6',
|
||||||
|
'wsMaxSpacing': '65',
|
||||||
|
'wsPreviewScale': '95',
|
||||||
|
'secWsPreviewScale': '100',
|
||||||
|
'secWsPreviewShift': 'false',
|
||||||
|
'wsThumbnailsFull': 'false',
|
||||||
|
'secWsThumbnailsPosition': '2',
|
||||||
|
'dashPosition': '2',
|
||||||
|
'dashPositionAdjust': '0',
|
||||||
|
'wsTmbPositionAdjust': '0',
|
||||||
|
'showWsTmbLabels': '3',
|
||||||
|
'showWsTmbLabelsOnHover': 'false',
|
||||||
|
'closeWsButtonMode': '2',
|
||||||
|
'secWsTmbPositionAdjust': '0',
|
||||||
|
'dashMaxIconSize': '48',
|
||||||
|
'centerDashToWs': 'false',
|
||||||
|
'showAppsIconPosition': '1',
|
||||||
|
'wsThumbnailScale': '10',
|
||||||
|
'wsThumbnailScaleAppGrid': '10',
|
||||||
|
'secWsThumbnailScale': '10',
|
||||||
|
'showSearchEntry': 'false',
|
||||||
|
'centerSearch': 'true',
|
||||||
|
'centerAppGrid': 'false',
|
||||||
|
'dashBgOpacity': '100',
|
||||||
|
'dashBgColor': '0',
|
||||||
|
'dashBgRadius': '0',
|
||||||
|
'dashBgGS3Style': 'false',
|
||||||
|
'runningDotStyle': '1',
|
||||||
|
'enablePageShortcuts': 'true',
|
||||||
|
'showWsSwitcherBg': 'true',
|
||||||
|
'showWsPreviewBg': 'true',
|
||||||
|
'wsPreviewBgRadius': '30',
|
||||||
|
'showBgInOverview': 'true',
|
||||||
|
'overviewBgBrightness': '60',
|
||||||
|
'searchBgBrightness': '30',
|
||||||
|
'overviewBgBlurSigma': '80',
|
||||||
|
'appGridBgBlurSigma': '80',
|
||||||
|
'smoothBlurTransitions': 'false',
|
||||||
|
'appGridAnimation': '4',
|
||||||
|
'searchViewAnimation': '3',
|
||||||
|
'workspaceAnimation': '1',
|
||||||
|
'animationSpeedFactor': '100',
|
||||||
|
'winPreviewIconSize': '1',
|
||||||
|
'winTitlePosition': '0',
|
||||||
|
'startupState': '2',
|
||||||
|
'overviewMode': '2',
|
||||||
|
'wsSwitcherMode': '0',
|
||||||
|
'workspaceSwitcherAnimation': '1',
|
||||||
|
'searchIconSize': '96',
|
||||||
|
'searchViewScale': '104',
|
||||||
|
'appGridIconSize': '-1',
|
||||||
|
'appGridColumns': '0',
|
||||||
|
'appGridRows': '0',
|
||||||
|
'appGridFolderIconSize': '-1',
|
||||||
|
'appGridFolderColumns': '0',
|
||||||
|
'appGridFolderRows': '0',
|
||||||
|
'appGridFolderIconGrid': '3',
|
||||||
|
'appGridContent': '0',
|
||||||
|
'appGridIncompletePages': 'false',
|
||||||
|
'appGridOrder': '0',
|
||||||
|
'appFolderOrder': '0',
|
||||||
|
'appGridNamesMode': '1',
|
||||||
|
'appGridActivePreview': 'true',
|
||||||
|
'appGridFolderCenter': 'false',
|
||||||
|
'appGridPageWidthScale': '90',
|
||||||
|
'appGridSpacing': '5',
|
||||||
|
'searchWindowsOrder': '1',
|
||||||
|
'searchFuzzy': 'false',
|
||||||
|
'searchMaxResultsRows': '5',
|
||||||
|
'dashShowWindowsBeforeActivation': '1',
|
||||||
|
'dashIconScroll': '1',
|
||||||
|
'dashIsolateWorkspaces': 'false',
|
||||||
|
'searchWindowsIconScroll': '1',
|
||||||
|
'panelVisibility': '0',
|
||||||
|
'panelPosition': '0',
|
||||||
|
'windowAttentionMode': '0',
|
||||||
|
'wsSwPopupHPosition': '50',
|
||||||
|
'wsSwPopupVPosition': '95',
|
||||||
|
'wsSwPopupMode': '1',
|
||||||
|
'wsSwitcherWraparound': 'false',
|
||||||
|
'wsSwitcherIgnoreLast': 'false',
|
||||||
|
'favoritesNotify': '0',
|
||||||
|
'notificationPosition': '1',
|
||||||
|
'osdPosition': '6',
|
||||||
|
'hotCornerAction': '1',
|
||||||
|
'hotCornerPosition': '6',
|
||||||
|
'hotCornerFullscreen': 'true',
|
||||||
|
'hotCornerRipples': 'false',
|
||||||
|
'alwaysActivateSelectedWindow': 'false',
|
||||||
|
'winPreviewSecBtnAction': '2',
|
||||||
|
'winPreviewMidBtnAction': '1',
|
||||||
|
'winPreviewShowCloseButton': 'true',
|
||||||
|
'windowIconClickAction': '1',
|
||||||
|
'overlayKeyPrimary': '1',
|
||||||
|
'overlayKeySecondary': '1',
|
||||||
|
'overviewEscBehavior': '0',
|
||||||
|
'newWindowFocusFix': 'false',
|
||||||
|
'newWindowMonitorFix': '0',
|
||||||
|
'appGridPerformance': 'true',
|
||||||
|
'highlightingStyle': '1',
|
||||||
|
|
||||||
|
'workspaceSwitcherPopupModule': 'true',
|
||||||
|
'workspaceAnimationModule': 'true',
|
||||||
|
'workspaceModule': 'true',
|
||||||
|
'windowManagerModule': 'true',
|
||||||
|
'windowPreviewModule': 'true',
|
||||||
|
'windowAttentionHandlerModule': 'true',
|
||||||
|
'swipeTrackerModule': 'true',
|
||||||
|
'searchControllerModule': 'true',
|
||||||
|
'searchModule': 'true',
|
||||||
|
'panelModule': 'true',
|
||||||
|
'overlayKeyModule': 'true',
|
||||||
|
'osdWindowModule': 'true',
|
||||||
|
'messageTrayModule': 'true',
|
||||||
|
'layoutModule': 'true',
|
||||||
|
'dashModule': 'true',
|
||||||
|
'appFavoritesModule': 'true',
|
||||||
|
'appDisplayModule': 'true'
|
||||||
|
}</default>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
</schema>
|
</schema>
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
|
|
||||||
#dash.vertical .app-well-app,
|
#dash.vertical .app-well-app,
|
||||||
#dash.vertical .show-apps {
|
#dash.vertical .show-apps {
|
||||||
/* left/right padding exceeds dash bg by 6px to
|
/* left/right padding exceeds dash bg by 6px
|
||||||
cover spacing between dash and the edge of the screen
|
to cover the spacing between dash and the edge of the screen
|
||||||
so the icons will be selectable even at the edge
|
so the icons will be selectable even at the edge
|
||||||
this spacing must be accounted for in overview allocate() */
|
this spacing must be accounted for in overview allocate() */
|
||||||
padding-right: 16px;
|
padding-right: 16px;
|
||||||
|
@ -29,14 +29,14 @@
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
background-color: transparentize(#eeeeec, 0.7);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#dash.vertical .overview-icon {
|
#dash.vertical .overview-icon {
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dash.vertical .app-well-app-running-dot {
|
#dash.vertical .app-well-app-running-dot,
|
||||||
|
#dash.vertical .app-grid-running-dot {
|
||||||
margin: 4px 0px;
|
margin: 4px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,9 +81,10 @@
|
||||||
#dash.vertical-gs3-right .app-well-app,
|
#dash.vertical-gs3-right .app-well-app,
|
||||||
#dash.vertical-gs3-right .show-apps {
|
#dash.vertical-gs3-right .show-apps {
|
||||||
/* left/right padding exceeds dash bg by 6px to
|
/* left/right padding exceeds dash bg by 6px to
|
||||||
cover spacing between dash and the edge of the screen
|
cover spacing between dash icons and the edge of the screen
|
||||||
so the icons will be selectable even at the edge
|
so the icons will be selectable even at the edge
|
||||||
this spacing must be accounted for in overview allocate() */
|
this spacing must be accounted for in overview allocate() */
|
||||||
|
padding: 0;
|
||||||
padding-right: 9px;
|
padding-right: 9px;
|
||||||
padding-left: 9px;
|
padding-left: 9px;
|
||||||
}
|
}
|
||||||
|
@ -93,16 +94,7 @@
|
||||||
border-color: rgba(150, 150, 150, 0.4);
|
border-color: rgba(150, 150, 150, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dash-background-reduced {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-well-app-running-dot {
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-well-app-running-dot-custom {
|
.app-well-app-running-dot-custom {
|
||||||
margin-bottom: 12px;
|
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +105,7 @@
|
||||||
text-shadow: 1px 1px 3px rgba(33, 33, 33, 0.5);
|
text-shadow: 1px 1px 3px rgba(33, 33, 33, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* adjustment for the vertical ws switcher indicator popup*/
|
/* adjustment for the vertical ws switcher indicator popup */
|
||||||
.ws-switcher-indicator {
|
.ws-switcher-indicator {
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
@ -142,10 +134,10 @@
|
||||||
|
|
||||||
.ws-tmb-transparent {
|
.ws-tmb-transparent {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: rgba(200, 200, 200, 0.2);
|
background-color: rgba(200, 200, 200, 0.16);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* app grid page indicatos */
|
/* app grid page indicators */
|
||||||
.page-indicator-icon {
|
.page-indicator-icon {
|
||||||
margin: 10px 10px 10px 10px;
|
margin: 10px 10px 10px 10px;
|
||||||
}
|
}
|
||||||
|
@ -154,33 +146,20 @@
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GS 43 App Grid - indicators that show up when dragging icon */
|
|
||||||
.prevPageIndicator {
|
|
||||||
background: rgba(255, 255, 255, 0.1);
|
|
||||||
background-gradient-start: rgba(255, 255, 255, 0.1);
|
|
||||||
background-gradient-end: transparent;
|
|
||||||
background-gradient-direction: vertical;
|
|
||||||
border-radius: 100px 100px 0px 0px;
|
|
||||||
}
|
|
||||||
.nextPageIndicator {
|
|
||||||
background: rgba(255, 255, 255, 0.1);
|
|
||||||
background-gradient-start: transparent;
|
|
||||||
background-gradient-end: rgba(255, 255, 255, 0.1);
|
|
||||||
background-gradient-direction: vertical;
|
|
||||||
border-radius: 0px 0px 100px 100px;
|
|
||||||
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
.search-entry{
|
.search-entry{
|
||||||
background-color: rgba(200, 200, 200, 0.1);
|
background-color: rgba(200, 200, 200, 0.1);
|
||||||
color: white;
|
color: white;
|
||||||
border-color: rgba(160, 160, 160, 0.4);
|
border-color: rgba(160, 160, 160, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-entry StLabel.hint-text {
|
||||||
|
color: rgba(200, 200, 200, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
.search-entry:hover,
|
.search-entry:hover,
|
||||||
.search-entry:focus {
|
.search-entry:focus {
|
||||||
background-color: rgba(200, 200, 200, 0.2);
|
background-color: rgba(200, 200, 200, 0.2);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
.search-entry-om2 {
|
.search-entry-om2 {
|
||||||
color: white;
|
color: white;
|
||||||
|
@ -208,6 +187,13 @@
|
||||||
background-color: rgba(200, 200, 200, 0.1);
|
background-color: rgba(200, 200, 200, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Reduce edge fading of search results scroll view */
|
||||||
|
.vfade { -st-vfade-offset: 34px; }
|
||||||
|
.hfade { -st-hfade-offset: 34px; }
|
||||||
|
.search-section-content {
|
||||||
|
background-color: rgba(200, 200, 200, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
/* "no results" / "searching..." text*/
|
/* "no results" / "searching..." text*/
|
||||||
.search-statustext, .search-statustext-om2 {
|
.search-statustext, .search-statustext-om2 {
|
||||||
background-color: rgba(200, 200, 200, 0.1);
|
background-color: rgba(200, 200, 200, 0.1);
|
||||||
|
@ -279,9 +265,13 @@ StButton#vhandle {
|
||||||
|
|
||||||
.osd-window {
|
.osd-window {
|
||||||
margin: 4em;
|
margin: 4em;
|
||||||
|
margin-bottom: 8em; /* avoid overlap with dock extension */
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-folder .overview-icon,
|
.app-folder-46,
|
||||||
|
.app-folder-46 .overview-tile,
|
||||||
|
.app-folder-46 .overview-icon,
|
||||||
|
.app-folder-45 .overview-icon,
|
||||||
.edit-folder-button,
|
.edit-folder-button,
|
||||||
.folder-name-entry {
|
.folder-name-entry {
|
||||||
background-color: rgba(200, 200, 200, 0.08);
|
background-color: rgba(200, 200, 200, 0.08);
|
||||||
|
@ -295,14 +285,130 @@ StButton#vhandle {
|
||||||
border-color: rgba(160, 160, 160, 0.3);
|
border-color: rgba(160, 160, 160, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-folder-button:hover,
|
.edit-folder-button:hover,
|
||||||
.app-folder:hover .overview-icon,
|
.app-folder-46:hover,
|
||||||
.app-folder:focus .overview-icon {
|
.app-folder-45:hover .overview-icon,
|
||||||
|
.app-folder-45:focus .overview-icon {
|
||||||
background-color: rgba(200, 200, 200, 0.15);
|
background-color: rgba(200, 200, 200, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reduce quick menu buttons height in GS44 */
|
/* add missing spacing between buttons */
|
||||||
/*.quick-toggle,
|
.edit-folder-button-46 {
|
||||||
.quick-menu-toggle {
|
margin-right: 6px;
|
||||||
min-height: 42px;
|
}
|
||||||
}*/
|
|
||||||
|
/* 46 changes the default bg color from transparent to the solid color blending with widget background */
|
||||||
|
.search-provider-icon,
|
||||||
|
.list-search-result,
|
||||||
|
.overview-tile {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Needed only for 46+, but doesn't hurt 45 */
|
||||||
|
.search-provider-icon:hover,
|
||||||
|
.search-provider-icon:focus,
|
||||||
|
.search-provider-icon:selected,
|
||||||
|
.list-search-result:hover,
|
||||||
|
.list-search-result:focus,
|
||||||
|
.list-search-result:selected,
|
||||||
|
.overview-tile:hover,
|
||||||
|
.overview-tile:focus,
|
||||||
|
.overview-tile:selected,
|
||||||
|
.overview-icon:hover,
|
||||||
|
.overview-icon:focus,
|
||||||
|
.overview-icon:selected {
|
||||||
|
background-color: rgba(200, 200, 200, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-folder-46,
|
||||||
|
.app-folder-46 .overview-tile,
|
||||||
|
.app-folder-45 .overview-icon, /* 45 only */
|
||||||
|
.edit-folder-button,
|
||||||
|
.folder-name-entry {
|
||||||
|
background-color: rgba(200, 200, 200, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-folder-46 .overview-icon,
|
||||||
|
#dash.dash-46 .overview-icon {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.dash-46 .overview-tile,
|
||||||
|
#dash.dash-46 .show-apps {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.dash-46 .overview-tile:hover .overview-icon,
|
||||||
|
#dash.dash-46 .overview-tile:focus .overview-icon,
|
||||||
|
#dash.dash-46 .overview-tile:selected .overview-icon,
|
||||||
|
#dash.dash-46 .show-apps:hover .overview-icon,
|
||||||
|
#dash.dash-46 .show-apps:focus .overview-icon,
|
||||||
|
#dash.dash-46 .show-apps:selected .overview-icon {
|
||||||
|
background-color: rgba(200, 200, 200, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46 {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46-gs3-left {
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46-gs3-right {
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46 .overview-tile,
|
||||||
|
#dash.vertical-46 .show-apps {
|
||||||
|
margin: 0px;
|
||||||
|
background-color: transparent;
|
||||||
|
/* this padding should keep the dash 6px from the screen edge */
|
||||||
|
padding: 0, 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46 .dash-separator {
|
||||||
|
height: 1px;
|
||||||
|
margin-right: 2px;
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46 .app-well-app-running-dot-custom {
|
||||||
|
margin: 0px;
|
||||||
|
width: 2px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46 .dash-background {
|
||||||
|
padding: 12px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46-gs3-left .overview-tile,
|
||||||
|
#dash.vertical-46-gs3-left .show-apps {
|
||||||
|
/* this padding should extend the icon tile to the edge of the dash background */
|
||||||
|
padding: 0, 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46-gs3-right .overview-tile,
|
||||||
|
#dash.vertical-46-gs3-right .show-apps {
|
||||||
|
padding: 0, 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46-gs3-left .dash-background {
|
||||||
|
border-radius: 0 18px 18px 0;
|
||||||
|
border-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dash.vertical-46-gs3-right .dash-background {
|
||||||
|
border-radius: 18px 0 0 18px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* reverse padding */
|
||||||
|
.ws-switcher-vertical {
|
||||||
|
padding: 18px 12px
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue