Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A utility library to make use of the X Go Binding easier. (Implements EWMH and ICCCM specs, key binding support, etc.)

branch: master
Octocat-spinner-32 _examples 80 cols November 20, 2013
Octocat-spinner-32 ewmh gofmt February 02, 2013
Octocat-spinner-32 gopher Docs for gopher. July 03, 2012
Octocat-spinner-32 icccm gofmt February 02, 2013
Octocat-spinner-32 keybind Close #17. February 26, 2014
Octocat-spinner-32 motif gofmt February 02, 2013
Octocat-spinner-32 mousebind @dominikh is keeping me honest. January 05, 2014
Octocat-spinner-32 scripts Add the Shape extension's NotifyEvent to the event system. October 17, 2012
Octocat-spinner-32 xcursor gofmt February 02, 2013
Octocat-spinner-32 xevent Close #16. Bring doco for MainPing up to date. January 01, 2014
Octocat-spinner-32 xgraphics Update new.go March 11, 2014
Octocat-spinner-32 xinerama gofmt February 02, 2013
Octocat-spinner-32 xprop gofmt February 02, 2013
Octocat-spinner-32 xrect gofmt February 02, 2013
Octocat-spinner-32 xwindow Always ignore border width changes. September 24, 2013
Octocat-spinner-32 .gitignore ignore vim tag file February 27, 2012
Octocat-spinner-32 COPYING WTFPL April 25, 2012
Octocat-spinner-32 Makefile Lazy. December 08, 2012
Octocat-spinner-32 README Fix quick example instructions May 20, 2013
Octocat-spinner-32 STYLE Add style guidelines. May 28, 2012
Octocat-spinner-32 doc.go gofmt February 02, 2013
Octocat-spinner-32 session.vim more convenient name March 20, 2012
Octocat-spinner-32 types.go gofmt February 02, 2013
Octocat-spinner-32 xgbutil.go gofmt February 02, 2013
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/BurntSushi/xgbutil

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

XGB project URL: https://github.com/BurntSushi/xgb

Quick Example
=============
go get github.com/BurntSushi/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
=============
gopkgdoc is well-suited to provide documentation for xgbutil. Its cross-package 
hyperlinking on types is also extremely useful, since much of xgbutil relies on 
XGB.

With that said, documentation is also hosted here: 
http://godoc.burntsushi.net/pkg/github.com/BurntSushi/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, 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
Something went wrong with that request. Please try again.