Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # remap prefix from 'C-b' to 'C-a'
- unbind C-b
- set-option -g prefix C-b
- bind-key C-b send-prefix
- # Scrollback History
- set-option -g history-limit 10000
- # vi mode
- setw -g mode-keys vi
- # split panes using v and s
- bind s split-window -h
- bind v split-window -v
- unbind '"'
- unbind %
- # Setup 'v' to begin selection as in Vim
- bind-key -T copy-mode-vi v send -X begin-selection
- #bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
- bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
- # Update default binding of `Enter` to also use copy-pipe
- unbind -T copy-mode-vi Enter
- bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
- # reload config file (change file location to your the tmux.conf you want to use)
- bind r source-file ~/.tmux.conf
- # switch panes using Alt-arrow without prefix
- bind -n M-Left select-pane -L
- bind -n M-Right select-pane -R
- bind -n M-Up select-pane -U
- bind -n M-Down select-pane -D
- # Enable mouse mode (tmux 2.1 and above)
- set -g mouse on
- # don't rename windows automatically
- set-option -g allow-rename off
- ######################
- ###### SESSIONS ######
- ######################
- # Alt-t: New session
- bind -n M-t command-prompt "new-session -s '%%'"
- # Alt-p: Choose session. Use fzf
- bind -n M-p new-window 'session=$(tmux list-sessions -F "#{session_name}" | fzf --query="$1" --select-1 --exit-0) && tmux switch-client -t "$session"'
- # Alt-n: New window
- bind -n M-n new-window -c "#{pane_current_path}"
- # Alt-h: Previous window
- bind -n M-h prev
- bind -n M-H prev
- # Alt-l: Next window
- bind -n M-l next
- bind -n M-L next
- # Alt-r: Rename window
- bind -n M-r command-prompt -I "#W" "rename-window '%%'"
- # window movement / renumbering like in screen's :number
- bind-key m command-prompt -p "move window to:" "swap-window -t '%%'"
- ######################
- ### DESIGN CHANGES ###
- ######################
- set -g default-terminal "screen-256color"
- set-option -g status-position bottom
- bind-key -n S-Up set-option -g status
- bind-key -n S-Down set-option -g status
- set-window-option -g window-status-current-style fg=red
- set-option -g status-fg white
- set-option -g status-bg default
- set -g status-left " "
- set -g status-justify left
- setw -g window-status-format ' #(echo "#W") '
- setw -g window-status-current-format ' #(echo "#W") '
- set -g status-right "#[fg=blue]HTB #[fg=yellow]:: #[fg=green]#(ifconfig tun0 | grep 'inet ' | tr -s ' ' | cut -d\" \" -f3)"
- # border colours
- set -g pane-border-style fg=magenta
- set -g pane-active-border-style "bg=default fg=magenta"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement