river-dwindle

Crates.ioriver-dwindle
lib.rsriver-dwindle
version1.0.0
sourcesrc
created_at2024-01-10 09:25:32.393801
updated_at2024-01-16 14:09:36.905333
descriptionA 'dwindling' layout generator for the river Wayland compositor
homepagehttps://gitlab.com/thom-cameron/river-dwindle
repositoryhttps://gitlab.com/thom-cameron/river-dwindle
max_upload_size
id1095040
size622,674
Thom (thom-cameron)

documentation

README

river-dwindle

screenshot

A 'dwindling' layout generator for the river Wayland compositor

Overview

Each view occupies half (or a larger proportion if configured) of the remaining space on the display after the views above it in the stack have been tiled.

+--------------------+---------------------+
| 1                  | 2                   |
|                    |                     |
|                    |                     |
|                    |                     |
|                    |                     |
|                    +----------+----------+
|                    | 3        | 4        |
|                    |          |          |
|                    |          +----------+
|                    |          | 5        |
|                    |          |          |
+--------------------+----------+----------+

Installation

This program probably won't be packaged for individual distros. It can be installed by:

Downloading the Binary

GitLab compiles the binary for amd64 automatically. One should be attached to each release - including the latest one.

Just download the binary file and place it somewhere in your PATH.

Compiling the Code

Clone the repository and compile the code:

git clone https://gitlab.com/thom-cameron/river-dwindle
cd river-dwindle
cargo build --release

Then place the resulting executable file in target/release somewhere in your PATH.

Installing with Cargo

Install the program with Cargo from crates.io:

cargo install river-dwindle

Ensure that ~/.cargo/bin is in your PATH.

Usage

river must be told to use river-dwindle to lay out views. For example, to change the default layout from rivertile to river-dwindle in a shell script river init file, change:

riverctl default-layout rivertile
rivertile -view-padding 0 -outer-padding 0 -main-ratio 0.5 &

To the following:

riverctl default-layout river-dwindle
river-dwindle --view-padding 0 --outer-padding 0 --ratio 0.5 &

Troubleshooting

One way to troubleshoot issues is to run river-dwindle in a terminal and watch the error messages it outputs.

Another is to redirect its outputs to a file which can be checked in the event of an error. You can specify how you'd like this to happen in your init file. For example:

riverctl default-layout river-dwindle
river-dwindle --ratio 0.5 &> ~/.local/state/river-dwindle-log &

The above starts the layout generator in the background and saves the messages it outputs to the named file.

Credits

This project uses the river-layout-toolkit package to integrate with river. The code was written with reference to a BSP layout written using the same library.

Commit count: 0

cargo fmt