Merging upstream version 20240414 (Closes: #1067433).
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
67bb2c3f89
commit
184ff0f365
130 changed files with 4415 additions and 4361 deletions
|
@ -1,3 +1,16 @@
|
||||||
|
2024-04-12 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
|
|
||||||
|
* Releasing version 20240412.
|
||||||
|
|
||||||
|
[ Daniel Baumann ]
|
||||||
|
* Updating 45/hibernate-status to version 1.15 [0e25653].
|
||||||
|
* Updating 45/middleclickclose to version 30 [168768a].
|
||||||
|
* Updating 45/no-overview to version 46 [85eba64].
|
||||||
|
* Adding 45/vertical-workspaces version 37+20240412 [9b05a79].
|
||||||
|
* Adding gnome-shell version 46 in 45/disable-workspace-switcher metadata.json.
|
||||||
|
* Renaming extensions subdirectory for GNOME 46.
|
||||||
|
* Updating years in copyright notices for 2024.
|
||||||
|
|
||||||
2023-12-10 Daniel Baumann <daniel.baumann@progress-linux.org>
|
2023-12-10 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
|
|
||||||
* Releasing version 20231210.
|
* Releasing version 20231210.
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
20231210
|
20240414
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
/*
|
|
||||||
No overview at start-up
|
|
||||||
GNOME Shell 45+ extension
|
|
||||||
Contributors: @fthx, @fmuellner
|
|
||||||
License: GPL v3
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
|
||||||
|
|
||||||
export default class NoOverviewExtension {
|
|
||||||
constructor() {
|
|
||||||
this._realHasOverview = Main.sessionMode.hasOverview;
|
|
||||||
}
|
|
||||||
|
|
||||||
enable() {
|
|
||||||
if (!Main.layoutManager._startingUp) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Main.sessionMode.hasOverview = false;
|
|
||||||
|
|
||||||
this._startup_complete = Main.layoutManager.connect('startup-complete', () => {
|
|
||||||
Main.sessionMode.hasOverview = this._realHasOverview;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
disable() {
|
|
||||||
Main.sessionMode.hasOverview = this._realHasOverview;
|
|
||||||
Main.layoutManager.disconnect(this._startup_complete);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -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;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,237 +0,0 @@
|
||||||
/**
|
|
||||||
* V-Shell (Vertical Workspaces)
|
|
||||||
* windowManager.js
|
|
||||||
*
|
|
||||||
* @author GdH <G-dH@github.com>
|
|
||||||
* @copyright 2022 - 2023
|
|
||||||
* @license GPL-3.0
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import Clutter from 'gi://Clutter';
|
|
||||||
import Meta from 'gi://Meta';
|
|
||||||
import GObject from 'gi://GObject';
|
|
||||||
|
|
||||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
|
||||||
import * as WindowManager from 'resource:///org/gnome/shell/ui/windowManager.js';
|
|
||||||
|
|
||||||
let Me;
|
|
||||||
let opt;
|
|
||||||
|
|
||||||
export const WindowManagerModule = class {
|
|
||||||
constructor(me) {
|
|
||||||
Me = me;
|
|
||||||
opt = Me.opt;
|
|
||||||
|
|
||||||
this._firstActivation = true;
|
|
||||||
this.moduleEnabled = false;
|
|
||||||
this._overrides = null;
|
|
||||||
|
|
||||||
this._originalMinimizeSigId = 0;
|
|
||||||
this._minimizeSigId = 0;
|
|
||||||
this._originalUnminimizeSigId = 0;
|
|
||||||
this._unminimizeSigId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanGlobals() {
|
|
||||||
Me = null;
|
|
||||||
opt = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
update(reset) {
|
|
||||||
this.moduleEnabled = opt.get('windowManagerModule');
|
|
||||||
const conflict = false;
|
|
||||||
|
|
||||||
reset = reset || !this.moduleEnabled || conflict;
|
|
||||||
|
|
||||||
// don't even 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(' WindowManagerModule - Keeping untouched');
|
|
||||||
}
|
|
||||||
|
|
||||||
_activateModule() {
|
|
||||||
if (!this._overrides)
|
|
||||||
this._overrides = new Me.Util.Overrides();
|
|
||||||
|
|
||||||
this._overrides.addOverride('WindowManager', WindowManager.WindowManager.prototype, WindowManagerCommon);
|
|
||||||
|
|
||||||
if (!this._minimizeSigId) {
|
|
||||||
this._originalMinimizeSigId = GObject.signal_handler_find(Main.wm._shellwm, { signalId: 'minimize' });
|
|
||||||
if (this._originalMinimizeSigId) {
|
|
||||||
Main.wm._shellwm.block_signal_handler(this._originalMinimizeSigId);
|
|
||||||
this._minimizeSigId = Main.wm._shellwm.connect('minimize', WindowManagerCommon._minimizeWindow.bind(Main.wm));
|
|
||||||
}
|
|
||||||
|
|
||||||
this._originalUnminimizeSigId = GObject.signal_handler_find(Main.wm._shellwm, { signalId: 'unminimize' });
|
|
||||||
if (this._originalUnminimizeSigId) {
|
|
||||||
Main.wm._shellwm.block_signal_handler(this._originalUnminimizeSigId);
|
|
||||||
this._unminimizeSigId = Main.wm._shellwm.connect('unminimize', WindowManagerCommon._unminimizeWindow.bind(Main.wm));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.debug(' WindowManagerModule - Activated');
|
|
||||||
}
|
|
||||||
|
|
||||||
_disableModule() {
|
|
||||||
if (this._overrides)
|
|
||||||
this._overrides.removeAll();
|
|
||||||
this._overrides = null;
|
|
||||||
|
|
||||||
if (this._minimizeSigId) {
|
|
||||||
Main.wm._shellwm.disconnect(this._minimizeSigId);
|
|
||||||
this._minimizeSigId = 0;
|
|
||||||
}
|
|
||||||
if (this._originalMinimizeSigId) {
|
|
||||||
Main.wm._shellwm.unblock_signal_handler(this._originalMinimizeSigId);
|
|
||||||
this._originalMinimizeSigId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._unminimizeSigId) {
|
|
||||||
Main.wm._shellwm.disconnect(this._unminimizeSigId);
|
|
||||||
this._unminimizeSigId = 0;
|
|
||||||
}
|
|
||||||
if (this._originalUnminimizeSigId) {
|
|
||||||
Main.wm._shellwm.unblock_signal_handler(this._originalUnminimizeSigId);
|
|
||||||
this._originalUnminimizeSigId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.debug(' WindowManagerModule - Disabled');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 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 = {
|
|
||||||
_minimizeWindow(shellwm, actor) {
|
|
||||||
const types = [
|
|
||||||
Meta.WindowType.NORMAL,
|
|
||||||
Meta.WindowType.MODAL_DIALOG,
|
|
||||||
Meta.WindowType.DIALOG,
|
|
||||||
];
|
|
||||||
if (!this._shouldAnimateActor(actor, types)) {
|
|
||||||
shellwm.completed_minimize(actor);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
actor.set_scale(1.0, 1.0);
|
|
||||||
|
|
||||||
this._minimizing.add(actor);
|
|
||||||
|
|
||||||
/* if (actor.meta_window.is_monitor_sized()) {
|
|
||||||
actor.get_first_child().ease({
|
|
||||||
opacity: 0,
|
|
||||||
duration: WindowManager.MINIMIZE_WINDOW_ANIMATION_TIME,
|
|
||||||
mode: WindowManager.MINIMIZE_WINDOW_ANIMATION_MODE,
|
|
||||||
onStopped: () => this._minimizeWindowDone(shellwm, actor),
|
|
||||||
});
|
|
||||||
} else { */
|
|
||||||
let xDest, yDest, xScale, yScale;
|
|
||||||
let [success, geom] = actor.meta_window.get_icon_geometry();
|
|
||||||
if (success) {
|
|
||||||
xDest = geom.x;
|
|
||||||
yDest = geom.y;
|
|
||||||
xScale = geom.width / actor.width;
|
|
||||||
yScale = geom.height / actor.height;
|
|
||||||
} else {
|
|
||||||
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
|
|
||||||
if (!monitor) {
|
|
||||||
this._minimizeWindowDone();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
xDest = monitor.x;
|
|
||||||
yDest = opt.PANEL_POSITION_TOP ? monitor.y : monitor.y + monitor.height;
|
|
||||||
if (Clutter.get_default_text_direction() === Clutter.TextDirection.RTL)
|
|
||||||
xDest += monitor.width;
|
|
||||||
xScale = 0;
|
|
||||||
yScale = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
actor.ease({
|
|
||||||
scale_x: xScale,
|
|
||||||
scale_y: yScale,
|
|
||||||
x: xDest,
|
|
||||||
y: yDest,
|
|
||||||
duration: WindowManager.MINIMIZE_WINDOW_ANIMATION_TIME,
|
|
||||||
mode: WindowManager.MINIMIZE_WINDOW_ANIMATION_MODE,
|
|
||||||
onStopped: () => this._minimizeWindowDone(shellwm, actor),
|
|
||||||
});
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
|
|
||||||
_minimizeWindowDone(shellwm, actor) {
|
|
||||||
if (this._minimizing.delete(actor)) {
|
|
||||||
actor.remove_all_transitions();
|
|
||||||
actor.set_scale(1.0, 1.0);
|
|
||||||
actor.get_first_child().set_opacity(255);
|
|
||||||
actor.set_pivot_point(0, 0);
|
|
||||||
|
|
||||||
shellwm.completed_minimize(actor);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_unminimizeWindow(shellwm, actor) {
|
|
||||||
const types = [
|
|
||||||
Meta.WindowType.NORMAL,
|
|
||||||
Meta.WindowType.MODAL_DIALOG,
|
|
||||||
Meta.WindowType.DIALOG,
|
|
||||||
];
|
|
||||||
if (!this._shouldAnimateActor(actor, types)) {
|
|
||||||
shellwm.completed_unminimize(actor);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._unminimizing.add(actor);
|
|
||||||
|
|
||||||
/* if (false/* actor.meta_window.is_monitor_sized()) {
|
|
||||||
actor.opacity = 0;
|
|
||||||
actor.set_scale(1.0, 1.0);
|
|
||||||
actor.ease({
|
|
||||||
opacity: 255,
|
|
||||||
duration: WindowManager.MINIMIZE_WINDOW_ANIMATION_TIME,
|
|
||||||
mode: WindowManager.MINIMIZE_WINDOW_ANIMATION_MODE,
|
|
||||||
onStopped: () => this._unminimizeWindowDone(shellwm, actor),
|
|
||||||
});
|
|
||||||
} else { */
|
|
||||||
let [success, geom] = actor.meta_window.get_icon_geometry();
|
|
||||||
if (success) {
|
|
||||||
actor.set_position(geom.x, geom.y);
|
|
||||||
actor.set_scale(geom.width / actor.width,
|
|
||||||
geom.height / actor.height);
|
|
||||||
} else {
|
|
||||||
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
|
|
||||||
if (!monitor) {
|
|
||||||
actor.show();
|
|
||||||
this._unminimizeWindowDone();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
actor.set_position(monitor.x, opt.PANEL_POSITION_TOP ? monitor.y : monitor.y + monitor.height);
|
|
||||||
if (Clutter.get_default_text_direction() === Clutter.TextDirection.RTL)
|
|
||||||
actor.x += monitor.width;
|
|
||||||
actor.set_scale(0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
let rect = actor.meta_window.get_buffer_rect();
|
|
||||||
let [xDest, yDest] = [rect.x, rect.y];
|
|
||||||
|
|
||||||
actor.show();
|
|
||||||
actor.ease({
|
|
||||||
scale_x: 1,
|
|
||||||
scale_y: 1,
|
|
||||||
x: xDest,
|
|
||||||
y: yDest,
|
|
||||||
duration: WindowManager.MINIMIZE_WINDOW_ANIMATION_TIME,
|
|
||||||
mode: WindowManager.MINIMIZE_WINDOW_ANIMATION_MODE,
|
|
||||||
onStopped: () => this._unminimizeWindowDone(shellwm, actor),
|
|
||||||
});
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -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));
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,408 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<schemalist gettext-domain="vertical-workspaces">
|
|
||||||
<schema id="org.gnome.shell.extensions.vertical-workspaces" path="/org/gnome/shell/extensions/vertical-workspaces/">
|
|
||||||
<key type="i" name="ws-thumbnails-position">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="ws-thumbnails-full">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="secondary-ws-thumbnails-position">
|
|
||||||
<default>2</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="ws-max-spacing">
|
|
||||||
<default>350</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="ws-preview-scale">
|
|
||||||
<default>95</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="secondary-ws-preview-scale">
|
|
||||||
<default>100</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="secondary-ws-preview-shift">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-position">
|
|
||||||
<default>2</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-position-adjust">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="show-app-icon-position">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-show-windows-icon">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-show-recent-files-icon">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-show-extensions-icon">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="wst-position-adjust">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="show-wst-labels">
|
|
||||||
<default>3</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="show-wst-labels-on-hover">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="sec-wst-position-adjust">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="close-ws-button-mode">
|
|
||||||
<default>2</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="center-dash-to-ws">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="show-search-entry">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="center-search">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="center-app-grid">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="ws-thumbnail-scale">
|
|
||||||
<default>13</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="ws-thumbnail-scale-appgrid">
|
|
||||||
<default>13</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="secondary-ws-thumbnail-scale">
|
|
||||||
<default>13</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-max-icon-size">
|
|
||||||
<default>48</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-bg-opacity">
|
|
||||||
<default>85</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-bg-color">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-bg-radius">
|
|
||||||
<default>18</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="dash-bg-gs3-style">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="running-dot-style">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="enable-page-shortcuts">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="show-ws-switcher-bg">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="show-ws-preview-bg">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="ws-preview-bg-radius">
|
|
||||||
<default>30</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="show-bg-in-overview">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="overview-bg-blur-sigma">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-bg-blur-sigma">
|
|
||||||
<default>40</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="overview-bg-brightness">
|
|
||||||
<default>60</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="search-bg-brightness">
|
|
||||||
<default>30</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="smooth-blur-transitions">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-animation">
|
|
||||||
<default>4</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="search-view-animation">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="workspace-animation">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="workspace-switcher-animation">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="animation-speed-factor">
|
|
||||||
<default>100</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="win-preview-icon-size">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="win-title-position">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="startup-state">
|
|
||||||
<default>2</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="overview-mode">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="search-icon-size">
|
|
||||||
<default>96</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="search-width-scale">
|
|
||||||
<default>104</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-icon-size">
|
|
||||||
<default>-1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-columns">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-rows">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-order">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-folder-order">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-content">
|
|
||||||
<default>2</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-folder-icon-size">
|
|
||||||
<default>-1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-folder-columns">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-folder-rows">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-spacing">
|
|
||||||
<default>12</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="app-grid-incomplete-pages">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-names">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-folder-icon-grid">
|
|
||||||
<default>3</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="app-grid-active-preview">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="app-grid-folder-center">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="app-grid-page-width-scale">
|
|
||||||
<default>90</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-show-windows-before-activation">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="dash-icon-scroll">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="dash-isolate-workspaces">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="search-windows-icon-scroll">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="search-windows-enable">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="search-windows-order">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="search-fuzzy">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="search-max-results-rows">
|
|
||||||
<default>5</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="panel-visibility">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="panel-position">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="window-attention-mode">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="ws-sw-popup-h-position">
|
|
||||||
<default>50</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="ws-sw-popup-v-position">
|
|
||||||
<default>95</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="ws-sw-popup-mode">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="ws-switcher-wraparound">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="ws-switcher-ignore-last">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="favorites-notify">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="notification-position">
|
|
||||||
<default>2</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="osd-position">
|
|
||||||
<default>6</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="hot-corner-action">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="hot-corner-position">
|
|
||||||
<default>6</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="hot-corner-fullscreen">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="hot-corner-ripples">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="always-activate-selected-window">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="win-preview-sec-mouse-btn-action">
|
|
||||||
<default>2</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="win-preview-mid-mouse-btn-action">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="win-preview-show-close-button">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="window-icon-click-action">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="overlay-key-primary">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="overlay-key-secondary">
|
|
||||||
<default>1</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="overview-esc-behavior">
|
|
||||||
<default>0</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="new-window-focus-fix">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="app-grid-performance">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="i" name="window-thumbnail-scale">
|
|
||||||
<default>15</default>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key type="b" name="workspace-switcher-popup-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="workspace-animation-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="workspace-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="window-manager-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="window-preview-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="win-attention-handler-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="window-thumbnail-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="swipe-tracker-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="search-controller-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="search-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="panel-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="overlay-key-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="osd-window-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="message-tray-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="layout-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="dash-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="app-display-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="app-favorites-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="window-search-provider-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="recent-files-search-provider-module">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="extensions-search-provider-module">
|
|
||||||
<default>true</default>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key type="b" name="aaa-loading-profile">
|
|
||||||
<default>false</default>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key type="s" name="profile-name-1">
|
|
||||||
<default>""</default>
|
|
||||||
</key>
|
|
||||||
<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>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key type="s" name="profile-name-2">
|
|
||||||
<default>""</default>
|
|
||||||
</key>
|
|
||||||
<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>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key type="s" name="profile-name-3">
|
|
||||||
<default>""</default>
|
|
||||||
</key>
|
|
||||||
<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>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key type="s" name="profile-name-4">
|
|
||||||
<default>""</default>
|
|
||||||
</key>
|
|
||||||
<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>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
</schema>
|
|
||||||
</schemalist>
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
|
@ -5,6 +5,6 @@
|
||||||
"uuid": "disable-workspace-switcher@jbradaric.me",
|
"uuid": "disable-workspace-switcher@jbradaric.me",
|
||||||
"url": "https://github.com/jbradaric/disable-workspace-switcher",
|
"url": "https://github.com/jbradaric/disable-workspace-switcher",
|
||||||
"shell-version": [
|
"shell-version": [
|
||||||
"45"
|
"45", "46"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
|
@ -4,7 +4,7 @@ Gnome Shell extension that adds a hibernate/hybrid suspend button in Status menu
|
||||||
|
|
||||||
Originally developed by [@arelange](https://github.com/arelange) and then [@p91paul](https://github.com/p91paul). Now maintained by [@slaclau](https://github.com/slaclau).
|
Originally developed by [@arelange](https://github.com/arelange) and then [@p91paul](https://github.com/p91paul). Now maintained by [@slaclau](https://github.com/slaclau).
|
||||||
|
|
||||||
Supports GNOME 45.
|
Supports GNOME 45 and 46.
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "Hibernate Status Button",
|
"name": "Hibernate Status Button",
|
||||||
"url": "https://github.com/arelange/gnome-shell-extension-hibernate-status",
|
"url": "https://github.com/arelange/gnome-shell-extension-hibernate-status",
|
||||||
"description": "Adds a Hibernate button in Status menu. Using Alt modifier, you can also select Hybrid Sleep instead.",
|
"description": "Adds a Hibernate button in Status menu. Using Alt modifier, you can also select Hybrid Sleep instead.",
|
||||||
"shell-version": ["45"],
|
"shell-version": ["45", "46"],
|
||||||
"gettext-domain": "hibernate-status-button",
|
"gettext-domain": "hibernate-status-button",
|
||||||
"settings-schema": "org.gnome.shell.extensions.hibernate-status-button"
|
"settings-schema": "org.gnome.shell.extensions.hibernate-status-button"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
|
@ -3,7 +3,8 @@
|
||||||
"description": "Close windows with a button click (the middle one by default) when in overview mode",
|
"description": "Close windows with a button click (the middle one by default) when in overview mode",
|
||||||
"url": "https://github.com/p91paul/middleclickclose",
|
"url": "https://github.com/p91paul/middleclickclose",
|
||||||
"shell-version": [
|
"shell-version": [
|
||||||
"45"
|
"45",
|
||||||
|
"46"
|
||||||
],
|
],
|
||||||
"uuid": "middleclickclose@paolo.tranquilli.gmail.com",
|
"uuid": "middleclickclose@paolo.tranquilli.gmail.com",
|
||||||
"settings-schema": "org.gnome.shell.extensions.middleclickclose",
|
"settings-schema": "org.gnome.shell.extensions.middleclickclose",
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
26
extensions/46/no-overview/extension.js
Normal file
26
extensions/46/no-overview/extension.js
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
No overview at start-up
|
||||||
|
GNOME Shell 45+ extension
|
||||||
|
Contributors: @fthx
|
||||||
|
License: GPL v3
|
||||||
|
*/
|
||||||
|
|
||||||
|
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||||
|
|
||||||
|
export default class NoOverviewExtension {
|
||||||
|
enable() {
|
||||||
|
if (!Main.layoutManager._startingUp) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Main.layoutManager.connectObject(
|
||||||
|
'startup-complete',
|
||||||
|
() => Main.overview.hide(),
|
||||||
|
this
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
disable() {
|
||||||
|
Main.layoutManager.disconnectObject(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,12 +2,8 @@
|
||||||
"_generated": "Generated by SweetTooth, do not edit",
|
"_generated": "Generated by SweetTooth, do not edit",
|
||||||
"description": "No overview at start-up. Nothing more.",
|
"description": "No overview at start-up. Nothing more.",
|
||||||
"name": "No overview at start-up",
|
"name": "No overview at start-up",
|
||||||
"original-authors": [
|
"original-authors": ["fthx"],
|
||||||
"fthx"
|
"shell-version": ["46"],
|
||||||
],
|
|
||||||
"shell-version": [
|
|
||||||
"45"
|
|
||||||
],
|
|
||||||
"url": "https://github.com/fthx/no-overview",
|
"url": "https://github.com/fthx/no-overview",
|
||||||
"uuid": "no-overview@fthx",
|
"uuid": "no-overview@fthx",
|
||||||
"version": 999
|
"version": 999
|
|
@ -1,6 +1,6 @@
|
||||||
# Progress Linux: gnome-shell-extensions-extra
|
# Progress Linux: gnome-shell-extensions-extra
|
||||||
|
|
||||||
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
|
# Copyright (C) 2010-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0+
|
# SPDX-License-Identifier: GPL-3.0+
|
||||||
#
|
#
|
|
@ -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 = {
|
|
@ -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() {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue