Skip to content

Commit b453ac1

Browse files
committed
tmux config updates
1 parent dbd07f2 commit b453ac1

File tree

2 files changed

+32
-33
lines changed

2 files changed

+32
-33
lines changed

‎.tmux.conf‎

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set-option -g mouse on
1818
bind s choose-tree -sZ -O name
1919

2020
# act like vim
21-
set-window-option -g mode-keys vi
21+
set -w -g mode-keys vi
2222
bind h select-pane -L
2323
bind j select-pane -D
2424
bind k select-pane -U
@@ -34,8 +34,8 @@ set-option -g prefix C-a
3434
bind C-a send-prefix
3535

3636
# look good
37-
#set-option -g default-terminal "screen-256color"
38-
set-option -g default-terminal "tmux-256color"
37+
set-option -g default-terminal "screen-256color"
38+
#set-option -g default-terminal "tmux-256color"
3939
set-option -a terminal-overrides ",*256col*:RGB"
4040

4141
set-option -g history-limit 5000
@@ -48,7 +48,7 @@ bind-key _ split-window -v -c "#{pane_current_path}"
4848
bind-key \\ split-window -h -c "#{pane_current_path}"
4949

5050
# # Set window notifications
51-
set-window-option -g monitor-activity on
51+
set-option -w -g monitor-activity on
5252
set-option -g visual-activity on
5353

5454
# panes
@@ -62,7 +62,7 @@ bind-key -r L resize-pane -R 5
6262
# Borders on panes
6363
set-option -g pane-border-style fg=green,bg=black
6464
set-option -g pane-border-lines single
65-
set-option -g pane-border-status top
65+
# set-option -g pane-border-status top
6666
set-option -g pane-border-indicators off
6767

6868
# active pane border
@@ -85,17 +85,18 @@ set-option -g window-status-style fg=cyan,dim,bg=default
8585
set-option -g window-status-current-style fg=white,nodim,bold,bg=red
8686

8787
# # command/message line colors
88-
set-option -g message-style fg=white,bg=black,bold
88+
set-option -g message-style fg=white,bg=color242,bold
8989

9090
# # Refresh the status bar every 30 seconds.
9191
set-option -g status-interval 30
9292

9393
# # The status bar itself.
9494
set-option -g status-justify centre
9595
set-option -g status-left-length 40
96-
set-option -g status-left "#[fg=#009900]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
97-
# set -g status-right "#[fg=blue]#(~/bin/battery Discharging) |"
98-
set-option -g status-right "#[fg=blue]#(~/bin/battery Discharging) | #[fg=cyan]%d %b %R"
96+
set-option -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
97+
# set -g status-right "#[fg=blue]#(~/bin/battery) |"
98+
set-option -g status-right \
99+
"#[fg=purple]#(~/bin/battery) | #[fg=cyan]%d %b %R"
99100

100101
set-option -g display-time 1000
101102

@@ -138,16 +139,33 @@ bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
138139
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
139140
bind-key -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
140141

141-
bind-key R run "(tmux split-window -v irb)"
142+
bind-key R run "(tmux split-window -v node)"
143+
144+
# set-hook -g after-new-window "send-keys ls Enter"
145+
146+
# set-hook -g after-split-window "display-message 'changing layout'; selectl even-vertical"
147+
148+
# set-hook -g after-new-window \
149+
"split-window; select-layout tiled"
150+
151+
# set-hook -g after-new-window[0] "send-keys ls Enter"
152+
# set-hook -g after-new-window[1] "split-window"
153+
# set-hook -g after-new-window[2] "select-layout tiled"
154+
# set-hook -g after-new-window[3] "select-pane -U"
155+
# set-hook -g after-new-window[4] "send-keys uname Enter"
156+
142157

143158
# popup menu
144159
bind-key e \
145-
display-menu -T "#" -x 0 -y 0 \
160+
display-menu -T "Quick Menu" -x C -y C \
146161
"New Window" n "new-window" \
147162
"Horizontal Split" - "split-window" \
148163
"Vertical Split" | "split-window -h" \
149164
"Close Pane" x "kill-pane"
150165

166+
bind-key O display-popup -d "~/" -x C -y 30 -w 50% -h 50% \
167+
-e "POPUP=true" -E "bash"
168+
151169

152170
# hostname
153171
# ls -alh

‎.tmux.osx.clipboard‎

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,9 @@
11
# OSX Clipboard support
22

3-
# set-option -g default-command "reattach-to-user-namespace -l /bin/bash"
3+
bind C-c run-shell "tmux save-buffer - | pbcopy"
4+
bind C-v run-shell "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer"
45

5-
6-
# bind C-v run \
7-
# "tmux set-buffer \"$(reattach-to-user-namespace pbpaste)\"; tmux paste-buffer"
8-
9-
bind C-c run "tmux save-buffer - | pbcopy"
10-
bind C-v run "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer"
11-
12-
# tmux 2.3 - press y in copy mode to copy selection to clipboard
13-
# bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
14-
15-
# tmux 2.3 - press enter in copy mode to send to clipboard
16-
# unbind -t vi-copy Enter
17-
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
18-
#
19-
# tmux 2.4
20-
# bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
21-
# unbind -T copy-mode-vi Enter
22-
# bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
23-
24-
# tmux 2.6
25-
unbind -T copy-mode-vi Enter
266
bind-key -T copy-mode-vi v send -X begin-selection
277
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
8+
unbind-key -T copy-mode-vi Enter
289
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"

0 commit comments

Comments
 (0)