kitty @ ls: Also report layout options

This commit is contained in:
Kovid Goyal
2021-10-21 13:44:06 +05:30
parent 6546c1da9b
commit 4fd76b09d9
4 changed files with 13 additions and 0 deletions
+3
View File
@@ -28,6 +28,9 @@ class LayoutOpts:
def __init__(self, data: Dict[str, str]):
pass
def serialized(self) -> Dict[str, Any]:
return {}
class LayoutData(NamedTuple):
content_pos: int = 0
+3
View File
@@ -388,6 +388,9 @@ class SplitsLayoutOpts(LayoutOpts):
def __init__(self, data: Dict[str, str]):
self.default_axis_is_horizontal = data.get('split_axis', 'horizontal') == 'horizontal'
def serialized(self) -> Dict[str, Any]:
return {'default_axis_is_horizontal': self.default_axis_is_horizontal}
class Splits(Layout):
name = 'splits'
+3
View File
@@ -72,6 +72,9 @@ class TallLayoutOpts(LayoutOpts):
self.bias = tuple(repeat(b / fs, fs)) + (1.0 - b,)
self.mirrored = to_bool(data.get('mirrored', 'false'))
def serialized(self) -> Dict[str, Any]:
return {'full_size': self.full_size, 'bias': self.bias, 'mirrored': self.mirrored}
class Tall(Layout):