Commit Graph

189 Commits

Author SHA1 Message Date
a-kenji
7ed66d3e78
add(feature): unstable (#1542)
Add a feature `unstable`, which is intended to communicate the same
intent.

Gate: Send actions from cli with the `unstable` feature.
2022-06-25 21:48:00 +02:00
a-kenji
0b6001305b
feat: add capability to dispatch actions from cli (#1265)
* feat: add capability to dispatch actions from cli

Add capability to dispatch actions from the cli.

Can be invoked through `zellij action [actions]`

Automatically sends the action either to the current session,
or if there is only one session to the single session.

If there are multiple sessions, and no session is specified it will
error out.

Example:
1.
```
zellij action "[NewTab: , NewTab: ]"
```
2.
```
zellij -s fluffy-cat action '[NewPane: , WriteChars: "echo Purrr\n" ]'
```
3.
```
zellij -s fluffy-cat action '[ CloseTab, ]
```

* add: error message on malformed input

Add an error message on malformed input, for the `action`'s dispatch.
Rather than resulting in a panic.

* add: function to query the client id

* add: send specific actions to certain clients

Adds ability to send actions, that don't impact the server state
to all connected clients. For example `MoveFocus`

* add: client_id to non blocking actions

* chore(fmt): `cargo fmt`

* add: pick correct session, if there is exactly one

* add: use correct `client_id` for detach action

* add: make `[ ]` opaque to the user

* add: miette to toplevel to improve error message

* add: fake client reading configuration

Add the fake client reading configuration files,
this allows actions, that rely on configuration work
correctly. This is an intermediate solution, and should ideally not
be needed. It would be better if most of this state would be handled
by the server itself.

* chore(fmt): rustmt

* add: ability to detach multiple clients

Add ability to detach multiple clients at the same time.

* remove: obsolete functionality

* remove: unused functionality

* add: send correct action upon exiting

* chore(update): cargo update
2022-06-15 11:20:06 +02:00
Aram Drevekenin
6d15af04bd chore(version): bump development version 2022-06-07 15:38:56 +02:00
a-kenji
d62e6fb57e
add(plugin): compact-bar & compact layout (#1450)
* add(plugin): `compact-bar` & `compact` layout

* add(nix): `compact-bar` plugin

* add(config): `compact-bar` to the config

* add(workspace): `compact-bar` to workspace members

* add(assets): `compact-bar`

* chore(fmt): rustfmt

* add(nix): add `compact-bar`

* add: compact layout to dump command

* nix(build): fix destination of copy command

* add(makefile): add `compact-bar` to `plugin-build`

* add(layout): `compact-bar` to layout

* add: install `compact-bar` plugin

* fix(test): update input plugin test

* fix(plugin): default colors for compact-bar
2022-06-03 11:14:38 +02:00
Carmelo Sarta
3fdd4c8a19
Updated names and dialoguer crates dependencies (#1430)
* Updated names and dialoguer crates dependencies

I tried to build and run zellij with the updated dependencies and they seem to show no issues.
I need this in order to package zellij for Fedora.

* Updated cargo.lock

* fix: use suggested option for `names` crate

https://github.com/fnichol/names/blob/main/CHANGELOG.md#0120---2021-09-12

Co-authored-by: a-kenji <aks.kenji@protonmail.com>
2022-05-23 21:42:30 +02:00
a-kenji
d267730704
build: strip debug symbols (#1177)
* build: strip debug symbols

Stripping the symbols for the release build drops binary size
currently by 20% and the plugin binaries by up to 50%.

Alternative: Keep the debug symbols also on releases

* bump(rust): `1.58.0` -> `1.59.0`

* chore: bump MSRV `1.56` -> `1.59`

Needed for cargos strip-debug feature
2022-05-22 12:48:34 +02:00
Ken Matsui
2cf637c92a
fix(deps): Rename suggestion crate to suggest (#1387) 2022-05-10 16:39:28 +02:00
dependabot[bot]
fe9fa2d60a
build(deps): bump log from 0.4.16 to 0.4.17 (#1386)
Bumps [log](https://github.com/rust-lang/log) from 0.4.16 to 0.4.17.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits/0.4.17)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-09 18:32:36 +02:00
Aram Drevekenin
3177542674 chore(version): bump development version 2022-05-02 22:54:23 +02:00
Aram Drevekenin
a7ddfe1acc chore(release): v0.29.1 2022-05-02 22:31:08 +02:00
Aram Drevekenin
77e9dc93f7 chore(version): bump development version 2022-05-02 14:00:20 +02:00
Aram Drevekenin
bf21442186 chore(version): bump development version 2022-04-13 19:17:09 +02:00
Aram Drevekenin
3a2fee601a chore(package): patch version 2022-04-13 18:46:00 +02:00
Aram Drevekenin
8439198636 chore(version): bump development version 2022-03-31 15:07:18 +02:00
dependabot[bot]
a4ad296875
build(deps): bump log from 0.4.14 to 0.4.16 (#1278)
Bumps [log](https://github.com/rust-lang/log) from 0.4.14 to 0.4.16.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 10:40:45 +02:00
a-kenji
b0276dfd74
fix(feat): disable_automatic_asset_installation (#1226)
* fix(feat): `disable_automatic_asset_installation`

This fixes a regression in the feature system:
The asset installation didn't get turned off by the feature.

Add error logging to the install functions.

Properly show features in setup

disable `mkdir` in `wasm_vm` on `feature-disable-asset-installation`

Alternative:
    Is this even needed? We make sure the directory is there upon the
    normal asset installation.

fixes #1130
2022-03-17 11:40:09 +01:00
Aram Drevekenin
2e03692f5b chore(version): bump development version 2022-03-16 14:25:08 +01:00
Aram Drevekenin
9c7d13984f chore(release): v0.26.1 2022-03-16 14:03:07 +01:00
Aram Drevekenin
779679f53b chore(version): bump development version 2022-03-11 16:13:01 +01:00
a-kenji
5108bed936
fix(cargo.toml): remove reduntant resolver key (#1170)
There is no need anymore to specify `resolver=2`, `edition=2021` already
turns on the appropriate resolver.
2022-03-04 11:47:51 +01:00
Jae-Heon Ji
c7913c362c
feat: add cargo-binstall method (#1129)
* feat: add cargo-binstall method

* fix: update archive format type
2022-02-27 23:06:43 +09:00
Ken Matsui
f77f559f50
Bump suggestion version to the latest (#1124)
Closes: https://github.com/zellij-org/zellij/issues/1068
2022-02-27 11:59:36 +01:00
Aram Drevekenin
39eddd8b1c chore(version): bump development version 2022-02-22 13:36:39 +01:00
Aram Drevekenin
e06300f7db chore(version): bump development version 2022-01-05 11:14:15 +01:00
Aram Drevekenin
ce8e898e6d chore(version): bump development version 2021-12-20 18:31:54 +01:00
Aram Drevekenin
6175d57702 chore(version): bump development version 2021-12-20 17:56:47 +01:00
Aram Drevekenin
1a991ce7fb chore(version): bump development version 2021-12-14 17:32:02 +01:00
Aram Drevekenin
5f1f190a85 chore(version): bump development version 2021-12-13 16:19:37 +01:00
Aram Drevekenin
1ee743156c chore(version): bump development version 2021-11-29 10:09:22 +01:00
a-kenji
be692fd6b0 Merge branch 'suggestion-for-similar-session-name' of https://github.com/ken-matsui/zellij into ken-matsui-suggestion-for-similar-session-name 2021-11-11 18:27:55 +01:00
Ken Matsui
00b47b3058
feat(sessions): Suggestion for a similar session name
Remove unnecessary to_string

Replace `garando_syntax` crate with `lev_distance` which is much smaller

Replace `lev_distance` crate with `suggestion` to simplify the code
2021-11-11 13:14:59 +09: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
Ken Matsui
510feb3040
fix(main): Refactor src/main.rs by splitting one massive main function into commands.rs (#829)
* fix(main): Remove unnecessary pub visibility from the main function in `src/main.rs`
* fix(main): Avoid unnecessary if-evaluations in the main function of `src/main.rs`
* fix(commands): Simplify kill_all_sessions
2021-11-05 22:59:45 +01:00
Ken Matsui
4acb2458d2
feat(attach): Support --index option to choose specific session by provided number in active sessions ordered by creation date, resolve #823
feat(attach): Support `--first` option for `attach` sub-command to let zellij choose the alphabetically first session; resolve #823

fix(attach-first): Fix `--first` option to choose the first created session in the existent sessions

feat(attach): Support `--index` option to choose the session indexed by provided number like -t option of tmux

feat(attach): Support listing active sessions with index when a provided number is not found in the active sessions

feat(attach): Support listing active sessions with index when a provided number is not found in the active sessions

feat: Add anyhow to uniformly treat error types and avoid panics
2021-11-06 05:15:09 +09: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
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
Aram Drevekenin
0f3590adb5 chore(version): bump development version 2021-09-15 16:41:07 +02: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
qepasa
f0bc297743
Merge branch 'main' into unified-logging 2021-07-20 22:19:03 -07:00
Brooks J Rady
6a90542ae3 chore(release): bump development version 2021-07-19 20:35:50 +01:00
qepasa
383446d025
Update Cargo.toml 2021-07-09 07:56:20 +02:00
qepasa
45d2992a3f
Merge branch 'main' into unified-logging 2021-07-08 22:55:50 -07:00
Kunal Mohan
82288c6a3d Remove test feature and hacks 2021-07-06 21:32:43 +05:30
Aram Drevekenin
7fe87f59a3 chore(version): bump development version 2021-07-05 11:04:51 +02:00
Paweł Palenica
0c570a52f5 feat: Add logger to Zellij
We add log4rs create for logging across Zellij. Additionally, we capture
`stderr` output from plugins and log it the same log file as other
Zellij logs.
2021-06-29 23:46:00 -07:00
Aram Drevekenin
3313634fe9
Add e2e tests (#582)
* feature(tests): e2e tests

* chore(build): github action

* chore(build): fix workflow

* chore(build): fix workflow

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* working

* working

* working

* bring back the proper errors

* make e2e flow run properly

* style(fmt): make rustfmt happy

* style(fmt): make rustfmt happy

* run on everything just to test the workflow

* bring back running behaviour on workflow
2021-06-21 10:45:18 +02:00
Brooks J Rady
dc44a00699 chore(release): bump development version 2021-06-04 10:28:03 +01:00
Brooks J Rady
a9ce13c1d2 feat(ui): added feature for an experimental resize
The `parametric_resize_beta` feature has been added that enables the new
resize system. This change also introduces some background tweaks that
start laying the groundwork for future resize work without breaking
functionality.
2021-06-03 13:05:52 +01: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
Aram Drevekenin
9bdb40b4c6 chore(version): bump development version 2021-05-27 14:41:33 +02:00
Aram Drevekenin
ecab36703a chore(cargo): lock workspace versions 2021-05-27 14:11:51 +02:00
Kunal Mohan
0621ba8f34 Allow user to specify session name 2021-05-22 22:21:26 +05:30
Kunal Mohan
a351440c99 upgrade termbg and remove build-dependencies 2021-05-19 11:10:21 +05:30
Kunal Mohan
040d10df0f Re-export common dependencies from zellij-utils 2021-05-19 01:35:53 +05:30
Kunal Mohan
2038947a14 Big refactor: separate crates for client, server and utilities 2021-05-16 21:41:56 +05:30
Kunal Mohan
0d792e26f2 Switch to multiprocess model: Not looking good 2021-05-15 22:14:34 +05:30
Aram Drevekenin
97589c6a92 chore(version): bump development version 2021-05-15 13:50:35 +02:00
a-kenji
ba206b1f29 Invert Assets Installation Feature
* changed `enable_automatic_asset_installation` to
`disable_automatic_asset_installation`

This ensures that people by default get the
asset installation and need to opt out at
compile time, rather than opt in.

* removed default features

Not needed anymore.
2021-05-15 12:45:24 +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
4134c952f6 Merge branch 'main' of https://github.com/zellij-org/zellij into set-data-dir 2021-05-12 20:03:04 +02:00
a-kenji
ffd8f17a94 Add Complile Time System Directories
closes #380

* --features disable_automatic_asset_installation

disables automatic installation of the `data_dir`

* a set PREFIX env will use `$PREFIX/zellij` as its `data_dir`
2021-05-12 19:51:29 +02:00
Aram Drevekenin
ce0ca2f997 chore(version): bump development version 2021-05-11 11:45:21 +02:00
Aram Drevekenin
632a7a3209
fix(compatibility): upgrade vte to support csi subparameters (#469)
* fix(compatibility): upgrade vte to support csi subparameters

* style(fmt): rustfmt and clippy
2021-05-07 16:03:45 +02:00
Aram Drevekenin
ad9576dd95 chore(version): bump development version 2021-05-07 14:45:13 +02:00
Kunal Mohan
d5433f8f89
Merge pull request #223 from zellij-org/isolate-pty
Psuedo Client-Server model
2021-05-06 22:11:07 +05:30
a-kenji
bee1082b4a
Merge pull request #455 from Adhalianna/main
Add a manpage to Zellij
2021-05-05 22:22:10 +02:00
NKGoc
0ab7a51d04 simplifications 2021-05-05 12:05:05 +02:00
Brooks J Rady
6e5600efc8 chore(plugin): shuffle helper library names and versions 2021-05-04 23:31:30 +01:00
NKGoc
00d064e349 add manpage to zellij 2021-05-04 20:50:27 +02:00
Kunal Mohan
c1dd2c588e Fix after rebase 2021-05-04 20:48:28 +05:30
Kunal Mohan
d33106431d Fix after rebase 2021-05-04 20:48:17 +05:30
Kunal Mohan
913697b144 Place socket file in runtime directory or cache directory and use names crate for socket file name 2021-05-04 20:48:17 +05:30
Kunal Mohan
1eb732773a use Uuid to generate unique server socket names 2021-05-04 20:48:16 +05:30
Kunal Mohan
b7aa3fc21a Use interprocess crate for IPC 2021-05-04 20:48:16 +05:30
Kunal Mohan
2059d2c6aa Fix after rebase 2021-05-04 20:48:14 +05:30
Kunal Mohan
77682d9ab5 Use ipmpsc crate for IPC 2021-05-04 20:47:49 +05:30
Aram Drevekenin
bea4446586 chore(version): bump development version 2021-05-04 17:17:33 +02:00
Aram Drevekenin
fbe8042695 HOTFIX: allow cargo publish 2021-05-04 16:58:23 +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
56cf446275 chore: added zellij-tile-extra, moved macros from zellij-tile 2021-05-02 12:57:48 +03:00
denis
452940fb65 Merge branch 'main' into x-colors 2021-05-02 11:59:20 +03:00
Yutaka Kamei
168deabea7
Load config before start()
Previously, a config file was loaded within `start()`, and if the config
file is invalid, Zellij was supposed to show a user what's wrong with
it. However, since `start()` starts setting up its terminal with an
alternative screen buffer, neither standard output nor standard error
could display such an error.

This change intends to address this issue by making Zellij load a config
file before `start()`.

In addition, the patch also includes some refactorings:

* Redefine `from_cli_config` with `TryFrom`, which was introduced in
  Rust 1.34
* Remove conditional declaration `cfg(not(test))` because `start()` now
  receive a `Config` as the third argument
* Introduce [`tempfile`](https://crates.io/crates/tempfile) in order to
  run tests with actual files
* Typo?: "Deserialisation" -> "Deserialization"
2021-05-02 06:18:40 +09:00
denis
eabecde90b chore: painless merge this time 2021-05-01 13:45:01 +03:00
Brooks J Rady
65f15457c1 fix(build): don't store binary assets in git 2021-04-29 15:53:10 +01:00
Aram Drevekenin
28af9f077d chore(version): boost development version to 0.7.0 and update changelog 2021-04-29 16:50:48 +02:00
Brooks J Rady
2814c30272 feat(plugin): added the get_plugin_ids() query function 2021-04-27 14:57:54 +01:00
denis
47a918a53c wip: merge main 2021-04-24 09:18:37 +03:00
Aram Drevekenin
20a6a8e844 chore(version): boost development version to 0.6.0 2021-04-23 11:59:35 +02:00
Aram Drevekenin
f2fa8839d4 chore(version): 0.5.1 2021-04-22 20:59:20 +02:00
denis
ae3537957b wip: new build?" 2021-04-22 12:10:41 +03:00
denis
8d98ca7da0 wip: merge main in 2021-04-22 11:45:29 +03:00
Sebastian Thiel
b3ec1d81dd
Remove build.rs from package, allowing for completions to be excluded too 2021-04-22 09:57:21 +08:00