Skip to content

Instantly share code, notes, and snippets.

@tosin2013
Forked from paulodeleo/.tmux.conf
Last active August 22, 2019 19:20
Show Gist options
  • Save tosin2013/6274b9f93bcd89da8a91abc8eccb5980 to your computer and use it in GitHub Desktop.
Save tosin2013/6274b9f93bcd89da8a91abc8eccb5980 to your computer and use it in GitHub Desktop.
Tmux configuration to enable mouse scroll and mouse panel select, taken from: http://brainscraps.wikia.com/wiki/Extreme_Multitasking_with_tmux_and_PuTTY
# Make mouse useful in copy mode
setw -g mode-mouse on
# Allow mouse to select which pane to use
set -g mouse-select-pane on
# Allow mouse dragging to resize panes
set -g mouse-resize-pane on
# Allow mouse to select windows
set -g mouse-select-window on
# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right
# (commented out because it disables cursor navigation in vim)
#set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# Scroll History
set -g history-limit 30000
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
#-------------------------------------------------------#
# STATUS LINE/TOOLBAR AT BOTTOM OF SCREEN
#-------------------------------------------------------#
# Set background of status line to black
#-------------------------------------------------------#
set -g status-bg black
#Colours for messages
#-------------------------------------------------------#
# enable activity alerts
setw -g monitor-activity on
set -g visual-activity on
#Show reloaded message in bright white
set -g message-fg white
set -g message-bg default
set -g message-attr bright
#-------------------------------------------------------#
# Status line left side
#-------------------------------------------------------#
# Session: 0 1 1 settings
set -g status-left-length 40
set -g status-left "#[fg=colour245]Session: #S #[fg=colour84]#I #[fg=colour75]#P"
#-------------------------------------------------------#
#Window/pane type in centre
#-------------------------------------------------------#
#move bash* to centre
set -g status-justify centre
# set the color of the window list (name of the pane)
setw -g window-status-fg colour75
setw -g window-status-bg default
setw -g window-status-attr dim
#-------------------------------------------------------#
#Time and date on right-hand side
#-------------------------------------------------------#
# Status line right side
# e.g. 28 Nov 18:15
set -g status-right "#[fg=colour245]%d %b #[fg=colour256] %R"
# Update the status bar every sixty seconds (for the time)
set -g status-interval 60
#-------------------------------------------------------#
#-------------------------------------------------------#
#END OF STATUS LINE MESSAGES
#-------------------------------------------------------#
Terminal -> Bell -> Action to happen when a bell occurs = None (bell disabled)
Window -> Lines of Scrollback = 1000 (For the quick "Oops, what did I do" moment)
Window -> Reset scrollback on keypress = check
Window -> Reset scrollback on display activity = uncheck
SSH -> Remote command = tmux a -t base || tmux new -s base (if you're going to use this connection for tmux)
SSH -> Protocol = 2 only
SSH -> Auth -> Attempt authentication using Pageant = check (Most Important One)
SSH -> Auth -> Private key file for authentication = c:\full\path\to\rsa.ppk
SSH -> X11 -> Enable X11 forwarding = check (Important if you use X11 applications that need to display to your laptop.)
(copy/paste with mouse in putty should be done holding shift key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment