[gnome-shell-extensions/wip/psychotic/activate-ws] Same functionality + configurability
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/wip/psychotic/activate-ws] Same functionality + configurability
- Date: Sat, 25 Nov 2017 04:25:04 +0000 (UTC)
commit 905111b872031c4b87836e546713d746b7102a60
Author: Stefan psYchotic Zwanenburg <stefanhetzwaantje gmail com>
Date: Wed Oct 26 20:52:00 2011 +0000
Same functionality + configurability
Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/1
extensions/auto-move-windows/extension.js | 7 +++++--
.../org.gnome.shell.extensions.auto-move-windows.gschema.xml | 4 ++++
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/extensions/auto-move-windows/extension.js b/extensions/auto-move-windows/extension.js
index e4c7fca..0e9e401 100644
--- a/extensions/auto-move-windows/extension.js
+++ b/extensions/auto-move-windows/extension.js
@@ -15,7 +15,8 @@ const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
-const SETTINGS_KEY = 'application-list';
+const SETTINGS_APPLICATION_LIST_KEY = 'application-list';
+const SETTINGS_AUTOSWITCH_WORKSPACE_KEY = 'autoswitch-workspace';
let settings;
@@ -49,7 +50,7 @@ const WindowMover = new Lang.Class({
if (window.skip_taskbar)
return;
- let spaces = this._settings.get_strv(SETTINGS_KEY);
+ let spaces = this._settings.get_strv(SETTINGS_APPLICATION_LIST_KEY);
let app = this._windowTracker.get_window_app(window);
if (!app) {
@@ -74,6 +75,8 @@ const WindowMover = new Lang.Class({
this._ensureAtLeastWorkspaces(workspace_num, window);
window.change_workspace_by_index(workspace_num, false);
+ if (this._settings.get_boolean(SETTINGS_AUTOSWITCH_WORKSPACE_KEY))
+ window.get_workspace().activate_with_focus(window, global.get_current_time());
}
}
}
diff --git a/extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml
b/extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml
index 1af61b3..e86d5b7 100644
--- a/extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml
+++ b/extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml
@@ -6,5 +6,9 @@
<summary>Application and workspace list</summary>
<description>A list of strings, each containing an application id (desktop file name), followed by a
colon and the workspace number</description>
</key>
+ <key name="autoswitch-workspace" type="b">
+ <default>false</default>
+ <_summary>Automatically switch to the workspace of automoved windows.</_summary>
+ </key>
</schema>
</schemalist>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]