Commit Graph

139 Commits

Author SHA1 Message Date
Jae-Heon Ji
c349586d84
feat: provide the zellij version to plugins (#894)
* feat: add draft of feature

* feat(wasm): add plugin API for getting of zellij version

* feat(wasm): update feedback

* delete unnecessary function
2021-11-26 10:44:43 +01:00
Aram Drevekenin
6c6a4393f4
This adds a UI for multiple users in panes (behind a feature flag) (#897)
* feat(ui): multiple users in panes

* style(fmt): make rustfmt happy

* style(fmt): make clippy happy
2021-11-25 16:21:59 +01:00
a-kenji
b861baa6a1
First attempt to provide an overlay prompt (#871) 2021-11-15 20:13:05 +01:00
Aram Drevekenin
26bd80be2d chore(version): bump development version 2021-11-10 18:01:56 +01:00
Aram Drevekenin
0fec10b08b chore(release): v0.20.1 2021-11-10 17:54:39 +01:00
Aram Drevekenin
b232326dc2 chore(version): bump development version 2021-11-08 15:42:46 +01:00
Tw
9ea3dc0dbe
feat(ui): add right-click support to plugins 2021-11-02 18:49:10 +00:00
Brooks J Rady
e0d7212c2a chore(rust): move to 2021 edition
Get with the times, kiddo (and all hail disjoint captures)
2021-10-22 02:21:16 +01:00
Aram Drevekenin
3b2d8f692c chore(version): bump development version 2021-10-20 15:00:32 +02:00
Kunal Mohan
d90e3d4cac
Feature: Move panes directionally (#762)
* Feature: Move panes directionally

* change keybinds

* Fix active pane after move

* Add a separate 'Move' mode

* Add tests

* Add more tests

* Send resize message to pty

* wrap set_terminal_size_using_fd() in macro

* change keybind for Move mode

* cargo fmt

* fix test

* move render functions from tab.rs to screen.rs

* undo wrong keybinds
2021-10-19 20:20:28 +05:30
Brooks J Rady
b94b25c5fe fix(plugin): clean up the mouse PR a little 2021-10-12 23:11:23 +01:00
qepasa
0710594588
feat(plugin): Add mouse events for plugins (#629)
* feat(plugin): Add mouse events for plugins

* Add double click support in strider

* Add support for mouse clicks in tab-bar and fix bug in strider with selecting past the list of files and random double click action

* continue working on mouse support for tab bar

* finish tab change

* fix fmt and fix bug in strider double-click

* fix clippy

* cleanup dbgs and logs

* fix clippy

* noop change to rerun e2e tests

* Rebase and fix mouse click behavior in tab-bar and strider after rebase

* fix fmt

* remove dbgs and and comment in tab-line/main.rs

* cargo fmt

* Code review suggestions

* rebase fix

* fix clippy

* fix mouse selection for tabs in tab-bar
2021-10-12 22:37:54 +01:00
Aram Drevekenin
79fa3594e3 chore(version): bump development version 2021-09-30 11:39:04 +02:00
Aram Drevekenin
3df362d046 chore(version): bump development version 2021-09-30 11:13:33 +02:00
Aram Drevekenin
8d72013d4d chore(version): bump development version 2021-09-29 15:23:22 +02:00
Kaito Akita
4632e90b73
feat(ui): The status bar indicates that the panes are full screen and how many hidden panes are (#450)
* fix(ui): offset content after viewport construction

* Added the feature to display fullscreen information on the second line of the status-bar.

* fix(strider): update host mount-point

* fix(plugin): create missing data directories as needed

* feat(layout): specify only tab name in `tabs` section (#722)

Allow specifying only the tab name in the `tabs` section

- For example this is now possible:
```
tabs:
  - name: first
    parts:
      - direction: Vertical
      - direction: Vertical
  - name: second
  - name: third
```
  For that the tab section defaults the direction to
  `direction::Horizontal`

- Adds an error upon specifying a tab name inside the `parts` section
  of the tab-layout

* docs(changelog): Solely name tab in `tabs` section

* feature(release): Copy default config to the examples folder on release (#736)

fixes #733

* docs(changelog): Copy example config on release

* Update default config (#737)

* feat(plugin): add manifest to allow for plugin configuration (#660)

* feat(plugins-manifest): Add a plugins manifest to allow for more configuration of plugins

* refactor(plugins-manifest): Better storage of plugin metadata in wasm_vm

* fix(plugins-manifest): Inherit permissions from run configuration

* refactor(plugins-manifest): Rename things for more clarity

- The Plugins/Plugin structs had "Config" appended to them to clarify
  that they're metadata about plugins, and not the plugins themselves.

- The PluginType::OncePerPane variant was renamed to be just
  PluginType::Pane, and the documentation clarified to explain what it
  is.

- The "service" nomenclature was completely removed in favor of
  "headless".

* refactor(plugins-manifest): Move security warning into start plugin

* refactor(plugins-manifest): Remove hack in favor of standard method

* refactor(plugins-manifest): Change display of plugin location

The only time that a plugin location is displayed in Zellij is the
border of the pane. Having `zellij:strider` display instead of just
`strider` was a little annoying, so we're stripping out the scheme
information from a locations display.

* refactor(plugins-manifest): Add a little more documentation

* fix(plugins-manifest): Formatting

Co-authored-by: Jesse Tuchsen <not@disclosing>

* chore(docs): update changelog

* feat(sessions): mirrored sessions (#740)

* feat(sessions): mirrored sessions

* fix(tests): input units

* style(fmt): make rustfmt happy

* fix(tests): make mirrored sessions e2e test more robust

* refactor(sessions): remove force attach

* style(fmt): rustfmtify

* docs(changelog): update change

* fix(e2e): retry on all errors

Co-authored-by: Brooks J Rady <b.j.rady@gmail.com>
Co-authored-by: a-kenji <aks.kenji@protonmail.com>
Co-authored-by: spacemaison <tuchsen@protonmail.com>
Co-authored-by: Jesse Tuchsen <not@disclosing>
Co-authored-by: Aram Drevekenin <aram@poor.dev>
2021-09-27 12:07:28 +02:00
spacemaison
c9372212f6
feat(plugin): add manifest to allow for plugin configuration (#660)
* feat(plugins-manifest): Add a plugins manifest to allow for more configuration of plugins

* refactor(plugins-manifest): Better storage of plugin metadata in wasm_vm

* fix(plugins-manifest): Inherit permissions from run configuration

* refactor(plugins-manifest): Rename things for more clarity

- The Plugins/Plugin structs had "Config" appended to them to clarify
  that they're metadata about plugins, and not the plugins themselves.

- The PluginType::OncePerPane variant was renamed to be just
  PluginType::Pane, and the documentation clarified to explain what it
  is.

- The "service" nomenclature was completely removed in favor of
  "headless".

* refactor(plugins-manifest): Move security warning into start plugin

* refactor(plugins-manifest): Remove hack in favor of standard method

* refactor(plugins-manifest): Change display of plugin location

The only time that a plugin location is displayed in Zellij is the
border of the pane. Having `zellij:strider` display instead of just
`strider` was a little annoying, so we're stripping out the scheme
information from a locations display.

* refactor(plugins-manifest): Add a little more documentation

* fix(plugins-manifest): Formatting

Co-authored-by: Jesse Tuchsen <not@disclosing>
2021-09-22 18:13:21 +01:00
Tw
4a7983f1c6
feat(plugin): add visibility event for the plugin (#717)
When a tab becomes active/inactive, it send corresponding visibility event to its containing plugins.

Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-19 14:14:50 +01:00
Aram Drevekenin
0f3590adb5 chore(version): bump development version 2021-09-15 16:41:07 +02:00
Tw
19b3f8366f
feat(plugin): add exec_cmd helper for executing command in host
Signed-off-by: Tw <wei.tan@intel.com>
Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-09 11:45:03 +01:00
Aram Drevekenin
7c075ac7e3 chore(version): bump development version 2021-08-31 11:36:09 +02:00
Brooks Rady
76a5bc8a05
feat(ui): overhauled resize and layout systems
* refactor(panes): move to parametric pane sizes

* Fixed the simpler errors by casting to usize

* The least I can do is pass the formatting check...

* Move to stable toolchain

* Well, it compiles?

* And now it doesn't! ;)

* Baseline functionality with the new Dimension type

* Working POC for percent-based resizing

* REVERT THIS COMMIT – DELETES TESTS

* Perfected the discrete resize algorithm

* Fixed fixed-size panes

* Basic bidirectional resize

* feat(resize): finalised parametric resize algorithm

* Reduce the logging level a bit

* Fixed nested layouts using percents

* Bug squishing for implicit sizing

* Here is a funky (read: rubbish) rounding approach

* And now it's gone again!

* Improve discretisation algorithm to fix rounding errors

* Fix the last layout bug (maybe?)

* Mixed explicit and implied percents work now

* Let's pretend that didn't happen...

* Make things a bit less crashy

* Crash slightly more for now (to find bugs)

* Manaually splitting of panes works now

* Start moving to percent-based resizes

* Everything but fullscreen seems to be working

* Fix compilatation errors

* Culled a massive amount of border code

* Why not pause to please rustfmt?

* Turns out I was still missing a few tests...

* Bringing back even more tests!

* Fix tests and pane boarders

* Fix the resize system without gaps

* Fix content offset

* Fixed a bug with pane closing

* Add a hack to fix setting of the viewport

* Fix toggling between shared borders and frames

* fix(tests): make e2e properly use PaneGeom

* style(fmt): make rustfmt happy

* Revert unintentional rounding of borders

* Purge some old borderless stuff

* Fix busted tab-bar shrinking

* Update E2E tests

* Finish implementing fullscreen!

* Don't crash anymore?

* Fix (almost) all tests

* Fix a lack of tab-stops

* All tests passing

* I really can't be bothered to debug a CI issue

* Tie up loose ends

* Knock out some lingering FIXMEs

* Continue to clean things up

* Change some naming and address FIXMEs

* Cull more code + FIXMEs

* Refactor of the resize system + polish

* Only draw frames when absolutely necessary

* Fix the tab-bar crash

* Fix rendering of boarders on reattach

* Fix resizing at small pane sizes

* Deduplicate code in the layout system

* Update tab-bar WASM

* Fixed the pinching of panes during resize

* Unexpose needlessly public type

* Add back a lost test

* Re-add tab tests and get them to compile

* All tabs need layouts

* Start fixing tests + bug in main

* Stabilize the resize algorithm rounding

* All tests from main are now passing

* Cull more dead code
2021-08-28 17:46:24 +01:00
Thomas Linford
94f20cfd53
Indicate to the user when text is copied to the clipboard (#642)
* Indicate to the user when text is copied to the clipboard

- broadcast CopyToClipboard event to plugins after selection has been
  copied, and InputReceived event after any input has been received.
- add new ClientToServerMsg InputReceived
- subscribe status-bar plugin to new events, modify second line after
  CopyToClipboard, reset it on InputReceived.

* remove unnecessary InputReceived ClientToServerMsg

- use existing Actions instead to know that user input has been received

* make status bar text copied hint bold green

* cleanup

* cleanup

* cleanup
2021-08-23 15:51:33 +02:00
a-kenji
c9ccfb2919
Merge branch 'main' into display-session-name 2021-07-22 16:12:35 +02:00
Brooks J Rady
6a90542ae3 chore(release): bump development version 2021-07-19 20:35:50 +01:00
Lovecraftian Horror
eb6e49c260 Move ModeInfo::new() back to get_mode_info() 2021-07-09 15:21:47 -04:00
Lovecraftian Horror
4fcf558156 Display session name within session 2021-07-08 14:16:25 -04:00
Aram Drevekenin
7fe87f59a3 chore(version): bump development version 2021-07-05 11:04:51 +02:00
Brooks J Rady
dc44a00699 chore(release): bump development version 2021-06-04 10:28:03 +01:00
Brooks J Rady
98c29832e1 Merge branch 'main' into resize-overhaul 2021-06-01 18:05:32 +01:00
a-kenji
bd43a8aa63 docs(manpage): Update manpage 2021-05-30 21:07:44 +02:00
a-kenji
0be151fa28 Merge branch 'main' of https://github.com/zellij-org/zellij into theme-config 2021-05-30 15:17:55 +02:00
a-kenji
ce73b6cca0 Add color theme config
* add option `theme` that allows for setting of a theme,
the default is `default`

* under `themes` the themes can be described as follows:

either:
```
themes:
  default:
    fg: [0,0,0]
    bg: [0,0,0]
    black: [0,0,0]
    red: [0,0,0]
    green: [0,0,0]
    yellow: [0,0,0]
    blue: [0,0,0]
    magenta: [0,0,0]
    cyan: [0,0,0]
    white: [0,0,0]
    orange: [0,0,0]
```
or
```
themes:
  default:
    fg: 0
    bg: 0
    black: 0
    red: 0
    green: 0
    yellow: 0
    blue: 0
    magenta: 0
    cyan: 0
    white: 0
    orange: 0
```

If the key is different from default, it needs to either be specified on
start with `options --theme [THEME]`, or in the configuration file under
theme: [THEME].

closes #390
2021-05-30 15:07:21 +02:00
Brooks J Rady
f2c5ee44f7 Getting back to where we started... (Buggy Resizing) 2021-05-29 23:12:11 +01:00
a-kenji
4c079ca25d
Merge pull request #513 from a-kenji/default-mode-368
Default mode 368
2021-05-29 18:18:30 +02:00
Aram Drevekenin
d54c82420e chore(version): bump development version 2021-05-28 14:35:34 +02:00
Aram Drevekenin
1c69d70082 chore(version): change to patch version 2021-05-28 14:05:52 +02:00
a-kenji
81b026df24 Merge branch 'main' of https://github.com/zellij-org/zellij into default-mode-368
* If starting in the locked mode after the merge,
the locked mode seems to need 2 actions to go to
the normal mode - after that everything works
as expected.

- This is not intended.
2021-05-27 15:49:50 +02:00
Aram Drevekenin
9bdb40b4c6 chore(version): bump development version 2021-05-27 14:41:33 +02:00
a-kenji
80fe803ffd Default mode 368
* Parsing Implemented

* Adds option to specify a default mode
  either through a flag `--options default-mode [MODE]`,
  or a configuration option `default_mode: [MODE]`

closes #368
2021-05-24 23:06:50 +02:00
Kunal Mohan
ac082a1c93 add keybinds for session mode and detach 2021-05-22 22:19:50 +05:30
Aram Drevekenin
97589c6a92 chore(version): bump development version 2021-05-15 13:50:35 +02:00
Aram Drevekenin
791cfd0a6e chore(version): bump development version 2021-05-14 11:01:13 +02:00
Aram Drevekenin
e68504552e hotfix: bump zellij-tile version 2021-05-14 10:39:59 +02:00
a-kenji
776a2c5151 Fix Simplified Ui
Propagate the config now, in all the places, as opposed to
fallback to a default.
2021-05-12 15:27:28 +02:00
a-kenji
088bcf3dd8 Add Option for Simplified Layout
* the simplified layout omits the Nerdfonts characters that are not
  found in every Fontset

* add an optional config option to opt into the simplified ui
  `simplified_ui: bool`

* add a config flag that allows opting into the simplified ui
  `zellij options --simplified-ui`

* move the `clean` flag to the `setup` subcommand
2021-05-10 16:03:06 +02:00
Brooks J Rady
6e5600efc8 chore(plugin): shuffle helper library names and versions 2021-05-04 23:31:30 +01:00
Aram Drevekenin
97eca28954 chore(version): bump zellij-tile 2021-05-04 16:48:19 +02:00
Aram Drevekenin
1f88b342e2
fix(colors): stabilize colors (#453)
* fix(colors): stabilize colors

* style(fmt): rustfmt
2021-05-04 16:06:55 +02:00
denis
ce1f81bcec chore: remove unused dependency from zellij-tile 2021-05-02 13:04:12 +03:00
denis
56cf446275 chore: added zellij-tile-extra, moved macros from zellij-tile 2021-05-02 12:57:48 +03:00
denis
d48cc81536 fix: don't have new on ColoredElements anymore, removed default for palette in zellij-tile 2021-05-02 12:25:49 +03:00
denis
f85822972a chore: cleanup, fix: the tests finally pass 2021-05-01 14:44:43 +03:00
denis
eabecde90b chore: painless merge this time 2021-05-01 13:45:01 +03:00
Dante Pippi
62662464e3 Including text on tab name to let users know sync is on. 2021-04-28 11:16:06 -03:00
Brooks J Rady
e163bd56e7 feat(plugin): simple timers implemented via the set_timeout() call 2021-04-27 17:13:25 +01:00
Brooks J Rady
2fc7810c0b fix(plugin): mark Event as non-exhaustive 2021-04-27 15:19:55 +01:00
Brooks J Rady
2814c30272 feat(plugin): added the get_plugin_ids() query function 2021-04-27 14:57:54 +01:00
denis
2e94ef51aa wip: trying to make it less messy so people don't hate me 2021-04-24 18:28:28 +03:00
denis
de72d3d2fb wip: tab bar coloring 2021-04-24 11:42:40 +03:00
denis
fef466c74b wip: the only way to make the default look like on main is to make more customizable colored elements 2021-04-24 10:21:25 +03:00
denis
8d98ca7da0 wip: merge main in 2021-04-22 11:45:29 +03:00
Brooks J Rady
fee999ec40 fix(naming): made plugin terminology more consistent 2021-04-19 23:37:47 +01:00
Brooks J Rady
03011c1e5a fix(crates.io): fix outdated zellij-tile library 2021-04-14 20:04:02 +01:00
denis
748a7ffa6e wip: cleaning up a bit, need to map the colors to the right places in the palette 2021-04-09 14:14:50 +03:00
denis
7774edd45a wip: need to figure out how to clear lines 2021-04-08 16:29:52 +03:00
denis
2b59edbe9d wip: need to set the default for Palette in the plugins 2021-03-31 09:44:41 +03:00
denis
6e276ae386 wip: move Palette out of zellij-tile 2021-03-27 15:30:53 +02:00
denis
b71315b036 wip: latest plugin system merge in 2021-03-27 14:43:16 +02:00
a-kenji
84488a35aa Merge branch 'main' of https://github.com/zellij-org/zellij into config-file 2021-03-26 23:33:36 +01:00
denis
2c402b0b1d wip: scary how messy it is, but it's a start 2021-03-26 16:42:38 +02:00
Brooks J Rady
b6f945da35 Wrap up the plugin system refactor, running everything through update() 2021-03-25 17:22:10 +00:00
Brooks J Rady
84a5cf95d1 Converted tab updates to the new generic update() function 2021-03-25 15:51:39 +00:00
Brooks J Rady
0371c111b7 Removed AppState and the unneeded get_help() function 2021-03-25 14:56:59 +00:00
Brooks J Rady
0ea8ce497d Rename Help to ModeInfo 2021-03-25 14:30:31 +00:00
Brooks J Rady
23df8e447a Move most key handling to the update() + event system 2021-03-23 23:57:18 +00:00
Brooks J Rady
ac55e59047 Initial implementation of the update callback + upstream termion 2021-03-23 19:52:59 +00:00
Brooks J Rady
9bc7a268ce Merge changes from main 2021-03-23 16:42:54 +00:00
Brooks J Rady
a1e6171031 Rename references of 'draw' to 'render' for plugins 2021-03-23 16:26:34 +00:00
Aram Drevekenin
8d0ff0fe40
feat(input): new shortcuts and ui (#220)
* feat(statusbar): new shortcuts

* feat(input): new shortcuts and ui

* style(fmt): rustfmt
2021-03-11 16:03:28 +01:00
Brooks J Rady
e9ab81850e Add event subscription tracking 2021-03-09 21:51:17 +00:00
Brooks J Rady
06bce9a1fd Deduplicate the WASM interface structs 2021-03-09 19:39:42 +00:00
Brooks J Rady
3e10e34575 Rename init() to load() in plugin API + Bump deps 2021-03-09 17:09:21 +00:00
Jonah Caplan
44b0246e91
feat(tabs): add ability to set tab name (#212)
* send all tabs in vec

* works but no input filtering

* add event types

* add event handler for tab events

* fmt fixups

* update tab name in place, and escape rename works

* rename handle_tab_event handle_tab_rename_keypress

* handle empty new_name when renaming

* fix(tabs): pad active tab name too

* fix(tabs): report proper length

* fix(tabs): always render active tab

* style(fmt): rustfmt

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2021-03-08 10:06:23 +01:00
Jonah Caplan
ce54127d7d add basic tab bar #166 2021-02-25 01:44:10 -05:00
categorille
c74e2ef273
feat(input): new keybindings and persistent mode as default (#181)
* added some comments in the input module

* InputHandler now has InputState instead of separate InputMode and permanent bool

* keybinds are now associated with a Vec<Action> instead of a single Action

* removing "persistent" modes alltogether to reimplement the feature, help bar broken

* locked command mode by default, fixes #161, help bar still broken

* status bar fixed, still a few improvements/bugs to go

* better shortcut help bar contents

* fixed last bits and i think we are good

* modified tests according to new controls, not working

* Revert "modified tests according to new controls, not working"

This reverts commit f2d9421ff0.

* basic.rs tests now pass, not the rest

* close_pane.rs tests pass, but very slowly?

* compatibility.rs tests pass, very slowly as well

* {layout, {move_focus_*}}.rs all working mildly slowly

* {resize_*}.rs should all work but very slowly and funky, see PR comments

* {tabs,toggle_fullscreen}.rs pass. Test performance issue yet to be fixed

* tests now work, with a hack :| ready for merge

* rustfmt + deleted references to InputState and mode persistency
2021-02-12 14:55:22 +01:00
Brooks J Rady
678a6f877c Work towards a functional build 2021-02-09 19:06:47 +00:00
Brooks J Rady
50ec879933 Rough outline of the final structure 2021-02-09 18:01:50 +00:00
Brooks J Rady
7bab33e5d2 Merged in mosaic-tile and started renaming to zellij 2021-02-09 17:38:02 +00:00