Initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
resurrect/
|
||||
@@ -0,0 +1,3 @@
|
||||
[submodule "tmuxstart"]
|
||||
path = tmuxstart
|
||||
url = ./tmuxstart/
|
||||
@@ -0,0 +1,32 @@
|
||||
Start a new session:
|
||||
tmux new-session -s {session name}
|
||||
|
||||
(prefix = <control - space>)
|
||||
|
||||
Close a pane:
|
||||
prefix - x
|
||||
|
||||
Fullscreen a pane:
|
||||
prefix - z
|
||||
|
||||
New Window:
|
||||
prefix - c
|
||||
|
||||
Rename Window:
|
||||
prefix - ,
|
||||
|
||||
Install plugins with tmux plugin manager (tpm):
|
||||
1. add plugin to tmux.conf like this:
|
||||
set -g @tpm_plugins ' \
|
||||
tmux-plugins/tpm \
|
||||
tmux-plugins/tmux-resurrect \
|
||||
'
|
||||
2. then:
|
||||
prefix - I
|
||||
|
||||
Deleting automatic session backups:
|
||||
rm -rf ~/.tmux/resurrect/*
|
||||
|
||||
Reload tmux config:
|
||||
prefix - :
|
||||
:source-file ~/.tmux.conf
|
||||
Submodule
+1
Submodule plugins/tmux-continuum added at 46e0e00234
Submodule
+1
Submodule plugins/tmux-resurrect added at 8af7aed9b3
Submodule
+1
Submodule plugins/tmux-sensible added at 3ea5b9f6b9
Submodule
+1
Submodule plugins/tpm added at 9251451554
@@ -0,0 +1,110 @@
|
||||
# ==================================
|
||||
# Solarized color settings
|
||||
# ==================================
|
||||
|
||||
# default statusbar colors
|
||||
set-option -g status-bg colour235 #base02
|
||||
set-option -g status-fg colour136 #yellow
|
||||
set-option -g status-attr default
|
||||
|
||||
# default window title colors
|
||||
set-window-option -g window-status-fg colour244 #base0
|
||||
set-window-option -g window-status-bg default
|
||||
#set-window-option -g window-status-attr dim
|
||||
|
||||
# active window title colors
|
||||
set-window-option -g window-status-current-fg colour166 #orange
|
||||
set-window-option -g window-status-current-bg default
|
||||
#set-window-option -g window-status-current-attr bright
|
||||
|
||||
# pane border
|
||||
set-option -g pane-border-fg colour235 #base02
|
||||
set-option -g pane-active-border-fg colour240 #base01
|
||||
|
||||
# message text
|
||||
set-option -g message-bg colour235 #base02
|
||||
set-option -g message-fg colour166 #orange
|
||||
|
||||
# pane number display
|
||||
set-option -g display-panes-active-colour colour33 #blue
|
||||
set-option -g display-panes-colour colour166 #orange
|
||||
|
||||
# clock
|
||||
set-window-option -g clock-mode-colour colour64 #green
|
||||
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
# ==================================
|
||||
# vim-navigation pluging settings
|
||||
# ==================================
|
||||
# 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-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
||||
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
||||
|
||||
# ==================================
|
||||
# redfining tmux commands
|
||||
# ==================================
|
||||
# Set tmux prefix to <control-space>
|
||||
unbind C-b
|
||||
set -g prefix C-Space
|
||||
bind-key C-Space send-prefix
|
||||
|
||||
# Copy to system clipboard
|
||||
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
|
||||
|
||||
# Split windows vertically with <control-space> j
|
||||
bind j split-window -v
|
||||
bind C-j split-window -v
|
||||
|
||||
# Split windows horizontaly with <control-space> l
|
||||
bind l split-window -h
|
||||
bind C-l split-window -h
|
||||
|
||||
# Bind Alt + hjkl keys to resize window
|
||||
unbind-key M-j ; bind-key -n M-j resize-pane -D 1
|
||||
unbind-key M-k ; bind-key -n M-k resize-pane -U 1
|
||||
unbind-key M-h ; bind-key -n M-h resize-pane -L 1
|
||||
unbind-key M-l ; bind-key -n M-l resize-pane -R 1
|
||||
|
||||
# Set custom save and restore tmux bindings
|
||||
set -g @resurrect-save 'S'
|
||||
set -g @resurrect-restore 'R'
|
||||
|
||||
# Kill pane without a warning
|
||||
bind-key x kill-pane
|
||||
|
||||
# Enable mouse in tmux
|
||||
set -g mode-mouse on
|
||||
set -g mouse-resize-pane on
|
||||
set -g mouse-select-pane on
|
||||
set -g mouse-select-window on
|
||||
|
||||
# ==================================
|
||||
# Ressurection settings
|
||||
# ==================================
|
||||
# Enable Vim ressurection
|
||||
set -g @resurrect-strategy-vim 'session'
|
||||
# Save session every 5 minutes
|
||||
set -g @continuum-save-interval '5'
|
||||
# Restore saved session on loading tmux
|
||||
set -g @continuum-restore 'on'
|
||||
|
||||
# ==================================
|
||||
# List of plugins
|
||||
# ==================================
|
||||
set -g @tpm_plugins ' \
|
||||
tmux-plugins/tpm \
|
||||
tmux-plugins/tmux-sensible \
|
||||
tmux-plugins/tmux-resurrect \
|
||||
tmux-plugins/tmux-continuum \
|
||||
'
|
||||
|
||||
# ==================================
|
||||
# Initializes TMUX plugin manager.
|
||||
# Keep this line at the very bottom of tmux.conf.
|
||||
run-shell '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
Submodule
+1
Submodule tmuxstart added at 91f46543ef
Reference in New Issue
Block a user