-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
59 lines (44 loc) · 2.02 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
# Remap prefix to Ctrl-q
unbind C-b
set -g prefix C-q
# Clipboard
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Colors
set -g default-terminal "screen-256color"
set-option -sa terminal-overrides ",xterm*:Tc"
# Movement
## resize panes with the mouse
set -g mouse on
## double-prefix to jump back and forth
bind-key C-q last-window
## move like in vim
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
setw -g mode-keys vi
set -g status-keys vi
bind-key -T edit-mode-vi Up send-keys -X history-up
bind-key -T edit-mode-vi Down send-keys -X history-down
# Split panes more logically
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Status bar
set -g base-index 1
set -g status-left "(#S) "
set -g status-left-length 50
set -g status-right-length 80
set -g status-right "Have a great day! #(date -u '+%%H:%%M') UTC :: %h%d #(date '+%%l:%%M')"
setw -g window-status-format "#I:#W"
setw -g window-status-current-format "|#I:#W|"
set-window-option -g window-status-separator " "
# Force a reload of the config file
unbind r
bind r source-file ~/.config/tmux/tmux.conf
# Theme, triggered using bin/theme.sh dark|light
# source-file ~/dotfiles/tmux/dark.tmux
# source-file ~/dotfiles/tmux/light.tmux