klaxalk/i3-layout-manager

need manually edit the json file to make it work

Opened this issue · 4 comments

for some reason i cant get the script working. at first i need to hardcoded the usage vim instead of nvim. but it doesn't fix it.

after looking at the json file there is a , at the end of the swallow tag?(not sure what its called)

				"marks": [],
				"name": "zsh",
				"percent": 0.29,
				"swallows": [
				{
					"instance": "^kitty$", 
				}
				],
				"type": "con"
			},

removing it manually fix it.

edit:fix some formatting and typo

Yea I'm having the same issue. I had to manually get rid of the comma on the instance line.

Hmm, I will check it out. What configuration of "windows" do you have, how can I reproduce it?

I'm running a relatively new Manjaro i3 VM. I had 3 terminals as shown
image

Running and saving the layout (with DEFAULT-INSTANCE) works fine. But then loading the saved layout just echos the name of the json file

I followed the above procedure again just to be sure and here is the json file

[
{
	"border": "pixel",
		"floating": "auto_off",
		"fullscreen_mode": 0,
		"layout": "splith",
		"marks": [],
		"percent": null,
		"type": "con",
		"nodes": [
		{
			"border": "pixel",
			"floating": "auto_off",
			"layout": "splitv",
			"marks": [],
			"percent": 1,
			"type": "con",
			"nodes": [
			{
				"border": "pixel",
				"floating": "auto_off",
				"layout": "splith",
				"marks": [],
				"percent": 1,
				"type": "con",
				"nodes": [
				{
					"border": "pixel",
					"current_border_width": 1,
					"floating": "auto_off",
					"geometry": {
						"height": 1006,
						"width": 661,
						"x": 12,
						"y": 12
					},
					"marks": [],
					"name": "pgk@manjaro-Virtual:~",
					"percent": 0.5,
					"swallows": [
					{
						"instance": "^urxvt$",
					}
					],
					"type": "con"
				},
				{
					"border": "pixel",
					"floating": "auto_off",
					"layout": "splitv",
					"marks": [],
					"percent": 0.5,
					"type": "con",
					"nodes": [
					{
						"border": "pixel",
						"current_border_width": 1,
						"floating": "auto_off",
						"geometry": {
							"height": 364,
							"width": 724,
							"x": 0,
							"y": 0
						},
						"marks": [],
						"name": "pgk@manjaro-Virtual:~",
						"percent": 0.65,
						"swallows": [
						{
							"instance": "^urxvt$",
						}
						],
						"type": "con"
					},
					{
						"border": "pixel",
						"current_border_width": 1,
						"floating": "auto_off",
						"geometry": {
							"height": 364,
							"width": 724,
							"x": 0,
							"y": 0
						},
						"marks": [],
						"name": "pgk@manjaro-Virtual:~",
						"percent": 0.35,
						"swallows": [
						{
							"instance": "^urxvt$",
						}
						],
						"type": "con"
					}
					]
				}
				]
			}
			]
		}
		]
}
]

Removing the , after "instance": "^urxvt$" fixes this issue and it works as expected.

I had the same problem with the layout not working, until I applied the same fix, by removing the trailing comma at the end of the swallows argument, and the layout worked as expected.