Also output layout state in kitty @ ls

This commit is contained in:
Kovid Goyal
2021-04-17 12:11:56 +05:30
parent cf0b2389a3
commit 518057489c
6 changed files with 45 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ from functools import lru_cache
from itertools import repeat
from math import ceil, floor
from typing import (
Callable, Dict, Generator, List, Optional, Sequence, Set, Tuple
Any, Callable, Dict, Generator, List, Optional, Sequence, Set, Tuple
)
from kitty.borders import BorderColor
@@ -294,3 +294,9 @@ class Grid(Layout):
'left': side(row, col, -1) if col else [],
'right': side(row, col, 1) if col < ncols - 1 else [],
}
def layout_state(self) -> Dict[str, Any]:
return {
'biased_cols': self.biased_cols,
'biased_rows': self.biased_rows
}