-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
104 lines (84 loc) · 4.31 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
#bind r source-file ~/.tmux.conf \; display "Reloaded!" # Reload with ctrl-r
set -g prefix C-a # prefix from ctrl-b to ctrl-a
unbind C-b # allow ctrl-b for other things
set -sg escape-time 1 # quicker responses
bind C-a send-prefix # Pass on ctrl-a for other apps
set -g base-index 1 # Numbering of windows
setw -g pane-base-index 1 # Numbering of Panes
bind \ split-window -h # Split panes horizontal
bind - split-window -v # Split panes vertically
bind G run "tmux send-keys -t 1.right C-c 'killall gulp' C-m 'killall node' C-m 'gulp' C-m"
bind g run "tmux send-keys -t 1.right C-c 'gulp' C-m"
bind D run "tmux send-keys -t 1.right C-c 'gulp deploy' C-m"
bind f run "tmux send-keys -t 1.right C-c 'gulp fire' C-m"
bind P run "tmux send-keys -t 1.right C-c 'git push origin' C-m"
#Resizing motion keys
bind l resize-pane -R # Moves pane right
bind h resize-pane -L # Moves pane right
bind L resize-pane -R 20 # Moves pane right
bind H resize-pane -L 20 # Moves pane right
# Use vim keybindings in copy mode
setw -g mode-keys vi
setw -g mode-mouse on
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
set-option -g status on
set-option -g status-interval 1
# set-option -g status-utf8 on
set-option -g status-justify "left"
# monitor activity in windows
setw -g monitor-activity on
set -g visual-activity on
# coloring and themes
set-option -g message-fg white
set-option -g message-bg red
setw -g window-status-current-bg white
setw -g window-status-current-fg black
set -g status-bg colour240
set-option -g status-bg colour234
set-option -g status-fg white
set-window-option -g window-status-activity-attr bold
set-window-option -g window-status-activity-bg magenta
set-window-option -g window-status-activity-fg white
# set-window-option -g window-status-content-attr bold
# set-window-option -g window-status-content-bg magenta
# set-window-option -g window-status-content-fg white
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#Custom powerline
# if-shell "test -f ~/dotfiles/tmuxline" "source ~/dotfiles/tmuxline"
# if-shell "echo 'hello'" "echo 'goodbye'"
# source ~/dotfiles/tmuxline
set -g status-justify "left"
set -g status "on"
# set -g status-utf8 "on"
set -g status-right-length "100"
set -g status-left-length "100"
setw -g window-status-activity-attr "none"
setw -g window-status-separator ""
set -g status-left "#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour234,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=colour236,bg=colour234,nobold,nounderscore,noitalics]#[fg=colour247,bg=colour236] %Y-%m-%d %H:%M #[fg=colour252,bg=colour236,nobold,nounderscore,noitalics]#[fg=colour235,bg=colour252] #h "
setw -g window-status-format "#[fg=colour244,bg=colour234] #I #[fg=colour250,bg=colour234] #W "
setw -g window-status-current-format "#[fg=colour234,bg=colour31,nobold,nounderscore,noitalics]#[fg=colour117,bg=colour31] #I #[fg=colour231,bg=colour31,bold] #W #[fg=colour31,bg=colour234,nobold,nounderscore,noitalics]"
# # Setup 'v' to begin selection as in Vim
# bind-key -t vi-copy v begin-selection
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# # Update default binding of `Enter` to also use copy-pipe
# unbind -t vi-copy Enter
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
set -g default-terminal "screen-256color"
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Bind ']' to use pbpaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
bind r respawn-pane -k
# # Stupid Sierra workaround
set -g default-shell $SHELL
set -g default-command "reattach-to-user-namespace -l ${SHELL}"