Blob


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