Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Remap C-b to C-a
- unbind C-b
- set-option -g prefix C-a
- bind-key C-a send-prefix
- # split panes using | for vertical and - for horizontal
- bind | split-window -h
- bind - split-window -v
- unbind '"'
- unbind %
- # don't rename windows automatically
- set-option -g allow-rename off
- # Enable mouse scrolling
- set -g mouse on
- # macOS only - Allow copying/pasting from clipboard
- # Resource: https://unix.stackexchange.com/questions/318281/how-to-copy-and-paste-with-a-mouse-with-tmux
- set -g mouse on
- bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
- bind -n WheelDownPane select-pane -t= \; send-keys -M
- bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
- bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
- bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
- bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
- bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
- # To copy, left click and drag to highlight text in yellow,
- # once you release left click yellow text will disappear and will automatically be available in clibboard
- # # Use vim keybindings in copy mode
- setw -g mode-keys vi
- # Update default binding of `Enter` to also use copy-pipe
- unbind -T copy-mode-vi Enter
- bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
- bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
- # List of plugins
- set -g @plugin 'tmux-plugins/tpm'
- set -g @plugin 'tmux-plugins/tmux-sensible'
- set -g @plugin 'dracula/tmux'
- set -g @dracula-show-powerline true
- set -g @dracula-show-left-icon smiley
- set -g @dracula-show-fahrenheit false
- set -g @dracula-border-contrast true
- set -g @dracula-plugins "git battery time cpu-usage"
- set -g default-terminal screen-256color
- # Other examples:
- # set -g @plugin 'github_username/plugin_name'
- # set -g @plugin 'github_username/plugin_name#branch'
- # set -g @plugin 'git@github.com:user/plugin'
- # set -g @plugin 'git@bitbucket.com:user/plugin'
- # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
- run '~/.tmux/plugins/tpm/tpm'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement