diff --git a/README.md b/README.md index f4d04ce..a6fb921 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,23 @@ The file contains a description of the containers of a workspace with prefilled User is supposed to uncomment the desierd one (and/or modify it) and delete the unsused ones. Moreover, user should add a surrouding root container which is missing in the file (this baffles me, why cant they save it too?). -So doing it manually (which I dont want) consists of following steps: +So doing it manually (which I dont want) consists of following steps, as described at [i3wm.org](https://i3wm.org/docs/layout-saving.html): 1. export the workspace into jason using ```i3-save-tree --workspace ...``` 2. edit the json to match your desired matching rules for the windows 3. wrap the file in a root node, which defines the root split. 4. when needed, load the layout using ```i3-append ...``` -However, this plan has big flaws. Its not scalable, its not automated and loading of layout does not work when windows are already present in the current workspace. +However, this plan has flaws. +Its not scalable, its not automated and loading a layout does not work when windows are already present in the current workspace. To fix it, I built this **layout manager**. Currently, its a hacky-type of a shell script, but feel free to contribute :-). ## How does it work? +1. The workspace tree is exported usin ```i3-save-tree --workspace ...``` +2. The tree for all workpsaces in the cofused monitor is exported using ```i3-save-tree --output ...``` +3. The location of the current workspace in the all-tree is found by matching the workspace-tree file on the monitor-tree file. + TODO ## Dependencies diff --git a/layout_manager.sh b/layout_manager.sh index e476c75..7c5b480 100755 --- a/layout_manager.sh +++ b/layout_manager.sh @@ -10,7 +10,7 @@ # - i3-msg : i3 tui # - awk+sed+cat ... # -# vim foldmarks: set foldmarker=#\ #{,#\ #} +# vim: set foldmarker=#\ #{,#\ #} # #{ CHECK DEPENDENCIES