store

package
v0.0.0-...-2e55a2e Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	X              *xgbutil.XUtil  // X connection object
	ScreenCount    uint            // Number of screens
	CurrentDesk    uint            // Current desktop number
	CurrentScreen  uint            // Current screen number
	CurrentPointer *common.Pointer // Pointer position
	ActiveWindow   xproto.Window   // Current active window
	Windows        []xproto.Window // List of client windows
	ViewPorts      Head            // Physical connected monitors
)

Functions

func ActiveWindowGet

func ActiveWindowGet(X *xgbutil.XUtil) xproto.Window

func ClientListStackingGet

func ClientListStackingGet(X *xgbutil.XUtil) []xproto.Window

func Connect

func Connect() *xgbutil.XUtil

func CurrentDesktopGet

func CurrentDesktopGet(X *xgbutil.XUtil) uint

func DesktopDimensions

func DesktopDimensions(screenNum uint) (x, y, w, h int)

func GetScreenNum

func GetScreenNum(w xproto.Window) uint

func InitRoot

func InitRoot()

func IsIgnored

func IsIgnored(info *Info) bool

func IsMaximized

func IsMaximized(w xproto.Window) bool

func IsSpecial

func IsSpecial(info *Info) bool

func OnPointerUpdate

func OnPointerUpdate(fun func(uint16))

func OnStateUpdate

func OnStateUpdate(fun func(string))

func PhysicalHeadsGet

func PhysicalHeadsGet(rGeom xrect.Rect) xinerama.Heads

func PointerGet

func PointerGet(X *xgbutil.XUtil) *common.Pointer

func PointerUpdate

func PointerUpdate(X *xgbutil.XUtil)

func ScreenNumGet

func ScreenNumGet(p *common.Pointer) uint

func StateUpdate

func StateUpdate(X *xgbutil.XUtil, e xevent.PropertyNotifyEvent)

Types

type Client

type Client struct {
	Win      *xwindow.Window `json:"-"` // X window object
	Created  time.Time       // Internal client creation time
	Original *Info           // Original client window information
	Latest   *Info           // Latest client window information
}

func CreateClient

func CreateClient(w xproto.Window) *Client

func (*Client) Activate

func (c *Client) Activate()

func (*Client) MoveResize

func (c *Client) MoveResize(x, y, w, h int)

func (*Client) Pin

func (c *Client) Pin()

func (*Client) Restore

func (c *Client) Restore(original bool)

func (*Client) UnPin

func (c *Client) UnPin()

func (*Client) Update

func (c *Client) Update()

type Dimensions

type Dimensions struct {
	Geometry xrect.Rect        // Client window geometry
	Hints    Hints             // Client window dimension hints
	Extents  ewmh.FrameExtents // Client window geometry extents
	AdjPos   bool              // Adjust position on move/resize
	AdjSize  bool              // Adjust size on move/resize
}
type Head struct {
	Screens  xinerama.Heads // Screen size (full monitor size)
	Desktops xinerama.Heads // Desktop size (workarea without panels)
}

func ViewPortsGet

func ViewPortsGet(X *xgbutil.XUtil) Head

type Hints

type Hints struct {
	Normal icccm.NormalHints // Client window geometry hints
	Motif  motif.Hints       // Client window decoration hints
}

type Info

type Info struct {
	Class      string     // Client window application name
	Name       string     // Client window title name
	DeskNum    uint       // Client window desktop
	ScreenNum  uint       // Client window screen
	Types      []string   // Client window types
	States     []string   // Client window states
	Dimensions Dimensions // Client window dimensions
}

func GetInfo

func GetInfo(w xproto.Window) *Info

type Manager

type Manager struct {
	DeskNum   uint      // Index of managed desktop
	ScreenNum uint      // Index of managed screen
	Clients   []*Client // List of clients
}

func CreateManager

func CreateManager(deskNum uint, screenNum uint) *Manager

func (*Manager) AddClient

func (mg *Manager) AddClient(c *Client)

func (*Manager) Exists

func (mg *Manager) Exists(c *Client) bool

func (*Manager) Index

func (mg *Manager) Index(windows []*Client, c *Client) int

func (*Manager) RemoveClient

func (mg *Manager) RemoveClient(c *Client)

Jump to

Keyboard shortcuts

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