feat: save i3 layout and auto load it

This commit is contained in:
Ryan Yin
2023-06-17 23:24:19 +08:00
parent d53ed4ef7e
commit dae0504f5c
7 changed files with 165 additions and 21 deletions

View File

@@ -0,0 +1,7 @@
# I3 Layouts
This directory contains the layouts for i3.
The are generated using the `i3-save-tree` command, and need to customized to make it work.
See the [i3 user guide](https://i3wm.org/docs/layout-saving.html) for more information.

View File

@@ -0,0 +1,116 @@
// vim:ts=4:sw=4:et
{
// splitv split container with 2 children
"border": "pixel",
"floating": "auto_off",
"layout": "splitv",
"marks": [],
"percent": 0.5,
"type": "con",
"nodes": [
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 600,
"width": 800,
"x": 0,
"y": 0
},
"marks": [],
"name": "Alacritty",
"percent": 0.5,
"swallows": [
{
"class": "^Alacritty$",
"instance": "^Alacritty$",
"machine": "^ai$",
"title": "^ai$"
}
],
"type": "con"
},
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 600,
"width": 800,
"x": 0,
"y": 0
},
"marks": [],
"name": "Alacritty",
"percent": 0.5,
"swallows": [
{
"class": "^Alacritty$",
"instance": "^Alacritty$",
"machine": "^ai$",
"title": "^ruby$"
}
],
"type": "con"
}
]
}
{
// splitv split container with 2 children
"border": "pixel",
"floating": "auto_off",
"layout": "splitv",
"marks": [],
"percent": 0.5,
"type": "con",
"nodes": [
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 600,
"width": 800,
"x": 0,
"y": 0
},
"marks": [],
"name": "Alacritty",
"percent": 0.5,
"swallows": [
{
"class": "^Alacritty$",
"instance": "^Alacritty$",
"machine": "^ai$",
"title": "^aquamarine$"
}
],
"type": "con"
},
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 600,
"width": 800,
"x": 0,
"y": 0
},
"marks": [],
"name": "Alacritty",
"percent": 0.5,
"swallows": [
{
"class": "^Alacritty$",
"instance": "^Alacritty$",
"machine": "^ai$",
"title": "^kana$"
}
],
"type": "con"
}
]
}