Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 95eb37ddd0 | |||
| fe3b242476 | |||
| 5614e5fff2 | |||
| 4de841d8b0 | |||
| b0586e9c36 | |||
| c39a6799e2 | |||
| c495c85e95 | |||
| ca9ea8fcff | |||
| 0a122565b8 | |||
| 524098ce68 | |||
| c5e692bb45 | |||
| 421fb8796f |
@@ -28,8 +28,8 @@ This extension was built from the ground up to be stable and performant on **GNO
|
||||
* **Interactive Window Swapping:**
|
||||
* **Drag & Drop:** Swap any two windows by simply dragging one and dropping it over the other.
|
||||
* **Keyboard Shortcuts:** A full set of keyboard shortcuts allows you to swap the focused window with the master or with its nearest neighbor in any direction (left, right, up, down).
|
||||
* **Interactive Window Focus Switcher:** Change the current window focus with a set of customizable keyboard shortcuts in every direction.
|
||||
* **Simple Settings Panel:** A simple settings panel within the gnome extension manager menu to adjust key bindings and window gaps / margins.
|
||||
* **Interactive Window Focus Switcher:** Change the current window focus with a set of customizable keyboard shortcuts in every direction (left, right, up, down).
|
||||
* **Simple Settings Panel:** A simple settings panel within the gnome extension manager menu to adjust key bindings, window gaps / margins and window behavior.
|
||||
* **External Exception List:** Use a simple `exceptions.txt` file to list applications (by their `WM_CLASS`) that should be ignored by the tiling manager.
|
||||
* **Smart Pop-up Handling:** Windows on the exception list, as well as dialogs and other pop-ups, are automatically centered and kept "always on top" for a smooth workflow.
|
||||
* **Configurable Tiling Window Delays:** Easily configure the tiling window delays if you have race condition issues by editing variables directly in the `extension.js`.
|
||||
@@ -66,7 +66,7 @@ Use the [GNOME Shell Extensions website](https://extensions.gnome.org/extension/
|
||||
|
||||
#### Keyboard Shortcuts
|
||||
|
||||
All keyboard shortcuts can be configured through the Settings panel of Simple Tiling (which can be found in the Gnome Extesion Application):
|
||||
All keyboard shortcuts can be configured through the Settings panel of Simple Tiling (which can be found in the Gnome Extension Application):
|
||||
1. Open **Settings**.
|
||||
2. Navigate to **Keyboard** -> **View and Customize Shortcuts**.
|
||||
3. Scroll down to the **Custom Shortcuts** section at the bottom.
|
||||
|
||||
+25
-6
@@ -1,5 +1,5 @@
|
||||
// ---------------------------------------------------- //
|
||||
// Simple-Tiling – GNOME Shell 3.38 (X11) - Version 4 //
|
||||
// Simple-Tiling – GNOME Shell 3.38 (X11) - Version 5 //
|
||||
// © 2025 domoel – MIT //
|
||||
// ---------------------------------------------------- //
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
const Main = imports.ui.main;
|
||||
const Meta = imports.gi.Meta;
|
||||
const Shell = imports.gi.Shell;
|
||||
const Mainloop = imports.mainloop;
|
||||
const Gio = imports.gi.Gio;
|
||||
const GLib = imports.gi.GLib;
|
||||
const ExtensionUtils = imports.misc.extensionUtils;
|
||||
@@ -88,6 +87,7 @@ class InteractionHandler {
|
||||
this._settingsChangedId = null;
|
||||
}
|
||||
this._grabOpIds.forEach((id) => global.display.disconnect(id));
|
||||
this._grabOpIds = [];
|
||||
}
|
||||
|
||||
_bind(key, callback) {
|
||||
@@ -325,6 +325,9 @@ class Tiler {
|
||||
this._exceptions = [];
|
||||
this._interactionHandler = new InteractionHandler(this);
|
||||
|
||||
this._tileTimeoutId = null;
|
||||
this._centerTimeoutIds = [];
|
||||
|
||||
this._onWindowAdded = this._onWindowAdded.bind(this);
|
||||
this._onWindowRemoved = this._onWindowRemoved.bind(this);
|
||||
this._onActiveWorkspaceChanged = this._onActiveWorkspaceChanged.bind(
|
||||
@@ -355,6 +358,13 @@ class Tiler {
|
||||
}
|
||||
|
||||
disable() {
|
||||
if (this._tileTimeoutId) {
|
||||
GLib.source_remove(this._tileTimeoutId);
|
||||
this._tileTimeoutId = null;
|
||||
}
|
||||
this._centerTimeoutIds.forEach(id => GLib.source_remove(id));
|
||||
this._centerTimeoutIds = [];
|
||||
|
||||
this._interactionHandler.disable();
|
||||
this._disconnectFromWorkspace();
|
||||
for (const [, signal] of this._signalIds) {
|
||||
@@ -408,7 +418,12 @@ class Tiler {
|
||||
}
|
||||
|
||||
_centerWindow(win) {
|
||||
Mainloop.timeout_add(this._centeringDelay, () => {
|
||||
const timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, this._centeringDelay, () => {
|
||||
const index = this._centerTimeoutIds.indexOf(timeoutId);
|
||||
if (index > -1) {
|
||||
this._centerTimeoutIds.splice(index, 1);
|
||||
}
|
||||
|
||||
if (!win || !win.get_display()) return GLib.SOURCE_REMOVE;
|
||||
if (win.get_maximized()) {
|
||||
win.unmaximize(Meta.MaximizeFlags.BOTH);
|
||||
@@ -423,7 +438,7 @@ class Tiler {
|
||||
workArea.x + Math.floor((workArea.width - frame.width) / 2),
|
||||
workArea.y + Math.floor((workArea.height - frame.height) / 2)
|
||||
);
|
||||
Mainloop.idle_add(() => {
|
||||
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
|
||||
if (win.get_display()) {
|
||||
if (typeof win.set_keep_above === "function")
|
||||
win.set_keep_above(true);
|
||||
@@ -434,6 +449,8 @@ class Tiler {
|
||||
});
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
|
||||
this._centerTimeoutIds.push(timeoutId);
|
||||
}
|
||||
|
||||
_onWindowMinimizedStateChanged() {
|
||||
@@ -535,11 +552,13 @@ class Tiler {
|
||||
}
|
||||
|
||||
queueTile() {
|
||||
if (this._tileInProgress) return;
|
||||
if (this._tileInProgress || this._tileTimeoutId) return;
|
||||
this._tileInProgress = true;
|
||||
Mainloop.timeout_add(this._tilingDelay, () => {
|
||||
|
||||
this._tileTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, this._tilingDelay, () => {
|
||||
this._tileWindows();
|
||||
this._tileInProgress = false;
|
||||
this._tileTimeoutId = null;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"uuid": "simple-tiling@domoel",
|
||||
"name": "Simple Tiling",
|
||||
"description": "A Simple Tiling Extension for Gnome Shell 3.38.",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"shell-version": [ "3.38" ],
|
||||
"settings-schema": "org.gnome.shell.extensions.simple-tiling.domoel",
|
||||
"preferences_ui": "prefs.js",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// ------------------------------------------------------ //
|
||||
// Extension Settings Menu for Simple Tiling - Version 4 //
|
||||
// Extension Settings Menu for Simple Tiling - Version 5 //
|
||||
// © 2025 domoel – MIT //
|
||||
// ------------------------------------------------------ //
|
||||
|
||||
@@ -66,41 +66,17 @@ function buildPrefsWidget() {
|
||||
GObject.TYPE_INT,
|
||||
]);
|
||||
|
||||
addKeybinding(
|
||||
store,
|
||||
settings,
|
||||
"swap-master-window",
|
||||
"Master-Fenster tauschen"
|
||||
);
|
||||
addKeybinding(
|
||||
store,
|
||||
settings,
|
||||
"swap-left-window",
|
||||
"Fenster nach links tauschen"
|
||||
);
|
||||
addKeybinding(
|
||||
store,
|
||||
settings,
|
||||
"swap-right-window",
|
||||
"Fenster nach rechts tauschen"
|
||||
);
|
||||
addKeybinding(
|
||||
store,
|
||||
settings,
|
||||
"swap-up-window",
|
||||
"Fenster nach oben tauschen"
|
||||
);
|
||||
addKeybinding(
|
||||
store,
|
||||
settings,
|
||||
"swap-down-window",
|
||||
"Fenster nach unten tauschen"
|
||||
);
|
||||
addKeybinding(store, settings, "swap-master-window", "Master-Fenster tauschen");
|
||||
|
||||
addKeybinding(store, settings, "swap-up-window", "Fenster nach oben tauschen");
|
||||
addKeybinding(store, settings, "swap-down-window", "Fenster nach unten tauschen");
|
||||
addKeybinding(store, settings, "swap-left-window", "Fenster nach links tauschen");
|
||||
addKeybinding(store, settings, "swap-right-window", "Fenster nach rechts tauschen");
|
||||
|
||||
addKeybinding(store, settings, "focus-left", "Fokus nach links wechseln");
|
||||
addKeybinding(store, settings, "focus-right", "Fokus nach rechts wechseln");
|
||||
addKeybinding(store, settings, "focus-up", "Fokus nach oben wechseln");
|
||||
addKeybinding(store, settings, "focus-down", "Fokus nach unten wechseln");
|
||||
addKeybinding(store, settings, "focus-left", "Fokus nach links wechseln");
|
||||
addKeybinding(store, settings, "focus-right", "Fokus nach rechts wechseln");
|
||||
|
||||
let treeView = new Gtk.TreeView({
|
||||
model: store,
|
||||
|
||||
Binary file not shown.
@@ -1,19 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<schemalist>
|
||||
<schema id="org.gnome.shell.extensions.simple-tiling.domoel" path="/org/gnome/shell/extensions/simple-tiling-domoel/">
|
||||
<schema id="org.gnome.shell.extensions.simple-tiling.domoel" path="/org/gnome/shell/extensions/simple-tiling/domoel/">
|
||||
|
||||
<key name="swap-master-window" type="as">
|
||||
<default><![CDATA[['<Super>Return']]]></default>
|
||||
<summary>Tauscht das fokussierte Fenster mit dem Master.</summary>
|
||||
</key>
|
||||
<key name="swap-left-window" type="as">
|
||||
<default><![CDATA[['<Super>Left']]]></default>
|
||||
<summary>Tauscht das Fenster mit dem linken Nachbarn.</summary>
|
||||
</key>
|
||||
<key name="swap-right-window" type="as">
|
||||
<default><![CDATA[['<Super>Right']]]></default>
|
||||
<summary>Tauscht das Fenster mit dem rechten Nachbarn.</summary>
|
||||
</key>
|
||||
<key name="swap-up-window" type="as">
|
||||
<default><![CDATA[['<Super>Up']]]></default>
|
||||
<summary>Tauscht das Fenster mit dem oberen Nachbarn.</summary>
|
||||
@@ -22,21 +14,29 @@
|
||||
<default><![CDATA[['<Super>Down']]]></default>
|
||||
<summary>Tauscht das Fenster mit dem unteren Nachbarn.</summary>
|
||||
</key>
|
||||
<key name="swap-left-window" type="as">
|
||||
<default><![CDATA[['<Super>Left']]]></default>
|
||||
<summary>Tauscht das Fenster mit dem linken Nachbarn.</summary>
|
||||
</key>
|
||||
<key name="swap-right-window" type="as">
|
||||
<default><![CDATA[['<Super>Right']]]></default>
|
||||
<summary>Tauscht das Fenster mit dem rechten Nachbarn.</summary>
|
||||
</key>
|
||||
|
||||
<key name="focus-up" type="as">
|
||||
<default><![CDATA[['<Alt>k']]]></default>
|
||||
<default><![CDATA[['<Alt>Up']]]></default>
|
||||
<summary>Fokus zum oberen Fenster wechseln.</summary>
|
||||
</key>
|
||||
<key name="focus-down" type="as">
|
||||
<default><![CDATA[['<Alt>j']]]></default>
|
||||
<default><![CDATA[['<Alt>Down']]]></default>
|
||||
<summary>Fokus zum unteren Fenster wechseln.</summary>
|
||||
</key>
|
||||
<key name="focus-left" type="as">
|
||||
<default><![CDATA[['<Alt>h']]]></default>
|
||||
<default><![CDATA[['<Alt>Left']]]></default>
|
||||
<summary>Fokus zum linken Fenster wechseln.</summary>
|
||||
</key>
|
||||
<key name="focus-right" type="as">
|
||||
<default><![CDATA[['<Alt>l']]]></default>
|
||||
<default><![CDATA[['<Alt>Right']]]></default>
|
||||
<summary>Fokus zum rechten Fenster wechseln.</summary>
|
||||
</key>
|
||||
|
||||
@@ -44,14 +44,14 @@
|
||||
<default>10</default>
|
||||
<summary>Der Abstand zwischen den Fenstern in Pixeln.</summary>
|
||||
</key>
|
||||
<key name="outer-gap-horizontal" type="i">
|
||||
<default>5</default>
|
||||
<summary>Der Abstand zum linken und rechten Bildschirmrand.</summary>
|
||||
</key>
|
||||
<key name="outer-gap-vertical" type="i">
|
||||
<default>5</default>
|
||||
<summary>Der Abstand zum oberen und unteren Bildschirmrand.</summary>
|
||||
</key>
|
||||
<key name="outer-gap-horizontal" type="i">
|
||||
<default>10</default>
|
||||
<summary>Der Abstand zum linken und rechten Bildschirmrand.</summary>
|
||||
</key>
|
||||
|
||||
<key name="new-window-behavior" type="s">
|
||||
<default>'stack'</default>
|
||||
|
||||
Reference in New Issue
Block a user