yabai

package
v0.0.0-...-56ccd80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2022 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(args ...string) error

Do sends yabai a command.

func FocusDisplay

func FocusDisplay(sel string) error

FocusDisplay focuses the selected display.

func FocusNextWindow

func FocusNextWindow() error

FocusNextWindow moves to the next window.

func FocusPrevWindow

func FocusPrevWindow() error

FocusPrevWindow moves to the previous window.

func FocusSpace

func FocusSpace(sel string) error

FocusSpace chanegs the space on the current display.

func FocusWindow

func FocusWindow(sel string) error

FocusWindow focuses a window.

func Query

func Query[T any](args ...string) ([]T, error)

Qurey queries yabai for information and unmarshals it.

func RotateWindowsClockwise

func RotateWindowsClockwise() error

RotateWindowsClockwise rotates tHe current window to the next monitor.

func SetLayout

func SetLayout(layout Layout) error

SetLayout sets the layout of the current space.

func SetWindowSpace

func SetWindowSpace(sel string) error

SetWindowSpace sets the space of the current window.

func SwapNextWindow

func SwapNextWindow() error

SwapNextWindow swaps the window with the next one.

On space boundary, it moves it to the next monitor.

func SwapPrevWindow

func SwapPrevWindow() error

SwapPrevWindow swaps the window with the previous one.

On space boundary, it moves it to the previous monitor.

func SwapWindow

func SwapWindow(sel string) error

SwapWindow swaps the focused window with the selected one.

Types

type Display

type Display struct {
	Index  int   `json:"index"`
	Spaces []int `json:"spaces"`
}

Display is a connected displays.

func Displays

func Displays() ([]Display, error)

Displays returns all displays known to the system.

func (Display) MarshalEasyJSON

func (v Display) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Display) MarshalJSON

func (v Display) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Display) UnmarshalEasyJSON

func (v *Display) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Display) UnmarshalJSON

func (v *Display) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Layout

type Layout string
var (
	BSP   Layout = "layout"
	Stack Layout = "stack"
	Float Layout = "float"
)

type Space

type Space struct {
	Index              int    `json:"index"`
	Label              string `json:"label"`
	Display            int    `json:"display"`
	Windows            []int  `json:"windows"`
	FirstWindow        int    `json:"first-window"`
	LastWindow         int    `json:"last-window"`
	HasFocus           bool   `json:"has-focus"`
	IsVisible          bool   `json:"is-visible"`
	IsNativeFullScreen bool   `json:"is-native-fullscreen"`
}

Space is a connected displays.

func FocusedSpace

func FocusedSpace() (*Space, error)

FocusedSpace returns the focused space.

func Spaces

func Spaces() ([]Space, error)

Spaces returns all spaces known to the system.

func (Space) MarshalEasyJSON

func (v Space) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Space) MarshalJSON

func (v Space) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Space) UnmarshalEasyJSON

func (v *Space) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Space) UnmarshalJSON

func (v *Space) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Window

type Window struct {
	App                string `json:"app"`
	Title              string `json:"title"`
	Display            int    `json:"display"`
	Space              int    `json:"space"`
	SplitType          string `json:"split-type"`
	StackIndex         int    `json:"stack-index"`
	HasFocus           bool   `json:"has-focus"`
	IsVisible          bool   `json:"is-visible"`
	IsNativeFullScreen bool   `json:"is-native-fullscreen"`
	IsMinimized        bool   `json:"is-minimized"`
}

Window is an open window.

func Windows

func Windows() ([]Window, error)

Windows returns all windows open on the current space.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL