Learn R Programming

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 function 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

40

Version

0.2.4

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

May 22nd, 2020

Functions in tmuxr (0.2.4)

clock_mode

Display a large clock
index

Index of a tmux object
is_installed

Is tmux installed correctly?
capture_pane

Capture the contents of a tmux pane
attach_pane

Attach to an existing tmux pane
id

Identifier of a tmux object
attach_window

Attach to an existing tmux window
attach_session

Attach to an existing tmux session
is_active

Is tmux object active?
kill_window

Kill a tmux window
object_name

Name of a tmux object
display_message

Display a message
object_size

Width and height of a tmux object
swap_pane

Swap two tmux windows or panes
list_windows

List tmux windows
layout

Change layout of a tmux window
rename_window

Rename a tmux window
new_pane

Create a new tmux pane
select_pane

Select a tmux pane
select_window

Select a tmux window
rename_session

Rename a tmux session
is_running

Is the tmux server running?
tmux_command

Execute a tmux command
kill_pane

Kill a tmux pane
style

Style of a tmux window or pane
list_panes

List tmux panes
style_convert

Format and parse style strings
resize_pane

Resize a tmux pane
list_sessions

List tmux sessions
new_session

Create a new tmux session
new_window

Create a new tmux window
resize_window

Resize a tmux window
send_keys

Send keys to a tmux pane
kill_server

Kill the tmux server
send_prefix

Send prefix to a tmux pane
kill_session

Kill a tmux session
start_server

Start the tmux server
pipe_pane

Pipe contents of a tmux pane to a shell command
tmux_version

Get tmux version
set_option

Set option
prop

Properties of a tmux object
tmuxr-package

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