Commit 905111b8 authored by Stefan psYchotic Zwanenburg's avatar Stefan psYchotic Zwanenburg Committed by Florian Müllner

Same functionality + configurability

Fixes #1
parent 724249dd
......@@ -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());
}
}
}
......
......@@ -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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment