added WindowLayout to Window structure introduced in Niri version 25.08
This commit is contained in:
		
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							@ -1,6 +1,6 @@
 | 
				
			|||||||
module git.tordarus.net/niri-tools/niri
 | 
					module git.tordarus.net/niri-tools/niri
 | 
				
			||||||
 | 
					
 | 
				
			||||||
go 1.24.4
 | 
					go 1.25
 | 
				
			||||||
 | 
					
 | 
				
			||||||
require (
 | 
					require (
 | 
				
			||||||
	git.tordarus.net/tordarus/channel v0.1.20
 | 
						git.tordarus.net/tordarus/channel v0.1.20
 | 
				
			||||||
 | 
				
			|||||||
@ -13,6 +13,7 @@ type Window struct {
 | 
				
			|||||||
	Urgent      bool         `json:"is_urgent"`
 | 
						Urgent      bool         `json:"is_urgent"`
 | 
				
			||||||
	Floating    bool         `json:"is_floating"`
 | 
						Floating    bool         `json:"is_floating"`
 | 
				
			||||||
	Focused     bool         `json:"is_focused"`
 | 
						Focused     bool         `json:"is_focused"`
 | 
				
			||||||
 | 
						Layout      WindowLayout `json:"layout"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (m Window) String() string {
 | 
					func (m Window) String() string {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										16
									
								
								model_window_layout.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								model_window_layout.go
									
									
									
									
									
										Normal 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)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user