A terminal workspace with batteries included
Go to file
Denis Maximov d47904ea5b
feature(infrastructure): tabs (#89)
* wip: tabs, just outlining stuff, for now it is a mess

* wip: tabs, just outlining stuff, for now it is a mess

* wip: formatting

* wip: some moving around

* wip: not sure why those things are not imported

* wip: cleaning up a bit

* wip: doesn't render when new tab is created?

* wip: doesnt re-render when a new tab is spawned for now

* wip: tabs now are a BTreeMap and we can switch between them in both directions

* wip: I think that should also be here

* wip: cleanup

* Spawn a new terminal simultaneously with a new tab

* Ensure proper Opening and Closing of tabs

* cleanup

* more cleanup

* tests(snapshots): add 'loading' snapshot to each scenario

* fix(tests): update snapshots

* Add tests for tabs implementation

* wip: added tests, moved tab related stuff to a separate file

* wip: var name change, removed unused imports

* chore: fromatting

* wip: tests are you ok?

* Remove next_tab_index field

* clean close_tab() logic in screen.render()

* wip: more tests added, review changes covered

* chore: a programmer and a formatter walk into a bar....

* style(screen): update description comment

* docs(tab): add comment description

Co-authored-by: denis <denis@airheadventures.com>
Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
Co-authored-by: Aram Drevekenin <aram@poor.dev>
Co-authored-by: Kunal Mohan <44079328+kunalmohan@users.noreply.github.com>
2020-12-18 11:11:25 +01:00
.github/workflows chore(infra): added clippy check. (#65) 2020-11-28 20:02:05 +01:00
docs docs(spelling): teack -> track (#91) 2020-12-10 10:04:29 +01:00
htop-debugging fic(compatibility): htop scrolling issues (#77) 2020-11-30 09:40:24 +01:00
src feature(infrastructure): tabs (#89) 2020-12-18 11:11:25 +01:00
.gitignore feat(ux): add a command mode (#42) 2020-11-21 15:55:49 +01:00
Cargo.lock feat(infra): add custom panic hook. Print backtrace and thread, error info on panic. (#75) 2020-12-03 15:35:16 +01:00
Cargo.toml feat(infra): add custom panic hook. Print backtrace and thread, error info on panic. (#75) 2020-12-03 15:35:16 +01:00
CODE_OF_CONDUCT.md docs(coc): initial 2020-10-27 11:11:10 +01:00
demo.gif chore(assets): add demo gif 2020-10-27 11:40:00 +01:00
GOVERNANCE.md docs(governance): initial (#17) 2020-10-31 19:43:02 +01:00
LICENSE.md docs(license): initial 2020-10-29 17:42:28 +01:00
logo.png docs(readme): adjust logo 2020-11-01 11:54:56 +01:00
README.md feat(ux): add a command mode (#42) 2020-11-21 15:55:49 +01:00
rustfmt.toml feat: add rustfmt, update action workflow to check for formatting (#45) 2020-11-14 18:59:37 +01:00
strider.wasm Don't crash (always?) 2020-11-25 21:18:13 +00:00


logo
Mosaic

demo

Discord Chat

What is this?

Mosaic is a workspace aimed at developers, ops-oriented people and anyone who loves the terminal. At its core, it is a terminal multiplexer (similar to tmux and screen), but this is merely its infrastructure layer.

For more details, read about upcoming features in our roadmap.

Right now Mosaic is in its early development stages and is not yet ready for everyday usage. If you're interested, watch this space or better yet - get involved!

How to use it?

  • Clone the project
  • In the project folder, run: cargo run

(note that right now Mosaic only supports linux and maybe mac)

mosaic has three modes, which are a bit like vim or tmux:

  • Normal mode - allows you to enter text, input will be sent through to stdin on the pane you're typing in
  • Command mode - input is interpreted as commands to control mosaic. This comes in two variants:
    • Temporary - once a single valid command has been parsed, returns to normal mode (e.g. quickly opening a new pane and start typing)
    • Permanent - remain in command mode until you issue the exit command mode command

The keys and behavior will update when the project matures a bit, but for now:

  • ctrl-g to cycle between modes (normal mode -> temporary command mode -> permanent command mode -> normal mode)
  • Esc - exit command mode (any) and return to normal mode

In command mode:

  • n - split focused pane vertically
  • b - split focused pane horizontally
  • m - split largest terminal on screen (vertically or horizontally)
  • j - resize focused pane down
  • k - resize focused pane up
  • h - resize focused pane left
  • l - resize focused pane right
  • p - move focus to next pane
  • PgUp - scroll up in focused pane
  • PgDown - scroll down in focused pane
  • x - close focused pane
  • q - quit Mosaic

What is the current status of the project?

Mosaic is in the last stages of being VT compatible. As much as modern terminals are. Most things should work inside a terminal pane, but some edge cases don't.

Right now, Mosaic:

  • Successfully renders shells (all experiments have been done with fish-cli).
  • Can split the terminal into multiple horizontal/vertical panes
  • Can resize panes, as well as close them
  • Can scroll up and down inside a pane
  • Can render a vim pane
  • Can render most so called "raw mode" applications that draw a textual user interface and refresh themselves.

Please, don't do anything important with it. It's currently being stabilized and still panics quite a bit. :)

How do I get involved?

At the moment, the project is in early development and prototyping. A lot of the work needed to be done is product work (making decisions about what Mosaic will be and do) as well as development work. So note that most tasks would probably involve a little of both. We're a small team of enthusiasts, and we eagerly welcome people who would like to join in at this early stage.

Because of the above, it's not trivial for us to have issues tagged "Help Wanted" or "Good First Issue", as all work would likely need some prior discussion. That said, we would absolutely love to have these discussions and to bring more people on. Even if you are unsure of your abilities or have never contributed to open source before. To get started, join our chat and let us know you're interested in contributing: https://discord.gg/CrUAFH3

We respectfully ask that you do your best to stand by any commitments you make.

And most importantly, please read our code of conduct.

Roadmap

This section contains an ever-changing list of the major features that are either currently being worked on, or planned for the near future.

  • A layout engine that would allow you to define how your panes will be (re)arranged when you open or close them. As well as when you change the terminal window size.
  • Pane types beyond a simple shell prompt, for example:
    • A file explorer (similar to ranger) that opens files for editing in a new pane.
    • A launcher that opens any command you enter in a new pane
    • A command pane that would run any command, display its output and re-run that command when clicked. Changing its frame colour to green/yellow/red depending on the exit status.
  • A Webassembly plugin system for compiled languages built using WASI to allow you to write plugins in any compiled language. These plugins would be able to create new panes, interact with existing ones, interact with the filesystem and subscribe to events. You could consume them at runtime and decide what permissions to give them.
  • Built in support for portable workspaces across machines, projects and teams: imagine being able to include a configuration file with your project that would include all the layouts and plugins that would best help new developers getting onboarded. Including all the shortcuts, customized panes and help-message hints triggered by things such as opening a file, entering a folder or running a command. How about being able to log into a new server or container, start mosaic with a URL of a git repository including your favorite configuration and plugins, and working with it as if you were on your own machine?
  • Support for multiple terminal windows across screens: Why limit yourself to one terminal window? Mosaic would allow you to transfer panes, view powerlines, get alerts and control your workspace from different windows by having them all belong to the same session.

License

MIT