Skip to content

Instantly share code, notes, and snippets.

@apjyotirmay
Created September 9, 2024 15:46
Show Gist options
  • Save apjyotirmay/a50de5e6cdbc70f61f5c969910d7013a to your computer and use it in GitHub Desktop.
Save apjyotirmay/a50de5e6cdbc70f61f5c969910d7013a to your computer and use it in GitHub Desktop.
My tmux configuration
# set hitory limit
set -g history-limit 1000
# (r) Reload source file
bind-key r source-file ~/.tmux.conf
# clear console history
bind -n C-k send-keys -R \; clear-history
# use 256 term for pretty colors
set -g default-terminal "screen-256color"
set -g default-shell /usr/bin/zsh
# change key-binding
# unbind-key C-b
# set -g prefix 'C-s'
# bind-key 'C-s' send-prefix
# clear scrollback history
bind -n C-k clear-history
# create new instances in current directory
bind 'c' new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind '%' split-window -h -c "#{pane_current_path}"
# use alt-vim keys to switch panes
#bind -n M-h select-pane -L \; display-pane
#bind -n M-j select-pane -D \; display-pane
#bind -n M-k select-pane -U \; display-pane
#bind -n M-l select-pane -R \; display-pane
# use alt-arrow-keys to swith panes
bind -n M-Left select-pane -L \; display-pane
bind -n M-Right select-pane -R \; display-pane
bind -n M-Up select-pane -U \; display-pane
bind -n M-Down select-pane -D \; display-pane
# shift-arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# no delay for escape key press
set -sg escape-time 0
# Theme
#set -g status-bg "#600000"
#set -g status-fg white
set -g status-interval 60
set -g status-left-length 30
set -g status-left ''
set -g status-right '%H:%M'
set -g display-panes-colour "#4D4D4D"
set -g display-panes-active-colour "#00ff00"
# to copy content from tmux to system clipboard
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i --clipboard"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment