[−][src]Module penrose::core
Core functionality for the Penrose window manager library
Overview
At a high level, Penrose works as a single threaded event loop that is driven by X events emitted by your X server. For the most part, how those events are processed is an implementation detail of the WindowManager struct, but there are multiple places that you can provide your own additional (or in some cases, alternate) functionality if desired. In terms of data structures and the overall architecture of Penrose, you will always have the following:
- A WindowManager struct. This is the main event handling logic and top level data structure that coordinates everything else in response to X events.
- An XConn impl. This trait defines the API used by the
WindowManager
to interact with the X server itself. A default xcb backed implementation is provided in the form of XcbConnection. This handles all of the low level interaction with the X server. - An error handler for running custom top level error handling logic (a simple default
handler is provided that simply logs the error at
ERROR
level and then continues operation) - Key and mouse bindings for accepting user input and running
WindowManager
methods.
It is also possible to add hooks, and things such as a status bar which itself uses
the hook system for listening to internal WindowManager
events, but these are not required in
any way.
Modules
bindings | Setting up and responding to user defined key/mouse bindings |
client | Metadata around X clients and manipulating them |
config | User facing configuration of the penrose WindowManager. |
data_types | Simple data types and enums |
helpers | Utility functions for use in other parts of penrose |
hooks | Hook for adding additional functionality around standard WindowManager actions |
layout | User definable window arangements for a Workspace. |
macros | Utility macros for use in the rest of penrose. Not intended for general use |
manager | The main user API and control logic for Penrose. |
ring | An internal data structure and associated helpers for simplifying actions around manipulating focusable ordered collections. |
screen | Information on connected displays |
workspace | A set of clients and accompanying layout logic for display on a single screen |
xconnection | An abstraciton layer for talking to an underlying X server. |
Structs
Client | Meta-data around a client window that we are handling. |
Config | The main user facing configuration details. |
Layout | Responsible for arranging Clients within a Workspace. |
Screen | Display information for a connected screen |
WindowManager | WindowManager is the primary struct / owner of the event loop for penrose. |
Workspace | A Workspace represents a named set of clients that are tiled according to a specific layout. Layout properties are tracked per workspace and clients are referenced by ID. Workspaces are independant of monitors and can be moved between monitors freely, bringing their clients with them. |
Enums
Selector | Used with WindowManager helper functions to select an element from the known workspaces or clients. |
Traits
Hook | User defined functionality triggered by WindowManager actions. |
Type Definitions
KeyEventHandler | Some action to be run by a user key binding |
MouseEventHandler | An action to be run in response to a mouse event |