-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
103 lines (87 loc) · 3.25 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
# vim: ft=tmux foldmethod=marker :
# KeyBindings {{{
## Use Ctrl-a for prefix key
unbind C-b
set -g prefix C-a
bind C-a send-prefix
## Open new window should open in current path
unbind c
bind-key c new-window -c '#{pane_current_path}'
bind-key a send-prefix # for nested tmux sessions
bind-key C-b set-option -g status
bind-key r source-file ~/.tmux.conf
## new split in current pane (horizontal / vertical)
bind-key - split-window -v -c '#{pane_current_path}' # split pane horizontally
bind-key \\ split-window -h -c '#{pane_current_path}' # split pane vertically
## list panes
bind-key Space list-panes
## break-pane
bind-key Enter break-pane
## Navigation
### use the vim motion keys to move between panes
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
## Resizing
bind-key C-h resize-pane -L
bind-key C-j resize-pane -D
bind-key C-k resize-pane -U
bind-key C-l resize-pane -R
# }}}
# Window Options {{{
## Use vim keybindings in copy mode
set-window-option -g mode-keys vi
## basic settings
set-window-option -g default-shell /opt/homebrew/bin/fish
#set-window-option -g default-shell /bin/bash
set-window-option -g xterm-keys on # for vim
set-window-option -g mode-keys vi # vi key
set-window-option -g monitor-activity on
# set-window-option -g window-status-current-fg white
# set-window-option -g window-status-current-attr reverse
# set-window-option -g window-status-current-bg red
# set-window-option -g window-status-current-fg colour152
set-window-option -g window-status-format '#F#I:#W#F'
set-window-option -g window-status-current-format "#[fg=yellow,bg=black]#[fg=black,bg=yellow]#F#I:#W#F#[fg=yellow,bg=black]#[default]"
set -s escape-time 0
bind C-j previous-window
bind C-k next-window
bind-key C-a last-window # C-a C-a for last active window
bind A command-prompt "rename-window %%"
set -g mouse on
## Automatically set window title
set-window-option -g automatic-rename
# }}}
# General Options {{{
set-option -g focus-events on
set-option -g history-limit 10000
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Reload ssh vars on login
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
# colors
#set-window-option -g mode-bg colour238
set-option -g default-terminal "screen-256color" #"xterm-256color" # "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
#set-option -g pane-active-border-fg green
# vi movement keys
set-option -g status-keys vi
set-option -g status-justify right
set-option -g status-bg "#1E1F29"
set-option -g status-fg colour152
set-option -g status-interval 5
set-option -g status-left-length 40
set-option -g status-left '#[fg=black,bg=yellow] #[fbold]#T#[fg=yellow,bg=colour21]#[fg=green,bg=colour21]#S#[fg=colour21,bg=colour238]#[fg=colour41,bg=colour238]#(whoami) #[fg=colour238,bg=black,nobold]#[default]'
set-option -g status-right '#[fg=blue,bold]###S #[fg=magenta]%R %Y-%m-%d#[default]'
set-option -g visual-activity on
# set-option -sg escape-time 0
# Titles (window number, program name, active (or not)
set-option -g set-titles on
set-option -g set-titles-string '#H:#S.#I.#P #W #T'
# }}}
# Unbindings {{{
unbind j
unbind C-b # unbind default leader key
unbind '"' # unbind horizontal split
unbind % # unbind vertical split
# }}}