documentation

package
v0.0.0-...-f294442 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2021 License: Unlicense Imports: 0 Imported by: 0

Documentation

Overview

Package examples contains several complete examples depicting some common use cases of xgbutil.

The examples included are designed to either demonstrate how a particular facility of xgbutil works, or how to accomplish some common goal when using X.

For example, example simple-keybinding demonstrates how to use xgbutil to respond to particular key presses while example graceful-window-close shows how to close windows without killing your connection to X.

My goal is that each example demonstrates one thing, although the nature of X typically requires some amount of boilerplate so that some examples are a bit more bloated than I would like.

If you have any suggestions for other examples to include, I'd be happy to hear them. You may post them at the main project page: https://github.com/alex11br/xgbutil.

Directories

Path Synopsis
Example change-cursor shows how to use the cursor package to change the X cursor in a particular window.
Example change-cursor shows how to use the cursor package to change the X cursor in a particular window.
Example compress-events shows how to manipulate the xevent package's event queue to compress events that arrive more often than you'd like to process them.
Example compress-events shows how to manipulate the xevent package's event queue to compress events that arrive more often than you'd like to process them.
Example draw-text shows how to draw text to an xgraphics.Image type.
Example draw-text shows how to draw text to an xgraphics.Image type.
Example fullscreen shows how to make a window showing the Go Gopher go fullscreen and back using keybindings and EWMH.
Example fullscreen shows how to make a window showing the Go Gopher go fullscreen and back using keybindings and EWMH.
Example graceful-window-close shows how to create windows that can be closed without killing your X connection (and thereby destroying any other windows you may have open).
Example graceful-window-close shows how to create windows that can be closed without killing your X connection (and thereby destroying any other windows you may have open).
This demonstration shows drawing entire generated images to an x window and calculating the speed of the generation and the drawing operations It should be noted that redrawing the entire image is inefficient, this demo was made to show me how fast I could draw to the windows with this method.
This demonstration shows drawing entire generated images to an x window and calculating the speed of the generation and the drawing operations It should be noted that redrawing the entire image is inefficient, this demo was made to show me how fast I could draw to the windows with this method.
Example keypress-english shows how to convert the State (modifiers) and Detail (keycode) members of Key{Press,Release} events to an english string representation.
Example keypress-english shows how to convert the State (modifiers) and Detail (keycode) members of Key{Press,Release} events to an english string representation.
Example multiple-source-event-loop shows how to use the xevent package to combine multiple sources in your main event loop.
Example multiple-source-event-loop shows how to use the xevent package to combine multiple sources in your main event loop.
Example pointer-painting shows how to draw on a window, MS Paint style.
Example pointer-painting shows how to draw on a window, MS Paint style.
Example screenshot shows how to take a screenshot of the current desktop and show it in a window.
Example screenshot shows how to take a screenshot of the current desktop and show it in a window.
Example show-image is a very simple example to show how to use the xgraphics package to show an image in a window.
Example show-image is a very simple example to show how to use the xgraphics package to show an image in a window.
Example show-window-icons shows how to get a list of all top-level client windows managed by the currently running window manager, and show the icon for each window.
Example show-window-icons shows how to get a list of all top-level client windows managed by the currently running window manager, and show the icon for each window.
Example simple-keybinding shows how to grab keys on the root window and respond to them via callback functions.
Example simple-keybinding shows how to grab keys on the root window and respond to them via callback functions.
Example simple-mousebinding shows how to grab buttons on the root window and respond to them via callback functions.
Example simple-mousebinding shows how to grab buttons on the root window and respond to them via callback functions.
Example window-gradient demonstrates how to create several windows and draw gradients as their background.
Example window-gradient demonstrates how to create several windows and draw gradients as their background.
Example window-names fetches a list of all top-level client windows managed by the currently running window manager, and prints the name and size of each window.
Example window-names fetches a list of all top-level client windows managed by the currently running window manager, and prints the name and size of each window.
Example workarea-struts shows how to find the all of the struts set by top-level clients and apply them to each active monitor to get the true workarea for each monitor.
Example workarea-struts shows how to find the all of the struts set by top-level clients and apply them to each active monitor to get the true workarea for each monitor.
Example xmodmap shows how one might implement a rudimentary version of xmodmap's modifier listing.
Example xmodmap shows how one might implement a rudimentary version of xmodmap's modifier listing.

Jump to

Keyboard shortcuts

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