tmux_interface
Description
tmux_interface is a rust language library for communication with TMUX via CLI.
Usage
-
Add a dependency in your
Cargo.toml
[dependencies] tmux_interface = "^0.1.0"
-
Add extern crate and use in your source file
extern crate tmux_interface;
-
Use it's functions
let tmux = TmuxInterface::new(); let new_session = NewSession { detached: Some(true), session_name: Some("session_name"), ..Default::default() }; tmux.new_session(&new_session).unwrap(); tmux.kill_session(None, None, Some("session_name")).unwrap();
Misc
-
Versions below
0.1.0
are first public releases, mostly for development and testing purposes. Do not use them in your Projects. -
Used in mosaic - tmux manager
-
Tested on: tmux 2.8
Directory Structure
-
src/
- crate sources-
Common:
tmux_interface.rs
- common functionstmux_interface_error.rs
- error propagating functionslib.rs
- main library file
-
TMUX functions (structure like in TMUX manual):
-
Unit tests for functions and their parts:
-
Parsing functions:
sessions.rs
- parse a session listsession.rs
- parse a sessionwindows.rs
- parse a windows listwindow.rs
- parse a windowpanes.rs
- parse a panes listpane.rs
- parse a panetmux_option.rs
- parse an option
-
Unit tests for parsing functions:
-
-
tests/
- crate integration tests (multiple functions):tmux_interface.rs
tmux_mock.sh
- bash script can be used instead of tmux binary, for simple logging (sniffing) intercommmunication between library functions and tmuxtmux_test.sh
- bash script for output testing of tmux functions
-
README.md
- common information (this file) -
LICENSE.md
- license text -
ROADMAP.md
- future goals, wishlist, ideas -
CHANGELOG.md
- version history -
Cargo.toml
- crate configuration (File Format) -
.travis.yml
- travis CI configuration (File Format) -
.editorconfig
- consisten conding style configuration (File Format)
License
tmux_interface is licensed under the MIT license. Please read the license file in this repository for more information.