Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configurations X
# $Id: t-williams.conf,v 1.1 2009/11/02 18:59:28 nicm Exp $
#
# ~/.tmux.conf - tmux terminal multiplexer config
# Thayer Williams (http://cinderwick.ca)
# "Feel free to do whatever you like with it."
# I typically start tmux from ~/.xinitrc with the following:
#
# urxvt -e bash -c "tmux attach -d -t mysession" &
#
# and recall it any time thereafter with xbindkeys (Mod4+s):
#
# "urxvt -e bash -c 'tmux attach -d -t mysession'"
# m:0x50 + c:39
# set prefix key to ctrl+a until I have time to adapt
#unbind C-b
#set -g prefix C-o
# quick view of processes
#bind '~' split-window "exec top"
# scrollback buffer n lines
set -g history-limit 5000
# listen for activity on all windows
set -g bell-action any
# visual notification of activity in other windows
#setw -g monitor-activity on
set -g visual-activity on
#set -g default-terminal "screen-256color"
#set -g default-terminal "xterm-256color"
set -g default-terminal "rxvt-unicode-256color"
bind-key C-o last-window
# ctrl+left/right cycles thru windows
bind-key C-n next
bind-key C-p prev
set -g default-command zsh
# Bind function keys.
bind -n F1 select-window -t 1
bind -n F2 select-window -t 2
bind -n F3 select-window -t 3
bind -n F4 select-window -t 4
bind -n F5 select-window -t 5
bind -n F6 select-window -t 6
bind -n F7 select-window -t 7
bind -n F8 select-window -t 8
# start window indexing at one instead of zero
set -g base-index 1
bind-key C-k confirm kill-window
bind-key C-e confirm kill-pane
bind-key S command-prompt "new-window -n %1 'myssh %1'"
bind-key A command-prompt "rename-window %1"
bind R source-file ~/.tmux.conf\; display-message "Config reloaded..."
bind X break-pane
# more intuitive keybindings for splitting
#unbind %
#bind H split-window -v
#unbind '"'
#bind V split-window -h
bind C-b break-pane
# Clock
setw -g clock-mode-colour green
setw -g clock-mode-style 24
#bind-key j down-pane
#bind-key ^J down-pane
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
# explicitly disable mouse control
setw -g mode-mouse off
set -g mouse-select-pane off
set -g mouse-resize-pane off
set -g mouse-select-window off
bind 'l' set-window-option synchronize-panes on
bind 'm' set-window-option synchronize-panes off
#set -g terminal-overrides "xterm*:setab=\\E[4%p1%dm,xterm*:setaf=\\E[3%p1%dm"
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
set -g terminal-overrides "xterm*:XT:smcup@:rmcup@"
set -g set-titles on
#set-option -g set-titles-string '#S:#I.#P #W'
set-option -g set-titles-string '#T'
set-window-option -g automatic-rename on
# Pipe pane to log file
#bind-key P pipe-pane -o "cat >>$HOME/#W-tmux.log" \; display-message "Toggled logging to $HOME/#W-tmux.log"
#bind-key h pipe-pane \; display-message 'Ended logging to $HOME/#W-tmux.log'
bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
bind-key j join-pane -s !
### Test vim http://www.codeography.com/2013/06/19/navigating-vim-and-tmux-splits
## bind -n C-h run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
## bind -n C-j run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
## bind -n C-k run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
## bind -n C-l run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
##
# unicode
setw -g utf8 on
set -g status-utf8 on
# Highlighting the active window in status bar
setw -g window-status-current-bg green
# set -g status-right "##(date +%H:%M)"
set -g status-right "#[fg=colour136, bg=color235] #(date +%H:%M)"
set -g status-left "#[fg=colour234, bg=colour148] #S:#I.#P #[fg=colour0, bg=colour33] #H "
#### Copy §/ paste
## Ctrlt,Escape # enter copy mode
## # move cursor to the start or end of the desired text string
## v # to activate highlighting
## # move cursor to cover the requisite string
## y # to capture the string
## q # exit copy mode
## Ctrlt,p # put/paste the text in the desired location
##
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
#### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# bell
# set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red
######################
### DESIGN CHANGES ###
######################
# panes
set -g pane-border-fg black
set -g pane-active-border-fg brightred
## Status bar design
# status line
set -g status-utf8 on
set -g status-justify left
set -g status-bg default
set -g status-fg colour12
set -g status-interval 2
# messaging
set -g message-fg black
set -g message-bg yellow
set -g message-command-fg blue
set -g message-command-bg black
#window mode
setw -g mode-bg colour6
setw -g mode-fg colour0
# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
setw -g window-status-current-bg colour0
setw -g window-status-current-fg colour11
setw -g window-status-current-attr dim
setw -g window-status-bg green
setw -g window-status-fg black
setw -g window-status-attr reverse
# Info on left (I don't have a session display for now)
set -g status-left ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set -g default-terminal "screen-256color"
# The modes {
setw -g clock-mode-colour colour135
setw -g mode-attr bold
setw -g mode-fg colour196
setw -g mode-bg colour238
# }
# The panes {
set -g pane-border-bg colour235
set -g pane-border-fg colour238
set -g pane-active-border-bg colour236
set -g pane-active-border-fg colour51
# }
# The statusbar {
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour137
set -g status-attr dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-fg colour81
setw -g window-status-current-bg colour238
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-fg colour138
setw -g window-status-bg colour235
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour1
# }
# The messages {
set -g message-attr bold
set -g message-fg colour232
set -g message-bg colour166
# }
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
!-------------------------------------------------------------------------------
! URxvt settings
! Colours lifted from Solarized (http://ethanschoonover.com/solarized)
! More info at:
! http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod
!-------------------------------------------------------------------------------
URxvt.depth: 32
URxvt.geometry: 90x30
URxvt.transparent: false
URxvt.fading: 0
! URxvt.urgentOnBell: true
! URxvt.visualBell: true
URxvt.loginShell: true
URxvt.saveLines: 50
URxvt.internalBorder: 3
URxvt.lineSpace: 0
! Fonts
URxvt.allow_bold: false
/* URxvt.font: -*-terminus-medium-r-normal-*-12-120-72-72-c-60-iso8859-1 */
URxvt*font: xft:Monospace:pixelsize=14
URxvt*boldFont: xft:Monospace:pixelsize=14
! Fix font space
URxvt*letterSpace: -1
! Scrollbar
URxvt.scrollStyle: rxvt
URxvt.scrollBar: false
! Perl extensions
URxvt.perl-lib: /usr/lib/urxvt/perl
URxvt.perl-ext-common: default,matcher,fullscreen,selection,clipboard
URxvt.matcher.button: 1
URxvt.urlLauncher: google-chrome
! Cursor
URxvt.cursorBlink: true
URxvt.cursorColor: #657b83
URxvt.cursorUnderline: false
! Pointer
URxvt.pointerBlank: true
!!Source http://github.com/altercation/solarized
*background: #000000
*foreground: #657b83
!!*fading: 40
*fadeColor: #002b36
*cursorColor: #93a1a1
*pointerColorBackground: #586e75
*pointerColorForeground: #93a1a1
!! black dark/light
*color0: #073642
*color8: #002b36
!! red dark/light
*color1: #dc322f
*color9: #cb4b16
!! green dark/light
*color2: #859900
*color10: #586e75
!! yellow dark/light
*color3: #b58900
*color11: #657b83
!! blue dark/light
*color4: #268bd2
*color12: #839496
!! magenta dark/light
*color5: #d33682
*color13: #6c71c4
!! cyan dark/light
*color6: #2aa198
*color14: #93a1a1
!! white dark/light
*color7: #eee8d5
*color15: #fdf6e3
!! Fullscreen switch
!URxvt.perl-ext-common: fullscreen
URxvt.keysym.F11: perl:fullscreen:switch
URxvt.clipboard.autocopy: true
! keyboard-select
URxvt.keysym.M-s: perl:keyboard-select:activate
URxvt.keysym.M-r: perl:keyboard-select:search
URxvt.keysym.M-c: perl:clipboard:copy
URxvt.keysym.M-v: perl:clipboard:paste
URxvt.keysym.M-C-v: perl:clipboard:paste_escaped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment