Commit graph

125 commits

Author SHA1 Message Date
Kunal Mohan
ea552d71e4 Introduce IpcReceiverWIthContext and move ipc stuff to common/ipc.rs
Fall back to /tmp/zellij-{uid} directory if runtime_dir is not available.
Use serialize_into() to avoid Vec allocation.
And some cleanup
2021-05-04 20:48:17 +05:30
Kunal Mohan
c6f93ba0d2 use better names for senders, receivers and threads 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
fedb588330 Fix after rebase 2021-05-04 20:48:15 +05:30
Kunal Mohan
4f088e8185 split start into start_server and start_client 2021-05-04 20:48:14 +05:30
Kunal Mohan
2059d2c6aa Fix after rebase 2021-05-04 20:48:14 +05:30
Kunal Mohan
813547483f Rename notify_server to connect_to_server 2021-05-04 20:47:52 +05:30
Kunal Mohan
e30ec5745e Add router thread on server side as well 2021-05-04 20:47:52 +05:30
Kunal Mohan
90982c3e47 Some documentation an ClientOsApi stuff 2021-05-04 20:47:52 +05:30
Kunal Mohan
af445394c0 minor fix while opening new tab 2021-05-04 20:47:52 +05:30
Kunal Mohan
bbcea31988 Synchronize update tabs actions using command_is_executing 2021-05-04 20:47:52 +05:30
Kunal Mohan
965cc71918 Hide IpcChannel entirely behind OsApi 2021-05-04 20:47:52 +05:30
Kunal Mohan
660434be06 documentation and nit fix 2021-05-04 20:47:52 +05:30
Kunal Mohan
bc2345c413 Hide server-side Ipc channels creation behind OsApis and some documentation fixes 2021-05-04 20:47:52 +05:30
Kunal Mohan
fd1debaa79 Fix after rebase 2021-05-04 20:47:51 +05:30
Kunal Mohan
2ab18244f7 fix tests 2021-05-04 20:47:51 +05:30
Kunal Mohan
0d814ebcde Divide OsApi into ClientOsApi and ServerOsApi and move calls to os thread 2021-05-04 20:47:51 +05:30
Kunal Mohan
d8986351ed fix testing for pseudo client-server model 2021-05-04 20:47:50 +05:30
denis
627e6b3672 wip: working on osapi message variants 2021-05-04 20:47:50 +05:30
Kunal Mohan
ef1c902be6 Introduce DoneCLosingPane message to ensure atomicity in state change 2021-05-04 20:47:50 +05:30
Kunal Mohan
2111f95f33 remove command_is_executing from pty_thread 2021-05-04 20:47:49 +05:30
Kunal Mohan
5ece7f44cc Use IPC for Server to client as well
Add router thread
2021-05-04 20:47:49 +05:30
Kunal Mohan
831a02b9c0 ensure proper shutdown 2021-05-04 20:47:49 +05:30
Kunal Mohan
77682d9ab5 Use ipmpsc crate for IPC 2021-05-04 20:47:49 +05:30
Kunal Mohan
1ee86f9a77 Introduce serlializable ClientInstruction and Rename ApiCommand 2021-05-04 20:47:49 +05:30
Kunal Mohan
858e48c6aa do not hang on exit 2021-05-04 20:47:49 +05:30
Kunal Mohan
c0e87df14c remove logs 2021-05-04 20:47:49 +05:30
Kunal Mohan
75b07cc6c8 Undo some changes 2021-05-04 20:47:49 +05:30
Kunal Mohan
aef52b0690 Use interprocess crate, BufReader and BufWriter 2021-05-04 20:47:49 +05:30
Kunal Mohan
2943dc7b3b Got things working! But we are loosing data in transmission :( PS: There are debug logs in there 2021-05-04 20:47:49 +05:30
Kunal Mohan
6fc1a5bf92 another try 2021-05-04 20:47:49 +05:30
Kunal Mohan
7beb246250 try fixes 2021-05-04 20:47:48 +05:30
Kunal Mohan
685e2eef0c Introduce IpcSenderWithContext 2021-05-04 20:47:48 +05:30
Kunal Mohan
588cdaa008 isolate pty thread 2021-05-04 20:47:48 +05:30
a-kenji
993a6fdf0a Rename install -> setup
* Renaming of the install module to convey the intent more,
move functions that install to a submodule install of setup.
2021-05-02 15:59:02 +02: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
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
Kyle Sutherland-Cash
69d34c3e09 Don't commit to master like an idiot... :( 2021-05-01 09:32:30 -07:00
Kyle Sutherland-Cash
2eadcb86a5 Bit of renaming 2021-05-01 09:22:21 -07:00
Kyle Sutherland-Cash
e7d8aefa79 Simplify some names and start using Bus in the plugin thread 2021-05-01 09:11:22 -07:00
Kyle Sutherland-Cash
bb2369dcb8 Use Bus type for PTY thread (incomplete) 2021-05-01 08:48:58 -07:00
Kyle Sutherland-Cash
ae6192d698 Use Bus type for screen thread 2021-05-01 08:26:57 -07:00
Kyle Sutherland-Cash
f01887463f Define shared bus type 2021-05-01 08:26:31 -07: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
a-kenji
153119de02 Fix Startup with Default in Same Folder
Doesn't try loading `default` files, other than
the plugin directory by default anymore.
2021-04-29 18:00:55 +02:00
Dante Pippi
62662464e3 Including text on tab name to let users know sync is on. 2021-04-28 11:16:06 -03:00
Dante Pippi
6769627c36 cargo fmt 2021-04-28 11:16:06 -03:00