remux/README.md

118 lines
2.9 KiB
Markdown
Raw Normal View History

2023-04-06 13:34:32 -04:00
# ReMux: a friendlier tmux wrapper
2023-06-15 00:21:23 -04:00
Pronounced \[ ɹ̠i məks \], like "remix."
2023-06-12 19:24:57 -04:00
A tmux wrapper and command shortener written in Rust. ReMux's
goal is to wrap tmux commands to be both shorter, and oriented
around session names instead of session IDs.
2023-04-06 13:34:32 -04:00
2024-03-06 16:05:53 -05:00
To further simplify developer usage, the `attach`, `detach`, `has`, and `new`
commands can be used without a target field, and will default to the name of
the Git repository root directory, if one is found.
2023-06-12 19:24:57 -04:00
In their shortest forms, *every* ReMux command is as short or
shorter than its equivalent tmux command:
```sh
2023-04-06 13:34:32 -04:00
# new session
2024-06-10 12:02:57 -04:00
tmux new-s -t foo
2023-04-06 13:34:32 -04:00
remux n foo
2024-06-10 12:02:57 -04:00
# list sessions
2023-04-06 13:34:32 -04:00
tmux ls
remux l
# attach
tmux a -t foo
remux a foo
2023-06-12 19:24:57 -04:00
# has
2024-06-10 12:02:57 -04:00
tmux h -t foo
remux h foo
2023-06-12 19:24:57 -04:00
# detach
2024-06-10 12:02:57 -04:00
tmux det -t foo
2023-06-12 19:24:57 -04:00
remux d foo
# nesting sessions with '-n' flag
TMUX='' tmux a -t foo
remux a -n foo
TMUX='' tmux new-session -t foo
remux n -n foo
2024-06-10 12:02:57 -04:00
# switch to another session
tmux swi -t foo
rmux s foo
# cd to session path
2024-06-24 17:17:40 -04:00
cd `tmux display-mes -p "#{session_path}"`
2024-06-10 12:03:40 -04:00
cd `rmux p`
2024-06-10 12:02:57 -04:00
2023-04-06 13:34:32 -04:00
```
2024-02-19 19:39:35 -05:00
## Dependencies
ReMux depends on [tmux](https://github.com/tmux/tmux).
## Installation
2024-02-22 14:20:13 -05:00
### Manual Install
<details>
<summary>Release Binary</summary>
Copy the compiled binary from the <a href="https://git.vwolfe.io/valerie/remux/releases">releases page</a>
to a directory in <code>$PATH</code>, such as <code>/usr/bin/</code>.
</details>
<details>
<summary>Compile from Source</summary>
Compile using cargo with the command <code>cargo build --release</code> and copy
the file from <code>target/release/</code> to a directory in <code>$PATH</code>,
such as <code>/usr/bin/</code>.
</details>
<details>
<summary>makepkg (AUR)</summary>
Clone the <a href="https://aur.archlinux.org/remux.git">AUR Repository</a> and
run the command <code>makepkg --install</code>.
</details>
### Package Managers
<details>
<summary>Arch Linux (AUR): <code>remux</code></summary>
Install the package from the <a href="https://aur.archlinux.org/packages/remux"><code>remux</code> AUR Package</a>
2024-02-25 20:54:03 -05:00
using an AUR package manager such as <a href="https://github.com/Morganamilo/paru"><code>paru</code></a>.
2024-02-22 14:20:13 -05:00
</details>
2024-02-19 19:39:35 -05:00
2024-03-03 22:28:32 -05:00
<details>
<summary>Cargo: <code>tmux-remux</code></summary>
Install the package using Cargo with the command <code>cargo install tmux-remux</code>.
</details>
2024-07-17 09:23:34 -04:00
### Supplemental
2024-07-06 18:33:28 -04:00
<details>
2024-07-17 09:23:34 -04:00
<summary>Bash Completions</summary>
Copy <code>bash-completion/remux</code> to the appropriate directory, typically
2024-07-17 09:23:34 -04:00
<code>/usr/share/bash-completion</code>.
</details>
<details>
<summary>Man Page: Section 1</summary>
2024-07-06 20:48:45 -04:00
Copy <code>man/remux.1</code> into <code>/usr/share/man/man1/</code>.
2024-07-06 18:33:28 -04:00
</details>
2024-03-06 16:12:54 -05:00
## Configuration
The pretty-print attached symbol (default: `*`) can be set manually by setting `REMUX_ATTACH_SYMBOL`.
2023-06-20 12:33:38 -04:00
## Libraries
- [pico-args](https://crates.io/crates/pico_args) — argument parsing
- [termion](https://crates.io/crates/termion) — ANSI formatting
2024-02-13 19:36:38 -05:00
- [tmux_interface](https://crates.io/crates/tmux_interface) — tmux communication
2023-06-13 10:29:28 -04:00