Skip to content

Instantly share code, notes, and snippets.

@maxcan
Created June 20, 2023 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxcan/d5002ccaf2d1b1e14bd51c6f4b054631 to your computer and use it in GitHub Desktop.
Save maxcan/d5002ccaf2d1b1e14bd51c6f4b054631 to your computer and use it in GitHub Desktop.
set -sg escape-time 0
set -g prefix C-a
setw -g aggressive-resize on
# bind-key C-a last-window
# Set status bar
# set -g remain-on-exit on
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
set-option -w -g window-status-current-bg red
set-option -w -g window-status-current-style bg=red
set -g status-justify centre
set -g status-right '#[fg=green]#(date)#[fg=yellow]#(uptime | cut -d "," -f 2-)'
set -g status-interval 1
# tabbin
bind -n S-right next
bind -n S-left prev
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
setw -g automatic-rename on
set -g default-terminal "screen-256color"
# set-option -g default-shell /usr/local/bin/zsh
set-option -g default-shell $SHELL
# set-option -g default-shell /usr/local/bin/fish
# set-option -g default-command "reattach-to-user-namespace -l zsh"
# Just click it
# set-option -g default-shell /usr/bin/zsh # usr local bin zsh on osx
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g mouse
bind k resize-pane -U 15
bind j resize-pane -D 15
bind h resize-pane -L 25
bind l resize-pane -R 25
bind C-Up resize-pane -U 15
bind C-Down resize-pane -D 15
bind C-e resize-pane -L 25
bind C-r resize-pane -R 25
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# bind-key -t vi-copy 'y' copy-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel pbcopy
bind-key -T copy-mode-vi v send-keys -X begin-selection
# bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel pbcopy \; display-message "highlighted selection copied to system clipboard"
bind C-q swap-window -t -1
bind C-w swap-window -t +1
bind C-space select-layout even-horizontal
#
# # Scroll your way into copy mode (scrollback buffer)
# # and select text for copying with the mouse
# unbind
# bind-key C-a select-pane -t :.+
bind-key C-a last-pane
set -g history-limit 10000
# Toggle mouse on with ^B m
bind m \
set -g mouse on\;\
display 'Mouse: ON'
# Toggle mouse off with ^B M
bind M \
set -g mouse \;\
display 'Mouse: toggled'
# List of plugins
# Supports `github_username/repo` or full git URLs
# set -g @tpm_plugins " \
# tmux-plugins/tpm \
# tmux-plugins/tmux-resurrect \
# "
# # Other examples:
# # github_username/plugin_name \
# # tmux-plugins/tmux-sensible \
# # git@github.com/user/plugin \
# # git@bitbucket.com/user/plugin \
#
# # initializes TMUX plugin manager
# run-shell ~/.tmux/plugins/tpm/tpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment