-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.tmux.conf
54 lines (41 loc) · 2 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
set -g mouse on
set -g base-index 1
setw -g pane-base-index 1
# Colors
set -g default-terminal "screen-256color"
#set -g status-bg "colour172"
#set -g status-fg white
set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1
# Show directory names instead
set-option -g status-interval 5
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
set -g status-interval 60
WEATHER='#(curl -s wttr.in/\?format\="3&period=60")'
set -g status-right $WEATHER
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind c new-window -c "#{pane_current_path}"
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
# To copy, left click and drag to highlight text in yellow,
# once you release left click yellow text will disappear and will automatically be available in clibboard
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
#bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
#bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# use <prefix> s for horizontal split
bind s split-window -v -c "#{pane_current_path}"
# use <prefix> v for vertical split
bind v split-window -h -c "#{pane_current_path}"