5 releases

0.3.4 Nov 7, 2023
0.3.3 Jul 16, 2023
0.1.3 Jun 11, 2023
0.1.1 Nov 14, 2022
0.1.0 Nov 12, 2022

#815 in GUI

Download history 7/week @ 2023-11-20 1/week @ 2023-12-11 4/week @ 2023-12-18 4/week @ 2024-01-08 38/week @ 2024-02-19 52/week @ 2024-02-26 20/week @ 2024-03-04

110 downloads per month

MIT license

500KB
11K SLoC

Penrose UI

GUI elements for the penrose window manager library

The functionality provided by this crate is a very thin wrapper over xlib and fontconfig to support minimal text based UIs such as a status bar or simple menu. It may be possible to use this to write a stand alone UI outside of direct integration with the Penrose window manager crate but that is not the supported use case this crate has been written for.

Bar

A lightweight and minimal status bar.


lib.rs:

Penrose-ui: a bare bones toolkit for adding UI elements to Penrose

A note on the intended purpose of this crate

Penrose-ui is not intended as a general purpose UI library. It is incredibly minimal in the functionality it provides and is primarily designed to provide a built-in status bar for the penrose tiling window manager library. While it should be possible to make use of this crate for writing UIs without integrating with penrose, that is certainly not the intended use case and is not fully supported.

Getting started

The main functionality of this crate is provided through the Draw nad Context structs which allow for simple graphics rendering backed by the xlib and fontconfig libraries.

A note on the use of unsafe code

Given the aims of this crate and the desire to pull in as few dependencies as possible, it makes heavy use of unsafe to wrap C FFI calls. Please make sure that you read the available documentation and SAFETY comments in the source code to understand what is happening under the hood if you have any concerns about this.

Dependencies

~10–17MB
~228K SLoC