1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! 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][1]
//! emitted by your X server. For the most part, how those events are processed is an
//! implementation detail of the [WindowManager][2] 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][2] struct. This is the main event handling logic and top level data structure
//! that coordinates everything else in response to X events.
//! - An [XConn][3] impl. This trait defines the API used by the `WindowManager` to interact with
//! the X server itself. A default [xcb][4] backed implementation is provided in the form of
//! [XcbConnection][5]. This handles all of the low level interaction with the X server.
//! - An [error handler][6] 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][7] and [mouse][8] bindings for accepting user input and running `WindowManager` methods.
//!
//! It is also possible to add [hooks][9], and things such as a [status bar][10] which itself uses
//! the hook system for listening to internal `WindowManager` events, but these are not required in
//! any way.
//!
//! [1]: crate::core::xconnection::XEvent
//! [2]: crate::core::manager::WindowManager
//! [3]: crate::core::xconnection::XConn
//! [4]: https://xcb.freedesktop.org/
//! [5]: crate::xcb::XcbConnection
//! [6]: crate::ErrorHandler
//! [7]: crate::gen_keybindings
//! [8]: crate::gen_mousebindings
//! [9]: crate::core::hooks
//! [10]: crate::draw::bar
pub use ;
pub use Client;
pub use Config;
pub use ;
pub use Layout;
pub use WindowManager;
pub use Selector;
pub use Screen;
pub use Workspace;