aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: d253e2e1fb79a70e3a4214cc0d7f05a40c3cdec5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# tmux-toggle-term

A terminal toggle for tmux that supports a per-window split pane and a global floating popup.

## Installation

Using [TPM](https://github.com/tmux-plugins/tpm):

```tmux
set-option -g @plugin 'https://git.sr.ht/~eugenetriguba/tmux-toggle-term'
```

Reload tmux and press prefix + I to install.

## Usage

### Toggle Split Terminal

`C-;` → Toggle a split terminal for the current tmux window

![Split Pane](./docs/split-open.webp)

### Toggle Floating Terminal

`C-f` → Toggle a global floating popup terminal

![Floating Window](./docs/float-open.webp)

## Customization

### Custom Key Bindings

You can override the default keybindings by setting the
`toggle-term-split-key` and `toggle-term-float-key` options:

```tmux
set -g @toggle-term-split-key 'M-t'
set -g @toggle-term-float-key 'M-f'
```

### Using Tmux Prefix Keys

By default, the plugin binds keys don't require the tmux prefix. If you prefer to
use the tmux prefix key, you can enable it by setting the use-prefix options:

```tmux
set -g @toggle-term-float-key 'f'
set -g @toggle-term-float-use-prefix 'true'

set -g @toggle-term-split-key ';'
set -g @toggle-term-split-use-prefix 'true'
```

With the above configuration:
- **Prefix + f** → Toggle floating terminal
- **Prefix + ;** → Toggle split terminal