README.md 1.7 KB
Newer Older
Mohcine Chraibi's avatar
Mohcine Chraibi committed
1
2
Screenshot             |  Demo
:-------------------------:|:-------------------------:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
3
<img src="tmux_screen.png" alt="drawing" width="400"/> |  [![Demo](https://img.youtube.com/vi/Dd7ybndVGLQ/0.jpg)](https://www.youtube.com/watch?v=Dd7ybndVGLQ "Demo tmux")
Mohcine Chraibi's avatar
Mohcine Chraibi committed
4
5
6
7
8
9





# Installation
Mohcine Chraibi's avatar
Mohcine Chraibi committed
10

Mohcine Chraibi's avatar
Mohcine Chraibi committed
11
Clone project and copy files to HOME
Mohcine Chraibi's avatar
Mohcine Chraibi committed
12
13
14
15

```
mkdir tmp_tmux
git clone https://gitlab.version.fz-juelich.de/chraibi1/tmux.git tmp_tmux
Mohcine Chraibi's avatar
Mohcine Chraibi committed
16
cp -r tmp_tmux/* ~
Mohcine Chraibi's avatar
Mohcine Chraibi committed
17
18
19
20
rm -r tmp_tmux
tmux
```

Mohcine Chraibi's avatar
Mohcine Chraibi committed
21
22
23
24
25
26
27
28
# Nomenclatur

- `Window`: like tabs
- `Pane`: a window can be splited in sub-windows
- `Ctrl`: Control key
- `Alt`: Alt key
- `Ctrl-a`: type `a` while holding `Ctrl`

Mohcine Chraibi's avatar
Mohcine Chraibi committed
29
30
31
32
33
34
35
36
# Sessions

from shell prompt

- `tmux ls`: list sessions
- `tmux attach -t <num> or <name>`: attach to session `num` or `name`
-  `tmux rename-session` [-t current-name] [new-name]

Mohcine Chraibi's avatar
Mohcine Chraibi committed
37
38
39

# Keystrokes

Mohcine Chraibi's avatar
Mohcine Chraibi committed
40
41
42
## General

- `Ctrl-a c`: new window
Mohcine Chraibi's avatar
Mohcine Chraibi committed
43
44
45
- `Ctrl-a ,`: change name of the window
- `Ctrl-a v`: split vertically
- `Ctrl-a h`: split horizontally
Mohcine Chraibi's avatar
Mohcine Chraibi committed
46
- `Ctrl-a z`: full screen on selected pane
Mohcine Chraibi's avatar
Mohcine Chraibi committed
47
- `Ctrl-a x`: close windows (answer question with y)
Mohcine Chraibi's avatar
Mohcine Chraibi committed
48
49
- `Ctrl-a [`: enter text-mode to navigate the window (`q` to exit)
- `Ctrl-a r`: refresh tmux after changing `~/.tmux.conf`
Mohcine Chraibi's avatar
Mohcine Chraibi committed
50
51
52
53
54
55

## Navigation windows

- `Ctrl-p`: previous window
- `Ctrl-n`: next window
- `Ctrl-arrow`: navigate panes (up, down, left, right)
Mohcine Chraibi's avatar
Mohcine Chraibi committed
56
- `Ctrl-number`: select windo with `number`
Mohcine Chraibi's avatar
Mohcine Chraibi committed
57

Mohcine Chraibi's avatar
Mohcine Chraibi committed
58
59
## Copy text

Mohcine Chraibi's avatar
Mohcine Chraibi committed
60
- Enter text-mode with `Ctrl-a [`
Mohcine Chraibi's avatar
Mohcine Chraibi committed
61
62
63
- `Ctrl-space`
- move with arrows to mark text
- `Alt-w`: copy
Mohcine Chraibi's avatar
Mohcine Chraibi committed
64
- `Ctrl-a ]`: paste
Mohcine Chraibi's avatar
Mohcine Chraibi committed
65
66
67
68

## Search

- Enter text mode with `Ctrl-[`
Mohcine Chraibi's avatar
Mohcine Chraibi committed
69
70
- `Ctrl-s`: searching forwards
- `Ctrl-r`: searching backwards
Mohcine Chraibi's avatar
Mohcine Chraibi committed
71

Mohcine Chraibi's avatar
Mohcine Chraibi committed
72
73
74
75
76
## Attach / Detach sessions

- `Ctrl-a d`: detach session
- To attach again to a *detached* session start tmux in a terminal as `tmux attach`

Mohcine Chraibi's avatar
Mohcine Chraibi committed
77

Mohcine Chraibi's avatar
Mohcine Chraibi committed
78