added WindowLayout to Window structure introduced in Niri version 25.08

This commit is contained in:
2025-09-03 12:49:02 +02:00
parent 16d2e8e8fd
commit 9a77a7bbc3
3 changed files with 26 additions and 9 deletions

16
model_window_layout.go Normal file
View File

@ -0,0 +1,16 @@
package niri
import "encoding/json"
type WindowLayout struct {
PosInScrollingLayout Option[[2]int] `json:"pos_in_scrolling_layout"`
TileSize [2]float64 `json:"tile_size"`
WindowSize [2]int `json:"window_size"`
TilePosInWorkspaceView Option[[2]float64] `json:"tile_pos_in_workspace_view"`
WindowOffsetInTile [2]float64 `json:"window_offset_in_tile"`
}
func (m WindowLayout) String() string {
data, _ := json.MarshalIndent(m, "", "\t")
return string(data)
}