Skip to content

Instantly share code, notes, and snippets.

@vdt
Forked from noam-g4/.tmux.conf
Created April 14, 2022 09:40
Show Gist options
  • Select an option

  • Save vdt/0dd2d5d60dc6bbd67c8db4eb6ee6daeb to your computer and use it in GitHub Desktop.

Select an option

Save vdt/0dd2d5d60dc6bbd67c8db4eb6ee6daeb to your computer and use it in GitHub Desktop.
source "/usr/share/powerline/bindings/tmux/powerline.conf"
unbind C-b
set-option -g prefix C-]
set -g default-terminal "screen-256color"
set -g base-index 1
setw -g pane-base-index 1
# enable activity alerts
setw -g monitor-activity on
set -g visual-activity on
# set the status line's colors
set -g status-fg black
set -g status-bg colour74
# set the color of the window list
setw -g window-status-fg black
setw -g window-status-bg default
setw -g window-status-attr dim
# set colors for the active window
setw -g window-status-current-fg black
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
setw -g window-status-current-style fg=black,bg=colour170
# pane
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
# Command / message line
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# Status line left side
set -g status-utf8 on
# Status line right side
# 15% | 28 Nov 18:15
set -g status-right "| #[fg=black]%d %b %R"
set -g status-left ""
# Update the status bar every sixty seconds
set -g status-interval 60
# Center the window list
set -g status-justify start
# Open panes in the same directory using the tmux-panes script
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
set editing-mode vi
#unbind v
#unbind n
#bind v send-keys " ~/tmux-panes -h" C-m
#bind n send-keys " ~/tmux-panes -v" C-m
# Maximize and restore a pane
#unbind Up
#bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
#unbind Down
#bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
#
# Log output to a text file on demand
#bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
set -g history-limit 10000
set-option -g status-position top
#new-window
new-session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment