Documentation
¶
Overview ¶
Package hypr shows the shared Chrome window on screen for a browse turn under Hyprland and puts it back after: Chrome draws nothing in a window the compositor does not show (on a workspace not shown, under a special workspace shown over its own, behind the front window of a monocle workspace), and a turn's draw checks, screenshots and clicks fail there. It only dispatches window moves; it never reads or changes Hyprland's configuration (keybinds, rules, workspace settings).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Size = [2]int{1280, 800}
Size is the size the shown window gets, at most: big enough for a page's screenshot, small enough to leave most of the person's screen in view.
Functions ¶
Types ¶
type Monitor ¶
type Monitor struct {
ID int `json:"id"`
Name string `json:"name"`
X int `json:"x"`
Y int `json:"y"`
Width int `json:"width"`
Height int `json:"height"`
Scale float64 `json:"scale"`
Reserved [4]int `json:"reserved"`
ActiveWorkspace Workspace `json:"activeWorkspace"`
SpecialWorkspace Workspace `json:"specialWorkspace"`
Focused bool `json:"focused"`
}
Monitor is a monitor as hyprctl monitors names it: X and Y in layout coordinates, Width and Height in pixels, Reserved the bars' left, top, right and bottom.
type Shown ¶
type Shown struct {
// Before is the window as it was; Where says where that was.
Before Window
Where string
// To is the workspace it was shown on.
To Workspace
// Left says why Restore left the window where it was: closed, or moved
// by the person to another workspace; "" when it put it back.
Left string
// contains filtered or unexported fields
}
Shown is a window a placement moved on screen, with what it was before.
func Show ¶
Show brings Chrome's browser window on screen when the compositor does not show it: onto the workspace its monitor shows, floating at Size in the monitor's lower right corner, the focus left where it is. It returns nil when there is no browser window or it is shown already; a step that fails is undone and its error names where the window is.
func (*Shown) Restore ¶
Restore puts the window back as it was: its size and position when it floated, tiled again when it did not, on its own workspace. One the person moved back to its own workspace is only given its float and size back; one closed since, or moved to a third workspace, is left where it is, and Left says so.
type Window ¶
type Window struct {
Address string `json:"address"`
Class string `json:"class"`
Workspace Workspace `json:"workspace"`
At [2]int `json:"at"`
Size [2]int `json:"size"`
Floating bool `json:"floating"`
Fullscreen int `json:"fullscreen"`
Monitor int `json:"monitor"`
FocusHistoryID int `json:"focusHistoryID"`
}
Window is a client as hyprctl clients names it.