Commit Graph

2849 Commits

Author SHA1 Message Date
henil
da5317274e Add depends field 2021-01-23 11:32:41 +05:30
Aram Drevekenin
15b92262b7
fix(compatibility): properly erase previous state before switching grids (#152)
* fix(compatibility): properly erase previous state before switching grids

* style(fmt): rustfmt
2021-01-22 10:24:34 +01:00
denis
bd1e3d2d7b Merge branch 'main' into server-client 2021-01-22 08:24:56 +02:00
Henil Dedania
c32b837df7
feat(plugin): Search in root folder for plugins and layout files 2021-01-21 12:04:29 +05:30
Aram Drevekenin
decc38232b
fix(main): do not hang on exit (#150) 2021-01-20 19:25:35 +01:00
Aram Drevekenin
81af57b15d
fix(compatibility): fix grid glitch edge-case when resizing (#149)
* fix(compatibility): fix grid glitch edge-case when resizing a grid with a scroll region

* style(fmt): rustfmt
2021-01-20 17:01:13 +01:00
Aram Drevekenin
e7ea05f50b fix(compatibility): don't drop empty lines when resizing (#148) 2021-01-19 18:34:53 +01:00
Kyle
09b1e03843 Add some message types for server-client comms 2021-01-17 19:15:32 +00:00
Henil Dedania
cbeae35f17
Update GOVERNANCE.md 2021-01-17 11:45:47 +05:30
henil
7c3c3f3231 Add metadata to Cargo.toml for building deb packages 2021-01-17 11:36:57 +05:30
Aram Drevekenin
e6a7ed31f6
fix(compatibility): clear characters should preserve current styling (#143)
* fix(compatibility): clear characters should preserve current styling

* style(fmt): rustfmt
2021-01-14 12:48:36 +01:00
Brooks Rady
e7f16ed468
feat(ui): added a help / status bar for keybindings and modes
To implement this status bar as a plugin (https://github.com/mosaic-org/status-bar/blob/master/src/main.rs), the following bits of infrastructure were changed:
- Layouts can now have an exact size constraint (1 row high, for example)
- Unconstrained blocks in a layout are now grown to fill the remaining space
- Default plugins and layouts are now stored in an OS-dependent data directory. The initial installation of these assets is done a build-time via `build.rs`
- All new tabs are created with a user-configurable default layout, unless provided with a different layout
- Plugins can now capture *all* key presses detected by Mosaic via `global_handle_key()`
- Plugins can now control whether or not they are selectable via `set_selectable()`
- Plugins can now fetch a vector of help-strings from Mosaic, which is currently being used to display helpful keybindings, via `get_help()`
- Also patched up all remaining compiler warnings and 23 of the 25 clippy lints on main
2021-01-13 13:10:48 +00:00
Brooks J Rady
69c19b90d1 Patched a width miscalculation in the status bar plugin 2021-01-12 16:01:49 +00:00
Brooks J Rady
50c3038731 Need to take into account the 2 chars of ', ' that also may be added! 2021-01-12 15:59:26 +00:00
Brooks J Rady
7d9a33e13e Fixed 23 clippy lints and warnings 2021-01-12 05:50:59 +00:00
Brooks J Rady
67dbd1d0e4 Merge branch 'main' into wasm-status-bar 2021-01-12 04:56:29 +00:00
Brooks J Rady
c80c0a1fa7 Trim and polish things a little 2021-01-12 04:53:39 +00:00
Brooks J Rady
209cce96a5 Finish implementing default layouts 2021-01-12 04:34:19 +00:00
Brooks J Rady
555f9af37a Install default layouts and plugins at build-time 2021-01-11 23:00:19 +00:00
Brooks J Rady
e9e49ef45f Fully functional status bar! 2021-01-11 21:53:40 +00:00
Brooks J Rady
8c4db83dfb Bump dependency version 2021-01-11 21:50:50 +00:00
Brooks J Rady
145104abdf Move to published version of library 2021-01-11 21:43:23 +00:00
Brooks J Rady
680a986cf6 Add get_help function 2021-01-11 21:37:47 +00:00
Brooks J Rady
94c231bf2c Functional help bar 2021-01-11 21:35:49 +00:00
Brooks J Rady
01df6ed568 Added a get_help function to the plugin API 2021-01-11 19:55:29 +00:00
Brooks J Rady
eb7a3fdf60 Keypress Debug Version 2021-01-11 19:00:31 +00:00
Aram Drevekenin
98e5e94670
refactor(terminal-pane): simplify Scroll into Grid (#137)
* refactor(grid): move from scroll to grid (prototype with tests passing)

* refactor(grid): remove scrollbuffer

* fix(terminal): do not overflow cursor y position when resizing

* refactor(file-structure): move grid to different file

* fix(compatibility): vim horizontal resize

* fix(compatibility): various fixes for cursor movement

* style(grid): remove unused imports

* style(grid): remove debugging

* style(fmt): rustfmt

* style(fmt): rustfmt
2021-01-11 18:23:29 +01:00
Brooks J Rady
1275a9e73a No more glob imports in the register_tile! macro 2021-01-11 16:05:55 +00:00
Brooks J Rady
efcd36a52c Added the set_selectable plugin API function 2021-01-11 07:33:35 +00:00
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