Last active
August 10, 2020 02:47
-
-
Save RatoX/c2d7b4bf8ba71b8326df to your computer and use it in GitHub Desktop.
My Tmux Configuration with: Dracula Theme + gcalcli integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=black,bold" | |
set-option -g status-interval 1 | |
set-option -g status-style "bg=#121212,fg=#bd93f9" | |
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 '#{?client_prefix,#{@commandMode},#{@insertMode}}' | |
set-option -g window-status-separator " β " | |
set-option -g window-status-current-format "#[fg=#ff79c6]#{E:@windowIndex}" | |
set-option -g window-status-format "#[fg=#f8f8f2]#{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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment