Commit Graph

870 Commits

Author SHA1 Message Date
Brooks J Rady
4592f12349 Add a new host function 2021-01-11 06:02:59 +00:00
Brooks J Rady
7e308515e5 Add a plugin callback for global keypresses 2021-01-10 23:02:41 +00:00
Brooks J Rady
d79db4acb3 Add a global key callback 2021-01-10 22:58:48 +00:00
Brooks J Rady
624f842a20 Add support for layouts with parts of a fixed or unspecified size 2021-01-10 22:24:26 +00:00
Brooks Rady
7efc435bda
feat(infra): initial plugin system
- Added the ability to load and keep track of several plugins at once
- Removed `wasm-wip` feature flag, enabling plugins in all builds
- `split_space` now returns a tuple with the `part_position_and_size` (as before) plus a cloned version of the part, so plugins and terminals can be distinguished by its users
- Added a `Draw` instruction for rendering plugins when asked to by Mosaic
- Added a new `PluginPane`, implementing `Pane` for plugins!
- Replaced RawFd as a pane-identifier with the `PaneId` enum in most places
- `change_size` -> `change_pos_and_size`, with the functionality updated to fit the new name
- `buffer_as_vte_output` -> `render`
- `pid()` on the `Pane` trait now returns a `PaneId`
- Changed lots of functions in `tab.rs` to be more pane oriented, renaming some to remove the `terminal` and switching to `PaneId`s
- splitting functions in `tab.rs` now correctly update the positions of returned fragments
- Used `PaneId`'s as a replacement for `PaneKind` in the tab `BTreeMap`
- Removed `get_rows` and `get_columns` from the `Pane` trait
- Layouts can now create plugin panes!
- Changed lots of the `active_terminal` stuff in `tab.rs` to work with all panes
- Changed the `Tab` `render` function, so that common requirements are moved there and out of the `Pane::render()` methods
- Added a `shared.rs` to `utils` with a couple of useful functions
- We can now accept input and pass it to plugins via serialised JSON
- Trigger a screen render after handling input meant for a plugin
- Allow plugins to be properly closed
- Allow plugin panes to be split (opening a new terminal)
- Allow plugin API functions to send messages on the PTY bus
- Added the API functionality needed for a plugin to open a file in a new pane
- No more compiler warnings!
- Fixed 53 clippy lints!
2021-01-08 14:14:39 +00:00
Brooks J Rady
277791f0ca Don't forget to tell split terminals that they have a new size! 2021-01-08 13:58:18 +00:00
Brooks J Rady
de44fbecff Change the layout to only one plugin 2021-01-07 16:43:13 +00:00
Brooks J Rady
70e16f80b1 Merge in changes from main and fix a clippy lint 2021-01-07 16:21:38 +00:00
Brooks J Rady
58a2fc1656 Finished plugin system! (Added file opening) 2021-01-07 15:23:54 +00:00
Brooks J Rady
7c785d4fe7 Fix the plugin splitting bugs 2021-01-07 14:06:09 +00:00
Brooks J Rady
adfe7fd513 Make it possible to cleanly close plugins 2021-01-07 13:26:27 +00:00
Brooks J Rady
2b91514a8f Get rid of BuiltIn Pane (for now) + style tweak 2021-01-07 13:05:42 +00:00
Brooks J Rady
54f6e09511 Working input response! 2021-01-07 12:49:23 +00:00
Brooks J Rady
6e19401200 Add LTO and use a termion fork with serde support 2021-01-07 12:20:52 +00:00
Brooks J Rady
5cec3402bf Massively optimise the strider WASM file 2021-01-07 11:18:21 +00:00
Brooks J Rady
75136a613d Update deps and add a build script 2021-01-07 11:10:39 +00:00
Brooks J Rady
c6ecbfb129 Version bump! 2021-01-07 10:50:19 +00:00
Brooks J Rady
25356a592c Change to the Termion Key enum 2021-01-07 10:49:43 +00:00
Brooks J Rady
fe6cb365f7 Merge branch 'wasm-launchable' into wasm-input 2021-01-07 10:29:29 +00:00
Brooks J Rady
2f2143967b Might as well use the From trait 2021-01-07 10:26:14 +00:00
Brooks J Rady
7668a19490 Fix a positioning bug 2021-01-07 10:24:29 +00:00
Henil Dedania
4f476fedc3
chore(cleanup): Clean up project root (#135)
* Clean up the root of the project
2021-01-07 15:33:19 +05:30
henil
3cd3cdaf0d clean up root of project 2021-01-07 15:21:01 +05:30
Brooks J Rady
0858341b7f Loop through input keys 2021-01-07 09:49:49 +00:00
Henil Dedania
0994c8abcd
feat(completions): Add shell completions files (#128)
* Add shell completions and output files to `assets/completions`

* Rename files and struct name

* Update tests to take into account new changes
2021-01-07 15:14:28 +05:30
Brooks J Rady
01eaedcd37 Parse bytes into keys with Termion 2021-01-07 09:39:16 +00:00
Brooks J Rady
b5f9066172 Merge branch 'main' into wasm-launchable 2021-01-06 20:31:29 +00:00
Brooks J Rady
c76ee391ec Add a FIXME for a clippy lint 2021-01-06 19:38:00 +00:00
Brooks J Rady
1fa23e6fa4 Get clipped, fool 2021-01-06 19:34:18 +00:00
Brooks J Rady
4a176669fa A module rename to please clippy 2021-01-06 17:46:50 +00:00
Brooks J Rady
698bcf83fc Warnings purged and some FIXME's addressed 2021-01-06 17:23:00 +00:00
Brooks J Rady
b2720169fb Fix early quit with plugins 2021-01-06 17:06:15 +00:00
Brooks J Rady
fc2205c415 The RawFd has been slain... 2021-01-06 16:41:02 +00:00
Brooks J Rady
931384d42f Functional drawing of plugins to the screen 2021-01-06 13:40:16 +00:00
Brooks J Rady
d509b0c339 Very nearly working 2021-01-06 13:34:21 +00:00
Brooks J Rady
a6ba792e89 Also borken 2021-01-06 12:53:12 +00:00
Aram Drevekenin
d8fca1d808 fix(render): properly render plugin borders and content 2021-01-06 10:10:25 +01:00
Denis Maximov
610545f54a
Merge pull request #131 from mosaic-org/mosaic#130
fix: fixes #130 by adding overflowing_sub
2021-01-06 10:30:01 +02:00
denis
cde7703ac7 wip: added a test 2021-01-06 10:08:47 +02:00
Brooks J Rady
d25df96eef Acutually pass combined position and size 2021-01-06 00:36:34 +00:00
Brooks J Rady
e19f674a21 Update message 2021-01-05 23:05:34 +00:00
Brooks J Rady
eb0f3b0285 Very borken 2021-01-05 22:41:23 +00:00
Brooks J Rady
92ef2d2360 Merge branch 'main' into wasm-launchable 2021-01-05 13:33:27 +00:00
Brooks J Rady
6f1546a5cb Keeping track of multiple plugins 2021-01-05 13:33:23 +00:00
Brooks J Rady
8dd9a6c7b2 fix(style): Deduplicate a massive chunk of code 2021-01-05 13:09:01 +00:00
denis
7c41c5f624 chore: fmt 2021-01-05 11:54:36 +02:00
denis
a1febb52bd fix: fixes #130 by adding overflowing_sub 2021-01-05 11:52:12 +02:00
Brooks Rady
c7db38d0c5
Merge pull request #126 from mosaic-org/wasm-launchable
Load WASM from Layouts (Includes PR #125)
2020-12-30 11:41:02 +00:00
Brooks J Rady
3695907097 Merge things 2020-12-30 11:25:55 +00:00
Brooks Rady
22890c53fe
fix(plugins): fully Working WebAssembly Loading! (#125)
* Fully Working WebAssembly Loading!

* Move some wasm code to it's own module
2020-12-30 09:59:32 +01:00