7 releases

0.3.6 Aug 31, 2024
0.3.5 Jun 4, 2024
0.3.4 Nov 7, 2023
0.3.3 Jul 16, 2023
0.1.1 Nov 14, 2022

#810 in GUI

Download history 4/week @ 2024-07-15 6/week @ 2024-07-22 23/week @ 2024-07-29 4/week @ 2024-08-05 14/week @ 2024-08-12 2/week @ 2024-08-19 159/week @ 2024-08-26 19/week @ 2024-09-02 9/week @ 2024-09-09 52/week @ 2024-09-16 46/week @ 2024-09-23 34/week @ 2024-09-30 4/week @ 2024-10-07 18/week @ 2024-10-14 5/week @ 2024-10-21 22/week @ 2024-10-28

52 downloads per month
Used in penrose_bbarker_contrib

MIT license

550KB
12K 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

~11–20MB
~328K SLoC