Tiling-Assistant icon indicating copy to clipboard operation
Tiling-Assistant copied to clipboard

Ordering layouts feature

Open andresimi opened this issue 1 year ago • 3 comments

Hi guys, thank you for the extention. It is a very usefull one. I have a minor suggestion: when we click on the "edit layouts", we could also have the option to reorder the layouts the way we want. So when we move the mouse to the top screen it is easiest to find the one we want. The way it is we have to delete all the layouts and then start to rebuild them in the order we want. Best!

andresimi avatar Oct 24 '24 11:10 andresimi

A workaround for now is to manually sort /home/<USERNAME>/.config/tiling-assistant/layouts.json (or whereever your XDG_CONFIG_HOME is).

Leleat avatar Nov 02 '24 13:11 Leleat

Thanks for the tip @Leleat.

I gave editing the json a try but gave up because it was near impossible for me to delineate between the items so I could rearrange them. They are all on one line with no clear delineation:

[{"_name":"Master and Stack [V]","_items":[{"rect":{"x":0,"y":0,"width":0.5,"height":1},"appId":null,"loopType":null},{"rect":{"x":0.5,"y":0,"width":0.5,"height":1},"appId":null,"loopType":"h"}]},{"_name":"N-Columns","_items":[{"rect":{"x":0,"y":0,"width":1,"height":1},"appId":null,"loopType":"v"}]},{"_name":"2 : 1 [V]","_items":[{"rect":{"x":0,"y":0,"width":0.66,"height":1},"appId":null,"loopType":null},{"rect":{"x":0.66,"y":0,"width":0.34,"height":1},"appId":null,"loopType":null}]},{"_name":"4 Quarters","_items":[{"rect":{"x":0,"y":0,"width":0.5,"height":0.5},"appId":null,"loopType":null},{"rect":{"x":0.5,"y":0,"width":0.5,"height":0.5},"appId":null,"loopType":null},{"rect":{"x":0,"y":0.5,"width":0.5,"height":0.5},"appId":null,"loopType":null},{"rect":{"x":0.5,"y":0.5,"width":0.5,"height":0.5},"appId":null,"loopType":null}]}]

It looks like a simple list but to a general user like me there is no pattern to the syntax, no clear indication to the layman about where one item starts and where one ends. I've tried adding temporary line breaks to break them up but that just proved I was getting it wrong. I know this is a json thing, just the way the configuration is supposed to be stored, and I only mention it here in case it might give this enhancement suggestion a solid bump.

~~Pretend strike-through formatting starts here Edit: neverming, ChatGPT is your friend here:

Right now this is the only way to re-order the layouts (other than deleting them all and adding again in the desired order). The Github has a feature request to add reordering but until they do they suggest reordering this json. I am having a hard time with the syntax, there doesn't seem to be a consistent delineation to a layman like me. Could you reorder the layouts in this json so that the last one in the image becomes the third one? Thanks.

[
  {
    "_name": "Master and Stack [V]",
    "_items": [
      { "rect": { "x": 0, "y": 0, "width": 0.5, "height": 1 }, "appId": null, "loopType": null },
      { "rect": { "x": 0.5, "y": 0, "width": 0.5, "height": 1 }, "appId": null, "loopType": "h" }
    ]
  },
  {
    "_name": "N-Columns",
    "_items": [
      { "rect": { "x": 0, "y": 0, "width": 1, "height": 1 }, "appId": null, "loopType": "v" }
    ]
  },
  {
    "_name": "4 Quarters",
    "_items": [
      { "rect": { "x": 0, "y": 0, "width": 0.5, "height": 0.5 }, "appId": null, "loopType": null },
      { "rect": { "x": 0.5, "y": 0, "width": 0.5, "height": 0.5 }, "appId": null, "loopType": null },
      { "rect": { "x": 0, "y": 0.5, "width": 0.5, "height": 0.5 }, "appId": null, "loopType": null },
      { "rect": { "x": 0.5, "y": 0.5, "width": 0.5, "height": 0.5 }, "appId": null, "loopType": null }
    ]
  },
  {
    "_name": "2 : 1 [V]",
    "_items": [
      { "rect": { "x": 0, "y": 0, "width": 0.66, "height": 1 }, "appId": null, "loopType": null },
      { "rect": { "x": 0.66, "y": 0, "width": 0.34, "height": 1 }, "appId": null, "loopType": null }
    ]
  }
]

~~Pretend strike-through formatting ends here

Nevermind. Did not work. It doesn't seem to read from the updated json no matter how many restarts, etc. Perhaps it caches the configuration somewhere else? In any case I had to delete and start again. Hope they add this feature!

morrisonpeter avatar Jul 29 '25 23:07 morrisonpeter

@morrisonpeter There is no need to restart or do anything else after you've saved the changed config file. The change will be picked up when you open the popup. Here is a screencast of me switching out the 3rd and 4th item.

https://github.com/user-attachments/assets/398348d4-0b6f-4db5-9b5c-c814538a1bec

Hope they add this feature!

Tbh, I am no longer a student and work full-time. So I don't have much time (or motivation) to work on Tiling Assistant anymore since I consider Tiling Assistant fairly feature-complete at this point. I only keep the extension updated with each GNOME release and fix major bugs. If this feature needs implementing, someone else needs to open a PR for it.

Another tiling extension worth checking out is https://extensions.gnome.org/extension/7065/tiling-shell/. The developer actively works on it (i.e. more than just maintanence, they are adding features). That extension offers (almost) all features of Tiling Assistant. Some features are even more polished like their layouts.

Leleat avatar Jul 30 '25 19:07 Leleat