2
0
Fork
You've already forked leftwm-layouts
0
No description
  • Rust 99.1%
  • Makefile 0.9%
2023年04月02日 22:33:16 +02:00
.github/workflows fix issue with x offset and create tests for it, closes #15 2023年04月02日 22:20:49 +02:00
demo update druid in demo app 2023年02月12日 16:54:35 +01:00
leftwm-layouts bump version to 0.7.1 2023年04月02日 22:33:16 +02:00
.gitignore update layouts library, fix issue with split() method 2021年12月12日 19:56:34 +01:00
Cargo.toml add CenterMain layout, update workspace, update demo, update readme 2021年12月15日 01:10:48 +01:00
CHANGELOG.md fix issue with x offset and create tests for it, closes #15 2023年04月02日 22:20:49 +02:00
LICENSE bump version, add license 2022年09月25日 17:34:15 +02:00
Makefile add test-full make rule, fix clippy warnings, bump version to 0.3.3 2022年12月29日 12:04:00 +01:00
README.md update docs, update readme 2023年02月12日 16:47:59 +01:00

LeftWM Layouts

Library providing fixed but parameterized window layout calculations

Libraries.io dependency status for GitHub repo Crates.io Crates.io

Description

This library encapsulates layout calculations from external dependencies and display servers, so that it can be used by window managers for X.Org, Wayland, or whatever else. It's all about splitting up rectangles, the library has no concept of "windows".

Some default layouts are provided, but custom layouts can be defined. Custom layout definitions allow some flexibility but are still fairly limited by design, as the target audience of this library are list-based / dynamic-tiling window managers (the likes of leftwm, dwm, ...) as opposed to manual tilers like i3.

Features

  • Already provides widely known default layouts
  • Custom layouts can be defined
  • Supports multiple main windows
  • Ultrawide monitor friendly
  • Zero dependencies (if you ignore serde 👀)

Pre-defined Layouts

The following layouts are already provided by the library.

Stack / Single-Column

Those layouts have only a single stack and no main column.

Monocle

+-----------+
| | only ever displays
| | one window at
| | maximum
+-----------+

EvenHorizontal

+--+--+--+--+
| | | | |
| | | | |
| | | | |
+--+--+--+--+

EvenVertical

+-----------+
|-----------|
|-----------|
|-----------|
+-----------+

Grid

+-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | +---+
+-----+-----+ | +---+---+ +---+---+---+ +---+---| |
| | | | | | | | | | | | | +---+
| | | | | | | | | | | | | | |
+-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+
 4 windows 5 windows 6 windows 7 windows

Main and Stack / Two-Column

Those layouts have a main and one stack column

MainAndDeck

+-------+-----+
| | | only ever displays
| | | two windows at
| | | maximum
+-------+-----+
 main stack

MainAndVertStack

+-------+-----+
| | |
| +-----+
| | |
+-------+-----+
 main stack

MainAndHorizontalStack

+-------+--+--+
| | | |
| | | |
| | | |
+-------+--+--+
 main stack

RightMainAndVertStack

+-----+-------+
| | |
+-----+ |
| | |
+-----+-------+
 stack main

Fibonacci

+-------+-----+
| | |
| +--+--+
| |--| |
+-------+--+--+
 main stack

Dwindle

+-------+-----+
| | |
| +--+--+
| | |--|
+-------+--+--+
 main stack

Center Main / Three-Column

Those layouts have the main column in the center and two stack columns surrounding it.

CenterMain

+-----+-----------+-----+
| | | |
| | +-----+
| | | |
| | +-----+
| | | |
+-----+-----------+-----+
 1st main 2nd
 stack stack
+-----------+-----------+
| | |
| | | unoccupied
| | | space is
| | | taken over
| | |
+-----------+-----------+
 1st stack main
+-----------------------+
| |
| | unoccupied
| | space is
| | taken over
| |
+-----------------------+
 main

CenterMainBalanced

+-----+-----------+-----+
| | | |
| | | |
+-----+ +--+--+
| |__| | |__|
| | | | | |
+-----+-----------+--+--+
 1st main 2nd
 stack stack
+-----------+-----------+
| | |
| | | unoccupied
| | | space is
| | | taken over
| | |
+-----------+-----------+
 1st stack main
+-----------------------+
| |
| | unoccupied
| | space is
| | taken over
| |
+-----------------------+
 main

CenterMainFluid

 1st 2nd
 stack main stack
+-----+-----------+-----+
| | | |
| | +-----+
| | | |
| | +-----+
| | | |
+-----+-----------+-----+
 1st main 2nd
 stack stack
+-----+-----------+-----+
| | |.....|
| | |.....| unoccupied
| | |.....| space is
| | |.....| reserved
| | |.....|
+-----+-----------+-----+
 1st main
 stack
+-----+-----------+-----+
|.....| |.....|
|.....| |.....| unoccupied
|.....| |.....| space is
|.....| |.....| reserved
|.....| |.....|
+-----+-----------+-----+
 main

Build

Build and test the project

Note

Requires Rust >= 1.56.0

make

Run the demo application

Note

Running the demo requires you to have GTK (gtk3) and pango (?) installed

make dev