Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
147 lines (108 sloc) 3.25 KB
# Iteration helper
bind R source ~/.tmux.conf
# Set prefix to o from b
unbind-key 'C-\'
set -g prefix 'C-\'
bind-key 'C-\' send-prefix
set -g history-limit 50000
set -g assume-paste-time 0
set -s escape-time 0
bind-key N new-session
# ===============
# Paste buffer
# ===============
setw -g mode-keys vi
unbind [
bind g copy-mode
bind Q display-panes
unbind p
bind p paste-buffer
bind P choose-buffer
# tmux version < 2.4
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# bind-key -t vi-copy 'C-v' rectangle-toggle
# tmux version >= 2.4
bind-key -Tcopy-mode-vi v send -X begin-selection
bind-key -Tcopy-mode-vi y send -X copy-selection
bind-key -Tcopy-mode-vi C-v send -X rectangle-toggle
bind j run "~/.tmux/copy.sh"
# ===============
# Pane and layout
# ===============
# Zoom the current pane
unbind x
bind x resize-pane -Z
bind | split-window -h -c "#{pane_current_path}"
bind _ split-window -c "#{pane_current_path}"
bind C-l resize-pane -R 10
bind C-k resize-pane -U 10
bind C-j resize-pane -D 10
bind C-h resize-pane -L 10
bind * resize-pane -x 80
bind ) swap-pane -D
bind ( swap-pane -U
bind = setw synchronize-panes
bind-key @ select-layout even-horizontal
bind-key ! select-layout even-vertical
bind l select-layout -n
bind L select-layout -p
unbind [
unbind k
bind [ select-pane -t :.-
bind k select-pane -t :.-
unbind ]
unbind j
bind ] select-pane -t :.+
bind j select-pane -t :.+
unbind t
bind t new-window -c "#{pane_current_path}"
# ===============
# Window
# ===============
unbind {
unbind K
bind { previous-window
bind K previous-window
unbind }
unbind J
bind } next-window
bind J next-window
bind w kill-window
setw -g automatic-rename on
bind c neww -c "#{pane_current_path}"
set -g renumber-windows on
bind > setw automatic-rename
# Pane coloring
set -g pane-border-style fg=brightblack
set -g pane-active-border-style fg=4
# ===============
# Status bar
# ===============
set -g status-bg default
set -g status-fg white
set -g window-status-current-fg black
set -g window-status-current-bg blue
set -g window-status-bg brightblack
set -g window-status-fg black
set -g window-status-bell-style bg=magenta
set -g window-status-format '#{?window_activity_flag,#[fg=red]#[bg=black],}#{?window_zoomed_flag,<, }#I#{?window_zoomed_flag,>, }#[bg=colour236]#[fg=colour248] #W '
set -g window-status-current-format '#[bg=white]#{?window_zoomed_flag,<, }#I#{?window_zoomed_flag,>, }#{?pane_synchronized,#[bg=green],#[default]} #W '
# Set window notifications
set -g monitor-activity on
#set -g visual-activity on
#set -g window-status-activity-style bg=yellow,fg=black
set -g status-left "#{?client_prefix,#[fg=green],}#h (#S) "
set -g status-right "#(~/.tmux/music.sh itunes spotify)| #(date -u +'%%H:%%M UTC') | #[fg=green]%H:%M#[default] | %A %d-%b-%y | #(~/.tmux/battery.sh)"
set -g status-right-length 1000
set -g status-left-length 1000
set -g status-interval 1
set -g base-index 1
# ===============
# Nice utilities
# ===============
bind-key M command-prompt -p "Manpage:" "neww 'MANWIDTH=80 man %%'"
bind-key m command-prompt -p "Manpage:" "split-window -h 'MANWIDTH=80 man %%'"
bind-key o command-prompt "saveb $HOME/paste/%%"
bind-key O command-prompt "saveb -a $HOME/paste/%%"
#bind-key l command-prompt "loadb $HOME/paste/%%"
You can’t perform that action at this time.