wm/vend/xgbutil
a ba042cc537 update deps 2023-06-11 09:21:08 -05:00
..
_examples update deps 2023-06-11 09:21:08 -05:00
ewmh update deps 2023-06-11 09:21:08 -05:00
gopher update deps 2023-06-11 09:21:08 -05:00
icccm update deps 2023-06-11 09:21:08 -05:00
keybind update deps 2023-06-11 09:21:08 -05:00
motif update deps 2023-06-11 09:21:08 -05:00
mousebind update deps 2023-06-11 09:21:08 -05:00
scripts update deps 2023-06-11 09:21:08 -05:00
xcursor update deps 2023-06-11 09:21:08 -05:00
xevent update deps 2023-06-11 09:21:08 -05:00
xgraphics update deps 2023-06-11 09:21:08 -05:00
xinerama update deps 2023-06-11 09:21:08 -05:00
xprop update deps 2023-06-11 09:21:08 -05:00
xrect update deps 2023-06-11 09:21:08 -05:00
xwindow update deps 2023-06-11 09:21:08 -05:00
.gitignore update deps 2023-06-11 09:21:08 -05:00
LICENSE update deps 2023-06-11 09:21:08 -05:00
Makefile update deps 2023-06-11 09:21:08 -05:00
README update deps 2023-06-11 09:21:08 -05:00
STYLE update deps 2023-06-11 09:21:08 -05:00
doc.go update deps 2023-06-11 09:21:08 -05:00
go.mod update deps 2023-06-11 09:21:08 -05:00
go.sum update deps 2023-06-11 09:21:08 -05:00
session.vim update deps 2023-06-11 09:21:08 -05:00
types.go update deps 2023-06-11 09:21:08 -05:00
xgbutil.go update deps 2023-06-11 09:21:08 -05:00

README

xgbutil is a utility library designed to work with the X Go Binding. This
project's main goal is to make various X related tasks easier. For example,
binding keys, using the EWMH or ICCCM specs with the window manager,
moving/resizing windows, assigning function callbacks to particular events,
drawing images to a window, etc.

xgbutil attempts to be thread safe, but it has not been completely tested in
this regard. In general, the X event loop implemented in the xevent package is
sequential. The idea is to be sequential by default, and let the user spawn
concurrent code at their discretion. (i.e., the complexity of making the main
event loop generally concurrent is vast.)

You may sleep safely at night by assuming that XGB is thread safe, though.

To start using xgbutil, you should have at least a passing familiarity with X.
Your first stop should be the examples directory.

Installation
============
go get github.com/jezek/xgbutil

Dependencies
============
XGB is the main dependency. Use of the xgraphics packages requires graphics-go
and freetype-go.

XGB project URL: https://github.com/jezek/xgb
graphics-go project URL: https://github.com/BurntSushi/graphics-go
freetype-go project URL: https://github.com/BurntSushi/freetype-go

Quick Example
=============
go get github.com/jezek/xgbutil/_examples/window-name-sizes
"$GOPATH"/bin/window-name-sizes

The output will be a list of names of all top-level windows and their geometry
including window manager decorations. (Assuming your window manager supports
some basic EWMH properties.)

Documentation
=============
https://godoc.org/github.com/jezek/xgbutil

Examples
========
There are several examples in the examples directory covering common use cases.
They are heavily documented and should run out of the box.

Python
======
An older project of mine (BurntSushi), xpybutil, served as inspiration for xgbutil. If you
want to use Python, xpybutil should help quite a bit. Please note though, that
at this point, xgbutil provides a lot more functionality and is much better
documented.

xpybutil project URL: https://github.com/BurntSushi/xpybutil

jezek's Fork
============
Why I've forked the xgbutil repository from BurntSushi's github is discussed in [issue #2](https://github.com/jezek/xgb/issues/2).
I've also changed the LICENSE to GNU GPL v3 to meet the requirements for pkg.go.dev