diff --git a/commentary.org b/commentary.org index c0c3d221e14396d281dd2d13a9b8d11acd79ed82..64e52ba103d02921c96b003d8d0383df93a9252e 100644 --- a/commentary.org +++ b/commentary.org @@ -1,9 +1,9 @@ -* TODO Make rules for tiling +* DONE Make rules for tiling ** DONE HACK Ignore yakuake and menus/dialogs for tiling ** DONE Add useractionsmenu * DONE Resize tiles Hacked for Spirallayout, working for Halflayout -* DONE Floating +* TODO Floating ** DONE Toggle floating Somehow client.tiling_floating stays the same across acesses (fixed?) ** DONE Floating layout/disable script @@ -11,30 +11,35 @@ ** DONE Make floating windows be _above_ tilers Somehow accessing client.keepAbove doesn't work Make configurable? + Curently floating windows are still handled somehow * TODO EDGECASES, EDGECASES, EDGECASES! ** TODO Doesn't tile properly when screen disappears ** DONE Don't tile fullscreen windows on workspace change ** TODO Windows can sometimes resize on their own (missing signal?) ** TODO Focus-follows-mouse doesn't properly refocus on window kill (kwin bug or timing mishap?) ** TODO Tileindex not properly set on workspace switch +** TODO Check how windows on all desktops behave * DONE Killing three clients in succession without opening another in between kills the script ** This was the result of removing an element from an array and afterwards accessing it by index * DONE Retile on minimize - * TODO Avoid struts Never noticed because I set the panel to autohide +** DONE Halflayout +** DONE Spirallayout +** DONE Bladelayout * TODO Testing ** Weird apps (mplayer, gimp) ** Weird configurations ** Multi-monitor (semi-tested right now) - ** Multiple workspaces (e.g. moving windows across, in floating and tiling mode) * TODO Learning -** How to add configuration ** How to use the tests ** Javascript - * TODO Optimization +** TODO Refactor layouts to share more code * TODO Crazy stuff - ** Overlap titlebars and abuse keepAbove to save space? +** Overlap titlebars and abuse keepAbove to save space? Can we even get the size of a window _without_ titlebar? +** Animate all windows on move +** Layout switcher +** Indicate layout/state (tiling on/off) somehow diff --git a/contents/code/bladelayout.js b/contents/code/bladelayout.js index 1026874169a170bd4effded0e523a34b6d77533e..32b3ed44afcf7516edd7c162f5cca6ad59ce4f0f 100644 --- a/contents/code/bladelayout.js +++ b/contents/code/bladelayout.js @@ -77,13 +77,11 @@ BladeLayout.prototype.addTile = function() { lastRect.y, Math.floor((this.screenRectangle.width + this.screenRectangle.x) / (this.tiles.length + 1)), this.screenRectangle.height); - print("newRect:", newRect.x, newRect.y, newRect.width, newRect.height); // FIXME: Try to keep ratio for (i = 0; i < this.tiles.length; i++) { var rect = this.tiles[i].rectangle; rect.x = newRect.x + newRect.width * i; rect.width = newRect.width; - print("Rect:",rect.x); this.tiles[i].rectangle = rect; } // Adjust tile's width for rounding errors @@ -115,7 +113,6 @@ BladeLayout.prototype.removeTile = function(tileIndex) { for (i = 0; i < this.tiles.length; i++) { var rect = this.tiles[i].rectangle; rect.x = newRect.x + newRect.width * i; - print("Rect:",rect.x); rect.width = newRect.width; this.tiles[i].rectangle = rect; this.tiles[i].hasDirectNeighbour[Direction.Left] = (i > 0); @@ -160,7 +157,6 @@ BladeLayout.prototype.resizeTile = function(tileIndex, rectangle) { this.screenRectangle.y, Math.floor(rectangle.x / tileIndex), this.screenRectangle.height); - print("newRect:", newRect.x, newRect.y, newRect.width, newRect.height); for(i = 0; i < tileIndex; i++) { var rect = this.tiles[i].rectangle; rect.x = newRect.x + newRect.width * i; diff --git a/contents/code/spirallayout.js b/contents/code/spirallayout.js index 263a7ff35c39f6fc2e3060117db0c3342b77aea7..8747158c9b2f014610a2333bd44182ebc11d405c 100644 --- a/contents/code/spirallayout.js +++ b/contents/code/spirallayout.js @@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. function SpiralLayout(screenRectangle) { Layout.call(this, screenRectangle); // TODO + print("Creating SpiralLayout"); } SpiralLayout.name = "Spiral"; @@ -132,7 +133,6 @@ SpiralLayout.prototype.removeTile = function(tileIndex) { } SpiralLayout.prototype.resizeTile = function(tileIndex, rectangle) { - print("SpiralLayout.resizeTile"); if (tileIndex < 0 || tileIndex > this.tiles.length) { print("Tileindex invalid", tileIndex, "/", this.tiles.length); return; diff --git a/contents/code/tilelist.js b/contents/code/tilelist.js index ad9fa9683590f51fb1beaa5628762e0854089e86..ccc9a7dd9971cd0636cabf67aeb07a4969ed275a 100644 --- a/contents/code/tilelist.js +++ b/contents/code/tilelist.js @@ -259,10 +259,7 @@ TileList._isIgnored = function(client) { var fl = "yakuake,krunner,Plasma,Plasma-desktop,plasma-desktop,Plugin-container,plugin-container,Wine"; // TODO: This could break if an entry contains whitespace or a comma - it needs to be validated on the qt side var floaters = String(readConfig("floaters", fl)).replace(/ /g,"").split(","); - print("Floaters: ",floaters); - print(client.resourceClass.toString()); if (floaters.indexOf(client.resourceClass.toString()) > -1) { - print("Client floating"); client.syncTabGroupFor("kwin_tiling_floats", true); return true; } diff --git a/contents/code/tilingmanager.js b/contents/code/tilingmanager.js index d62da3a9a5300ba98d747e7a3a0a4fefe50a06d0..cae7b2b63ff10420a373b67fb0cb2620c55b1e77 100644 --- a/contents/code/tilingmanager.js +++ b/contents/code/tilingmanager.js @@ -122,13 +122,13 @@ function TilingManager() { //client.tiling_floating = null; }); + // TODO: Properly tile on startup // Create the initial list of tiles existingClients.forEach(function(client) { + print("Adding existing client", client.resourceClass.toString()); self.tiles.addClient(client); }); - // TODO: Properly tile on startup - // Register global callbacks workspace.numberDesktopsChanged.connect(function() { self._onNumberDesktopsChanged(); @@ -172,9 +172,7 @@ function TilingManager() { print("No active client"); return; } - print("Toggling Floating for ", client.resourceClass.toString()); client.tiling_floating = !client.tiling_floating; - print(client.tiling_floating); if (client.tiling_floating == true) { self.tiles._onClientRemoved(client); } else {