mirror of
https://github.com/klaxalk/i3-layout-manager.git
synced 2025-06-20 19:47:41 +02:00
updated readme
This commit is contained in:
parent
d0fcc4374e
commit
44bc1161e4
22
README.md
22
README.md
@ -1,6 +1,28 @@
|
|||||||
# i3-layout-manager
|
# i3-layout-manager
|
||||||
Saving, loading and managing layouts for i3wm.
|
Saving, loading and managing layouts for i3wm.
|
||||||
|
|
||||||
|
## Preamble - dont worry, I solved all of this
|
||||||
|
|
||||||
|
i3 window manager supports saving and loading of window layouts, however, the features are bare-bone and partially missing.
|
||||||
|
According to the [manual](https://i3wm.org/docs/layout-saving.html), the layout tree can be exported into a json file.
|
||||||
|
The file contains a description of the containers of a workspace with prefilled (and commented) potential matching rules for the windows.
|
||||||
|
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:
|
||||||
|
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 it loading of 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 shell script, but feel free to contribute :-).
|
||||||
|
|
||||||
|
## How does it work?
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
* vim/nvim
|
* vim/nvim
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Author: klaxalk (klaxalk@gmail.com, github.com/klaxalk)
|
# Author: klaxalk (klaxalk@gmail.com, github.com/klaxalk)
|
||||||
|
#
|
||||||
# Dependencies:
|
# Dependencies:
|
||||||
# - vim/nvim : scriptable file editing
|
# - vim/nvim : scriptable file editing
|
||||||
# - jq : json manipulation
|
# - jq : json manipulation
|
||||||
@ -8,6 +9,10 @@
|
|||||||
# - xrandr : getting info of current monitor
|
# - xrandr : getting info of current monitor
|
||||||
# - i3-msg : i3 tui
|
# - i3-msg : i3 tui
|
||||||
# - awk+sed+cat ...
|
# - awk+sed+cat ...
|
||||||
|
#
|
||||||
|
# vim foldmarks: set foldmarker=#\ #{,#\ #}
|
||||||
|
|
||||||
|
# #{ CHECK DEPENDENCIES
|
||||||
|
|
||||||
VIM_BIN="$(whereis -b vim | awk '{print $2}')"
|
VIM_BIN="$(whereis -b vim | awk '{print $2}')"
|
||||||
NVIM_BIN="$(whereis -b nvim | awk '{print $2}')"
|
NVIM_BIN="$(whereis -b nvim | awk '{print $2}')"
|
||||||
@ -41,6 +46,8 @@ if [ -z "$ROFI_BIN" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# #}
|
||||||
|
|
||||||
LAYOUT_PATH=~/.layouts
|
LAYOUT_PATH=~/.layouts
|
||||||
|
|
||||||
# make directory for storing layouts
|
# make directory for storing layouts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user