140 lines
3.7 KiB
Bash
140 lines
3.7 KiB
Bash
|
|
### screen-like keybindings
|
|
unbind C-b
|
|
set -g prefix C-a
|
|
bind C-a last-window
|
|
bind a send-prefix
|
|
#bind A command-prompt "rename-window %%"
|
|
#bind Escape copy-mode
|
|
|
|
# vi-keys everywhere; anything else would be uncivilized
|
|
setw -g xterm-keys on
|
|
setw -g mode-keys vi
|
|
set -g status-keys vi
|
|
|
|
# Fix copy/pasting
|
|
set -g default-shell $SHELL
|
|
set -g default-command "zsh"
|
|
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
|
|
|
|
# mouse settings
|
|
#set -g mouse-select-pane on
|
|
#set -g mouse-select-window on
|
|
#set -g mouse-resize-pane on
|
|
|
|
# movement
|
|
bind h select-pane -L
|
|
bind k select-pane -U
|
|
bind j select-pane -D
|
|
bind l select-pane -R
|
|
#bind Tab down-pane
|
|
#bind BTab up-pane
|
|
|
|
# swapping
|
|
#bind Left swap-pane -L
|
|
bind Up swap-pane -U
|
|
bind Down swap-pane -D
|
|
#bind Right swap-pane -R
|
|
|
|
# resizing
|
|
bind -r C-h resize-pane -L
|
|
bind -r C-j resize-pane -U
|
|
bind -r C-k resize-pane -D
|
|
bind -r C-l resize-pane -R
|
|
|
|
# Reload key
|
|
bind C-r source-file ~/.tmux.conf
|
|
|
|
# Set default path
|
|
#bind R set-option default-path "$PWD" #removed in 1.9a
|
|
#bind C set-option default-path "" #removed in 1.9a
|
|
|
|
# Start window in the session root
|
|
bind r new-window
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
# Moving between windows
|
|
#bind " " next-window
|
|
#bind BSpace previous-window
|
|
#bind '"' choose-window
|
|
#bind l refresh-client
|
|
|
|
# splits
|
|
#unbind %
|
|
#unbind '"'
|
|
bind % split-window -h -c "#{pane_current_path}"
|
|
bind '"' split-window -v -c "#{pane_current_path}"
|
|
#bind | split-window -h
|
|
#bind - split-window -v
|
|
#bind = next-layout
|
|
|
|
# confirm before killing a window or server
|
|
#bind k confirm kill-window
|
|
bind \ confirm-before "kill-server"
|
|
|
|
# nice, big scrollback buffer (lines)
|
|
set -g history-limit 5000
|
|
|
|
# lock after 30 minutes of inactivity
|
|
#set-option -g lock-after-time 1800
|
|
#bind ^X lock-server
|
|
|
|
# Rather than constraining window size to the maximum size of any client
|
|
# connected to the *session*, constrain window size to the maximum size of any
|
|
# client connected to *that window*. Much more reasonable.
|
|
setw -g aggressive-resize on
|
|
|
|
### Initial windows
|
|
setenv -g SSH_AUTH_SOCK "$HOME/.gnupg/$.gpg-agent.ssh"
|
|
#new -d -n agent "ssh-agent -a $SSH_AUTH_SOCK zsh"
|
|
#neww -n netdb
|
|
#neww -n root
|
|
#neww -n root
|
|
#neww -n root
|
|
#neww -n root
|
|
#neww -n root
|
|
#neww -n mutt
|
|
#selectw -t 0
|
|
|
|
|
|
### Colors
|
|
#set -ga terminal-overrides ",screen-256color-bce:Tc"
|
|
set -g default-terminal "screen-256color-bce"
|
|
set -g status-bg "#4e4e4e"
|
|
set -g status-fg "#ffffff"
|
|
set -g window-status-format "#I:#W#F"
|
|
set -g window-status-current-format " #I:#W#F "
|
|
setw -g window-status-current-bg "#CAFE66"
|
|
setw -g window-status-current-fg "#000000"
|
|
#set -g status-bg black
|
|
#set -g status-fg white
|
|
#setw -g window-status-current-bg black
|
|
#setw -g window-status-current-fg red
|
|
#setw -g utf8 on
|
|
|
|
|
|
### Status bar
|
|
set-option -g allow-rename off
|
|
#set -g status-right "#[fg=magenta] @#H #[fg=cyan]%Y-%m-%d #[fg=yellow]%a #[fg=green]%H:%M #[fg=blue]#(uptime|awk '{split(substr($0, index($0, "load")), a, ":"); print a[2]}')#[default]"
|
|
#set -g status off
|
|
#set -g status-utf8 on
|
|
#set -g status-justify left
|
|
#set -g status-bg black
|
|
#set -g status-fg white
|
|
#set -g status-left-length 40
|
|
#set -g pane-active-border-fg red
|
|
#set -g pane-active-border-bg default
|
|
#set -g pane-border-fg red
|
|
#set -g pane-border-bg default
|
|
#set -g message-fg black
|
|
#set -g message-bg green
|
|
#setw -g mode-bg black
|
|
#setw -g window-status-bg black
|
|
#setw -g window-status-current-fg green
|
|
#setw -g window-status-alert-attr default
|
|
#setw -g window-status-alert-fg yellow
|
|
#set -g status-left "#[fg=red]#H#[fg=green]:#[fg=white]#S #[fg=green]][#[default]"
|
|
# set -g status-right "#[fg=green]][#[fg=white] #T #[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]"
|
|
#set -g status-right "#[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]"
|
|
|
|
# vim:ft=tmux
|