Learn R Programming

⚠️There's a newer version (0.2.4) of this package.Take me there.

tmuxr

Overview

tmuxr is an R package that allows you to manage tmux and interact with the processes it runs. It features a pipeable API with which you can create, control, and capture tmux sessions, windows, and panes.

Demonstration

The recording below demonstrates various capabilities of tmuxr such as: running processes, sending keys, splitting windows, and capturing panes. Note that normally, managing tmux and the processes it runs is done in a detached mode, so you wouldn’t see anything, but the result would be the same.

Have a look at the reference to learn more about what tmuxr has to offer.

Installation

tmuxr is available through CRAN and can be installed with install.packages("tmuxr"). The package is under active development though and the latest set of features can be obtained by installing from this repository using devtools:

# install.packages("devtools")
devtools::install_github("datascienceworkshops/tmuxr")

Compatibility

We regularly test tmuxr on Ubuntu with tmux versions 2.1 through 3.1b and on macOS with the latest version of tmux provided by Homebrew. tmuxr might work on Windows using Cygwin or WSL, but we haven’t tested this.

License

The tmuxr package is licensed under the MIT License.

Copy Link

Version

Install

install.packages('tmuxr')

Monthly Downloads

32

Version

0.2.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Jeroen Janssens

Last Published

May 7th, 2020

Functions in tmuxr (0.2.3)

attach_window

Attach to an existing tmux window
capture_pane

Capture the contents of a tmux pane
list_panes

List tmux panes
list_windows

List tmux windows
id

Identifier of a tmux object
index

Index of a tmux object
new_pane

Create a new tmux pane
list_sessions

List tmux sessions
rename_session

Rename a tmux session
clock_mode

Display a large clock
set_option

Set option
start_server

Start the tmux server
rename_window

Rename a tmux window
display_message

Display a message
is_running

Is the tmux server running?
resize_pane

Resize a tmux pane
kill_pane

Kill a tmux pane
attach_pane

Attach to an existing tmux pane
attach_session

Attach to an existing tmux session
new_window

Create a new tmux window
new_session

Create a new tmux session
kill_window

Kill a tmux window
layout

Change layout of a tmux window
swap_pane

Swap two tmux windows or panes
select_pane

Select a tmux pane
prop

Properties of a tmux object
tmux_command

Execute a tmux command
pipe_pane

Pipe contents of a tmux pane to a shell command
resize_window

Resize a tmux window
is_active

Is tmux object active?
style

Style of a tmux window or pane
tmuxr-package

tmuxr: Manage 'tmux' Sessions, Windows, and Panes
tmux_version

Get tmux version
style_convert

Format and parse style strings
kill_server

Kill the tmux server
is_installed

Is tmux installed correctly?
kill_session

Kill a tmux session
select_window

Select a tmux window
object_name

Name of a tmux object
send_keys

Send keys to a tmux pane
send_prefix

Send prefix to a tmux pane
object_size

Width and height of a tmux object