A tmux like multiplexer for gyscos/cursive views 🖥️
Go to file
Johannes Wünsche ee20bf12af
(cargo-release) version 0.6.0
2022-01-15 18:35:08 +01:00
.github Try out github workflows 2021-06-10 20:42:13 +02:00
assets Add logo to doc 2019-10-09 15:37:23 +02:00
examples Run cargo fmt 2022-01-13 14:54:30 -05:00
scripts Try out github workflows 2021-06-10 20:42:13 +02:00
src Update to cursive-core 0.3.0 2022-01-13 14:55:25 -05:00
tests Run cargo fmt 2022-01-13 14:54:30 -05:00
.editorconfig Add editorconfig 2019-08-16 14:25:23 +02:00
.gitignore Fix switch views of same node 2019-08-16 13:50:53 +02:00
Cargo.toml (cargo-release) version 0.6.0 2022-01-15 18:35:08 +01:00
LICENSE Initial commit 2019-07-06 12:00:50 +02:00
README.md Remove old notifier about tests in README 2021-06-10 20:49:55 +02:00


Welcome to cursive-multiplex 👋

stable build nightly build crates.io Docs.rs GitHub PRs Welcome
A tmux like multiplexer for gyscos/cursive views

This project is work-in-progress

This project provides a tiling window manager for gyscos/cursive similar to Tmux. You can place any other cursive view inside of a Mux view to display these views in complex layouts side by side. Watch the demo below to see how it looks.

How does it look like? demo terminalizer

Expand to view Demo GIF


Simply add to your Cargo.toml

cursive-multiplex = "^0.2.0"

And then use Mux::new to create a new Mux view

let (mut mux, root_node) = cursive_multiplex::Mux::new(
    cursive::views::TextView::new("Hello World!".to_string())

Mux has defaults defined for key bindings. You can change them with the API described in the docs.

Expand to see default keybindings
Action Key
Move focus up Alt +
Move focus right Alt +
Move focus down Alt +
Move focus left Alt +
Resize up Ctrl +
Resize right Ctrl +
Resize down Ctrl +
Resize left Ctrl +
Zoom Ctrl + x

Adding views

You can add views by giving a path or an id to an existing node e.g.

let new_node = mux.add_right_of(
).expect("adding right panel to root failed");

Its also possible to add views by their path.

if let Some(sibbling) = mux.root().right().right().down().build() {
    let new_node = mux.add_above(
    ).expect("adding by path failed");

Returned will be a Result Ok contains the new id assigned to the view, or an error in case of failure.

Removing Views

You can also remove views, by giving the id of the views.


On success the id of the removed node is returned.

Switch Views

If you want to reorder your views you can easily switch them by using

mux.switch_views(new_node, old_node)?;


If you find any bugs/unexpected behaviour or you have a proposition for future changes open an issue describing the current behaviour and what you expected.

Development cargo test

Running the tests

Running all test suites

Just run

$ cargo test

to execute all available tests.

Investigating failed tests

In case some test fails with your changes, you can use the cargo-insta tool to investigate the test case.

To install

$ cargo install cargo-insta

and to run the tests and investigate all failing tests interactively.

$ cargo insta review

Any changes between the expected and received screen will be then displayed.

shields.io endpoints

shields.io endpoints are generated inside the ./target/shields folder. They are used in this README.


Fin Christensen

:octocat: @fin-ger
🐘 @fin_ger@weirder.earth
🐦 @fin_ger_github

Johannes Wünsche

:octocat: @jwuensche
🐘 @fredowald@mastodon.social
🐦 @Fredowald

Show your support

Give a if this project helped you!