Blame


1 73d52432 2021-01-06 xhr # $Id: .tmux.conf,v 1.16 2020/12/07 11:47:20 cvs Exp $
2 92ea52d1 2015-06-09 xhr
3 8e8b4a25 2020-11-24 xhr # Do not start a login shell by default
4 8e8b4a25 2020-11-24 xhr set -g default-command "${SHELL}"
5 8e8b4a25 2020-11-24 xhr
6 05671266 2015-05-30 xhr # Set window notifications
7 8e8b4a25 2020-11-24 xhr setw -g monitor-activity off
8 05671266 2015-05-30 xhr set -g visual-activity on
9 05671266 2015-05-30 xhr
10 05671266 2015-05-30 xhr # I am using a 256 color terminal
11 08746112 2021-10-23 xhr # if this is set to tmux-256color vim will show A,C,D,E chars when pressing
12 08746112 2021-10-23 xhr # Arrow keys in insert mode inside tmux. Setting it to xterm-256 fixes it
13 08746112 2021-10-23 xhr #set -g default-terminal "tmux-256color"
14 08746112 2021-10-23 xhr set -g default-terminal "xterm-256color"
15 08746112 2021-10-23 xhr set-window-option -g xterm-keys on
16 05671266 2015-05-30 xhr
17 8e8b4a25 2020-11-24 xhr # Disable active pane border indicator
18 8e8b4a25 2020-11-24 xhr set -g pane-active-border-style bg=black,fg=white
19 8e8b4a25 2020-11-24 xhr
20 05671266 2015-05-30 xhr # Scrollback limit
21 05671266 2015-05-30 xhr set -g history-limit 10000
22 05671266 2015-05-30 xhr
23 05671266 2015-05-30 xhr # bind a reload key
24 05671266 2015-05-30 xhr bind R source-file ~/.tmux.conf \; display-message "Config reloaded.."
25 05671266 2015-05-30 xhr
26 05671266 2015-05-30 xhr # window list
27 05671266 2015-05-30 xhr setw -g automatic-rename on
28 05671266 2015-05-30 xhr
29 2989db7b 2021-09-22 xhr # Set the prefix to `
30 73d52432 2021-01-06 xhr unbind C-b
31 2989db7b 2021-09-22 xhr set -g prefix `
32 2989db7b 2021-09-22 xhr bind ` send-prefix
33 1f1c962a 2013-07-01 xhr
34 8e8b4a25 2020-11-24 xhr # screen ^C c
35 1f1c962a 2013-07-01 xhr unbind ^C
36 1f1c962a 2013-07-01 xhr bind ^C new-window
37 05671266 2015-05-30 xhr unbind c
38 1f1c962a 2013-07-01 xhr bind c new-window
39 1f1c962a 2013-07-01 xhr
40 1f1c962a 2013-07-01 xhr # detach ^D d
41 1f1c962a 2013-07-01 xhr unbind ^D
42 1f1c962a 2013-07-01 xhr bind ^D detach
43 1f1c962a 2013-07-01 xhr
44 8e8b4a25 2020-11-24 xhr # displays *
45 1f1c962a 2013-07-01 xhr unbind *
46 1f1c962a 2013-07-01 xhr bind * list-clients
47 1f1c962a 2013-07-01 xhr
48 8e8b4a25 2020-11-24 xhr # Next window with space and n
49 1f1c962a 2013-07-01 xhr unbind " "
50 1f1c962a 2013-07-01 xhr bind " " next-window
51 1f1c962a 2013-07-01 xhr unbind n
52 1f1c962a 2013-07-01 xhr bind n next-window
53 1f1c962a 2013-07-01 xhr
54 1f1c962a 2013-07-01 xhr # title A
55 1f1c962a 2013-07-01 xhr unbind A
56 1f1c962a 2013-07-01 xhr bind A command-prompt "rename-window %%"
57 1f1c962a 2013-07-01 xhr
58 2989db7b 2021-09-22 xhr # Switch windows
59 db38b50c 2021-09-23 xhr unbind ]
60 db38b50c 2021-09-23 xhr bind ] last-window
61 2989db7b 2021-09-22 xhr unbind a
62 2989db7b 2021-09-22 xhr bind a last-window
63 1f1c962a 2013-07-01 xhr
64 8e8b4a25 2020-11-24 xhr # Previous window with p
65 1f1c962a 2013-07-01 xhr unbind p
66 1f1c962a 2013-07-01 xhr bind p previous-window
67 1f1c962a 2013-07-01 xhr
68 8e8b4a25 2020-11-24 xhr # windows ^W w
69 1f1c962a 2013-07-01 xhr unbind ^W
70 1f1c962a 2013-07-01 xhr bind ^W list-windows
71 1f1c962a 2013-07-01 xhr unbind w
72 1f1c962a 2013-07-01 xhr bind w list-windows
73 1f1c962a 2013-07-01 xhr
74 8e8b4a25 2020-11-24 xhr # quit \
75 05671266 2015-05-30 xhr unbind '\'
76 05671266 2015-05-30 xhr bind '\' confirm-before "kill-server"
77 1f1c962a 2013-07-01 xhr
78 8e8b4a25 2020-11-24 xhr # kill K k
79 1f1c962a 2013-07-01 xhr unbind K
80 1f1c962a 2013-07-01 xhr bind K confirm-before "kill-window"
81 1f1c962a 2013-07-01 xhr unbind k
82 1f1c962a 2013-07-01 xhr bind k confirm-before "kill-window"
83 1f1c962a 2013-07-01 xhr
84 8e8b4a25 2020-11-24 xhr # redisplay ^L l
85 1f1c962a 2013-07-01 xhr unbind ^L
86 1f1c962a 2013-07-01 xhr bind ^L refresh-client
87 1f1c962a 2013-07-01 xhr unbind l
88 1f1c962a 2013-07-01 xhr bind l refresh-client
89 1f1c962a 2013-07-01 xhr
90 1f1c962a 2013-07-01 xhr # split -v |
91 1f1c962a 2013-07-01 xhr unbind |
92 1f1c962a 2013-07-01 xhr bind | split-window
93 1f1c962a 2013-07-01 xhr
94 8e8b4a25 2020-11-24 xhr # Split window horizontally
95 8e8b4a25 2020-11-24 xhr unbind Enter
96 8e8b4a25 2020-11-24 xhr bind Enter split-window -h
97 8e8b4a25 2020-11-24 xhr
98 1f1c962a 2013-07-01 xhr # :kB: focus up
99 1f1c962a 2013-07-01 xhr unbind Tab
100 05671266 2015-05-30 xhr bind Tab select-pane -t:.+
101 1f1c962a 2013-07-01 xhr unbind BTab
102 05671266 2015-05-30 xhr bind BTab select-pane -t:.-
103 1641efe6 2021-09-23 xhr unbind [
104 1641efe6 2021-09-23 xhr bind [ select-pane -t:.+
105 1f1c962a 2013-07-01 xhr
106 9ac301a1 2022-01-01 xhr # Toogle layouts
107 9ac301a1 2022-01-01 xhr unbind /
108 9ac301a1 2022-01-01 xhr bind / next-layout
109 1f1c962a 2013-07-01 xhr # " windowlist -b
110 1f1c962a 2013-07-01 xhr unbind '"'
111 8e8b4a25 2020-11-24 xhr #bind '"' choose-window
112 8e8b4a25 2020-11-24 xhr
113 8e8b4a25 2020-11-24 xhr # Use C-a F12 to disable outer session
114 8e8b4a25 2020-11-24 xhr # Copied from https://github.com/samoshkin/tmux-config/blob/master/tmux/tmux.conf
115 8e8b4a25 2020-11-24 xhr
116 8e8b4a25 2020-11-24 xhr bind -T off F12 \
117 8e8b4a25 2020-11-24 xhr set -u prefix \;\
118 8e8b4a25 2020-11-24 xhr set -u key-table \;\
119 8e8b4a25 2020-11-24 xhr set -u status-style \;\
120 8e8b4a25 2020-11-24 xhr set -u window-status-current-style \;\
121 8e8b4a25 2020-11-24 xhr set -u window-status-current-format \;\
122 8e8b4a25 2020-11-24 xhr refresh-client -S
123 8e8b4a25 2020-11-24 xhr
124 8e8b4a25 2020-11-24 xhr bind -T root F12 \
125 8e8b4a25 2020-11-24 xhr set prefix None \;\
126 8e8b4a25 2020-11-24 xhr set key-table off \;\
127 8e8b4a25 2020-11-24 xhr if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
128 8e8b4a25 2020-11-24 xhr refresh-client -S \;\
129 8e8b4a25 2020-11-24 xhr