wm

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	XUtil *xgbutil.XUtil
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// tiling window gaps, unfocused/focused window border colors, mod key for all wm actions, window border width, keybinds
	Gap            uint32    `koanf:"gaps"`
	BorderUnactive uint32    `koanf:"unactive-border-color"`
	BorderActive   uint32    `koanf:"active-border-color"`
	ModKey         string    `koanf:"mod-key"`
	BorderWidth    uint32    `koanf:"border-width"`
	Keybinds       []Keybind `koanf:"keybinds"`
}

type Keybind

type Keybind struct {
	// keycode, the letter of the key, if shift should be pressed, command (can be empty), role in wm (can be empty)
	Keycode uint32
	Key     string `koanf:"key"`
	Shift   bool   `koanf:"shift"`
	Exec    string `koanf:"exec"`
	Role    string `koanf:"role"`
}

type Layout

type Layout struct {
	Windows []LayoutWindow
}

a tiling layout of windows

type LayoutWindow

type LayoutWindow struct {
	WidthPercentage, HeightPercentage, XPercentage, YPercentage float64
}

where a window is on a layout (dynamic by using percentages)

type Space

type Space struct {
	X, Y          int
	Width, Height int
}

an area on the screen

type Window

type Window struct {
	X, Y          int
	Width, Height int
	Fullscreen    bool
	// contains filtered or unexported fields
}

basic window struct

type WindowManager

type WindowManager struct {
	// contains filtered or unexported fields
}

the connection, root window, width and height of screen, workspaces, the current workspace index, the current workspace, atoms for EMWH, if the wm is tiling, the space for tiling windows to be, the different tiling layouts, the wm condig, the mod key

func Create

func Create() (*WindowManager, error)

create the X connection and get the root window, create workspaces and create window manager struct

func (*WindowManager) Close

func (wm *WindowManager) Close()

func (*WindowManager) Frame

func (wm *WindowManager) Frame(w xproto.Window, createdBeforeWM bool)

func (*WindowManager) OnConfigureRequest

func (wm *WindowManager) OnConfigureRequest(event xproto.ConfigureRequestEvent)

func (*WindowManager) OnEnterNotify

func (wm *WindowManager) OnEnterNotify(event xproto.EnterNotifyEvent)

func (*WindowManager) OnLeaveNotify

func (wm *WindowManager) OnLeaveNotify(event xproto.LeaveNotifyEvent)

func (*WindowManager) OnMapRequest

func (wm *WindowManager) OnMapRequest(event xproto.MapRequestEvent)

func (*WindowManager) OnUnmapNotify

func (wm *WindowManager) OnUnmapNotify(event xproto.UnmapNotifyEvent)

func (*WindowManager) Run

func (wm *WindowManager) Run()

func (*WindowManager) SendWmDelete

func (wm *WindowManager) SendWmDelete(conn *xgb.Conn, window xproto.Window) error

func (*WindowManager) UnFrame

func (wm *WindowManager) UnFrame(w xproto.Window, unmapped bool)

type Workspace

type Workspace struct {
	// contains filtered or unexported fields
}

a map from client windows to the frame, the reverse of that, window IDs to windows, and if that workspace is tiling or not (incase it needs to update to sync with the main wm)

Jump to

Keyboard shortcuts

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