-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
114 lines (86 loc) · 3.73 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
105
106
107
108
109
110
111
112
113
114
set-option -g default-terminal screen-256color
set-option -g bell-action any
set-option -g history-limit 500000
set-option -g base-index 1
set-option -g xterm-keys on
set-option -s escape-time 10
set-window-option -g monitor-activity on
set-window-option -g pane-base-index 1
# Mapeamento de teclas
bind-key ^D detach-client
bind-key ^C new-window
bind R refresh-client
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config.'
set-option -g status-keys emacs
setw -g mode-keys vi
bind-key ^N next-window
bind-key ^P previous-window
bind-key Space switch-client -l
bind -n "^\\" last-window
###########################################################################
# Pane management / navigation
# Horizontal splits with s or ^S
unbind s
unbind ^S
bind-key s split-window -c "#{pane_current_path}"
bind-key ^S split-window -c "#{pane_current_path}"
# Vertical split with v or ^V
unbind v
unbind ^V
bind-key v split-window -h -c "#{pane_current_path}"
bind-key ^V split-window -h -c "#{pane_current_path}"
# easily toggle synchronization (mnemonic: e is for echo)
# sends input to all panes in a given window.
bind e setw synchronize-panes on
bind E setw synchronize-panes off
###########################################################################
# Scrollback / pastebuffer
set-option -g default-shell "/usr/local/bin/bash"
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Copy-paste integration
set-option -g default-command "reattach-to-user-namespace -l bash"
set-option -g default-terminal "screen-256color"
setw -g clock-mode-colour colour135
# Styles
set-option -g message-style "bg=#bd93f9,fg=#f8f8f2"
set-option -g status-interval 1
set-option -g status-style "bg=#121212,fg=#f8f8f2,bold"
set-option -g @commandMode ' 👽 '
set-option -g @insertMode ' 🚀 '
set-option -g @statusLineBackground '#[bg=#f8f8f2]'
set-option -g @windowIndex '#I #W'
set-option -g status-left '#[fg=f8f8f2]#{?client_prefix,#{@commandMode},#{@insertMode}}#[fg=#bd93f9] ║ '
set-option -g window-status-separator "#[fg=#bd93f9] ║ "
set-option -g window-status-current-format "#[fg=#ff79c6]#{E:@windowIndex}"
set-option -g window-status-format "#[fg=#b2b2b2]#{E:@windowIndex}"
set-option -g window-style "fg=#b2b2b2,bg=#121212"
set-option -g window-active-style "fg=#f8f8f2,bg=black"
set-option -g display-panes-colour "#8be9fd"
set-option -g display-panes-active-colour "#ff79c6"
set-option -g pane-active-border-style "fg=#ff79c6,bg=black"
set-option -g pane-border-style "fg=#6272a4,bg=#121212"
set-option -g pane-border-status bottom
set-option -g pane-border-format "#[fg=#f8f8f2]#{?pane_synchronized, 🧲 ,}#{?window_zoomed_flag, 🔎 ,}"
now="%d/%m %H:%M:%S"
next_event="#(gcalcli agenda --military --nostarted --nocolor --tsv | head -1 | tr '\\t' _)"
date_next_event="#(echo '$next_event' | cut -d _ -f 1,2 | xargs date -j -f %%Y-%%m-%%d_%%H:%%M '+%%a %%H:%%M')"
title_next_event="#(echo '$next_event' | cut -d _ -f 5)"
separator=" ░░░░ "
next_event_formatted="$date_next_event$separator$title_next_event"
set-option -g status-right "#[fg=#f8f8f2,bold]📅 $next_event_formatted 🕰️ #[fg=#f8f8f2]$now"
set-option -g status-right-length 120
# List of plugins
set-option -g @plugin 'tmux-plugins/tpm'
set-option -g @plugin 'Morantron/tmux-fingers'
set-option -g @plugin 'tmux-plugins/tmux-yank'
set-option -g @plugin 'jbnicolai/tmux-fpp'
run '~/.tmux/plugins/tpm/tpm'
set-option -s escape-time 10