Module draw

Source
Expand description

Traits and utilities for rendering custom windows

The traits and related structs in this module provide a way for rendering and managing simple graphical applications within Penrose itself. While definitely not what you would want to use for writing a full GUI application, the Draw and DrawContext traits are enough for setting up simple text based UI elements such as status bars and menus.

Modules§

bar
Simple text based status bars
widget
Self rendering building blocks

Structs§

Color
A simple RGBA based color
StatusBar
A simple status bar that works via hooks
TextStyle
A set of styling options for a text string

Enums§

DrawError
Enum to store the various ways that operations can fail when rendering windows
Position
The position of a status bar

Traits§

Draw
A simple drawing abstraction
DrawContext
Used for simple drawing to the screen
HookableWidget
A status bar Widget that can be automatically rendered using a DrawContext when triggered via WindowManager Hook calls.
KeyPressDraw
A Draw that can return the KeyPress events from the user for its windows
KeyboardControlled
Something that can respond to user KeyPress events
Widget
A status bar widget that can be rendered using a DrawContext

Functions§

dwm_bar
Create a default dwm style status bar that displays content pulled from the WM_NAME property of the root window.

Type Aliases§

Result
Result type for fallible methods on Draw and DrawContext