-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.txt
74 lines (61 loc) · 2.81 KB
/
tmux.txt
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# tmux is a \e[1mT\e[22merminal \e[1mMU\e[22mltiple\e[1mX\e[22mer. It lets you split a window (the whole screen) into panes, and you
# can have multiple windows too; they're numbered, and the current one is asterisk'd, in the bottom bar.
# With a customizable prefix you can change settings/do actions etc. Default is Ctrl-b.
\e[38;5;208mprefix\e[0m ? list actions
\e[38;5;208mprefix\e[0m : command prompt
# swap pane with previous/next; {, } being Shift-[, ]
\e[38;5;208mprefix\e[0m {
\e[38;5;208mprefix\e[0m }
### WINDOWS
\e[38;5;208mprefix\e[0m c \e[36m# new window\e[0m
\e[38;5;208mprefix\e[0m n \e[36m# next window\e[0m
\e[38;5;208mprefix\e[0m p \e[36m# previous window\e[0m
\e[38;5;208mprefix\e[0m l \e[36m# last window\e[0m
\e[38;5;208mprefix\e[0m ! \e[36m# break current pane out into new window\e[0m
\e[38;5;208mprefix\e[0m w \e[36m# show windows and panes in a navigable tree \o/\e[0m
# move current pane into other window where \e[38;5;200mn\e[0m = window number (see bottom bar)
# the ':' opens the command prompt where you type out the rest.
\e[38;5;208mprefix\e[0m :join-pane -t [session]:\e[38;5;200mn\e[0m
# for the reverse, -s will join a/the pane from the target window to your current window
# (that's probably for "Target" and "Source")
# capture the entire pane history and dump it to a file:
$ tmux capture-pane -eS - -p > tmux.txt
# -e = include escape sequences (most of them at least; not the non-standard 100-107 range for one)
# -S = starting line (negative is from before visible, - is from start)
# -p = print to STDOUT, otherwise it goes to some buffer thing, somewhere?
# capture a SELECTION over multiple pages and copy it to the OS clipboard \o/
# start copy-mode
\e[38;5;208mprefix\e[0m [
# start selecting
Ctrl-Space
# copy the select and exit copy-mode
Ctrl-w
# paste to your heart's content \o/ It does not seem to copy colors, this is either a feature or a bug.
# In copy-mode you can \e[38;5;201msearch\e[0m using
Ctrl-s [type string] <enter>
# and then n or shift-n for next/previous. Ctrl-r for reverse search
# these bring up freaking menus of things to do with shortcuts!
\e[38;5;208mprefix\e[0m > # acts on pane
\e[38;5;208mprefix\e[0m < # acts on window
# enable mouse
set -g mouse on
# My default config ==========
# remap prefix from 'C-b' to 'C-a' or, like, `
unbind C-b
set-option -g prefix `
bind-key ` send-prefix
set -g mouse on
# split panes using | and S
bind | split-window -h
bind S split-window -v
unbind '"'
unbind %
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# chatgpt says to use these for truecolor and you know what it works I'm keeping it
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# ============================