documentation

package
v0.0.0-...-deaf085 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: BSD-3-Clause, GooglePatentClause Imports: 0 Imported by: 0

Documentation

Overview

Package examples contains a few different use cases of XGB, like creating a window, reading properties, and querying for information about multiple heads using the Xinerama or RandR extensions.

If you're looking to get started quickly, I recommend checking out the create-window example first. It is the most documented and probably covers some of the more common bare bones cases of creating windows and responding to events.

If you're looking to query information about your window manager, get-active-window is a start. However, to do anything extensive requires a lot of boiler plate. To that end, I'd recommend use of my higher level library, xgbutil: https://github.com/BurntSushi/xgbutil

There are also examples of using the Xinerama and RandR extensions, if you're interested in querying information about your active heads. In RandR's case, you can also reconfigure your heads, but the example doesn't cover that.

Directories

Path Synopsis
Example create-window shows how to create a window, map it, resize it, and listen to structure and key events (i.e., when the window is resized by the window manager, or when key presses/releases are made when the window has focus).
Example create-window shows how to create a window, map it, resize it, and listen to structure and key events (i.e., when the window is resized by the window manager, or when key presses/releases are made when the window has focus).
Example get-active-window reads the _NET_ACTIVE_WINDOW property of the root window and uses the result (a window id) to get the name of the window.
Example get-active-window reads the _NET_ACTIVE_WINDOW property of the root window and uses the result (a window id) to get the name of the window.
Example randr uses the randr protocol to get information about the active heads.
Example randr uses the randr protocol to get information about the active heads.
Example xinerama shows how to query the geometry of all active heads.
Example xinerama shows how to query the geometry of all active heads.

Jump to

Keyboard shortcuts

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