-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
113 lines (87 loc) · 2.94 KB
/
.tmux.conf
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Set an awesome prefix
unbind C-b
set-option -g prefix C-n
bind C-n send-prefix
# Some general settings
set -g status-keys vi
set -g history-limit 10000
setw -g mode-keys vi
setw -g mouse on
setw -g monitor-activity on
# Forward events to applications inside tmux
set-option -g focus-events on
# Add zoom shortcut
bind -n C-z resize-pane -Z
# Add query panes shortcut
bind -n C-q display-panes
# Start numbering at 1
set -g base-index 1
set -g pane-base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
# Color management
set -g default-terminal tmux-256color
set -ga terminal-overrides ",*256col*:Tc":
# Use bash as default shell
set-option -g default-shell /bin/bash
# Disable window status
set-option -g window-status-current-format ' #I:#W#F '
set-option -g window-status-format ' #I:#W#F '
# Set redraw interval for status bar
set -g status-interval 30
# Some hotkeys for splitting windows and creating new ones
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Resize panes
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
# Use Alt-vim keys without prefix key to switch panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Go to last window
bind -n C-p last-window
# We also want to switch windows with Ctrl
bind -n C-h previous-window
bind -n C-l next-window
bind -T copy-mode-vi C-h previous-window
bind -T copy-mode-vi C-l next-window
# Move window to left/right
bind -n C-Left swap-window -t -1\; select-window -t -1
bind -n C-Right swap-window -t +1\; select-window -t +1
# Some improvements for copy mode
unbind p
bind p paste-buffer
unbind -T copy-mode-vi v
bind u copy-mode
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'C-v' send -X rectangle-toggle
bind -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# No delay for escape key press
set -sg escape-time 0
# Set display pane time
set -g display-panes-time 3000
# Reload tmux config
bind r source-file ~/.tmux.conf
# Enable to copy selection to clipboard by just marking stuff with mouse
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i"
# Change colors
set -g status-bg '#f92672'
set -g status-fg black
set -g pane-active-border-style bg=default,fg='#f92672'
set -g pane-border-style fg=default
set -g mode-style bg='#f92672',fg=black
# Set active window to different background
set-window-option -g window-status-current-style bg='#fc92b9'
# Configure status bar
set -g status-left ""
set-option -g status-right-length 180
set -g status-right '#(~/.gasprice.sh) Gwei '
set -ag status-right '#(whoami)@'
set -ag status-right '#(hostnamectl hostname) '
set-option -ag status-right "#[fg=black,bg=default]%a %H:%M #[fg=black]%d-%m-%Y "