mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-23 07:09:10 +01:00
Remove old examples in favour of one example configuration file.
This commit is contained in:
parent
a33bb3e876
commit
2a1bb91bf7
2
README
2
README
@ -33,7 +33,7 @@ the source tree with:
|
||||
Some common questions are answered in the FAQ file and a more extensive (but
|
||||
slightly out of date) guide is available in the OpenBSD FAQ at
|
||||
http://www.openbsd.org/faq/faq7.html#tmux. A rough todo list is in the TODO
|
||||
file and some example configurations are in the examples directory.
|
||||
file and an example configuration in example_tmux.conf.
|
||||
|
||||
A vim(1) syntax file is available at:
|
||||
|
||||
|
66
example_tmux.conf
Normal file
66
example_tmux.conf
Normal file
@ -0,0 +1,66 @@
|
||||
#
|
||||
# Example .tmux.conf
|
||||
#
|
||||
# By Nicholas Marriott. Public domain.
|
||||
#
|
||||
|
||||
# Some tweaks to the status line
|
||||
set -g status-bg green
|
||||
set -g status-right "%H:%M"
|
||||
set -g window-status-current-attr "underscore"
|
||||
|
||||
# No bells at all
|
||||
set -g bell-action none
|
||||
|
||||
# Lock after 15 minutes
|
||||
set -g lock-after-time 1800
|
||||
|
||||
# Keep windows around after they exit
|
||||
set -g remain-on-exit on
|
||||
|
||||
# Turn on xterm-keys so that additional function keys get escape sequences
|
||||
set -g xterm-keys on
|
||||
|
||||
# Change the prefix key to C-a
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
bind C-a send-prefix
|
||||
|
||||
# Turn the mouse on, but without copy mode dragging
|
||||
set -g mouse on
|
||||
unbind -n MouseDrag1Pane
|
||||
unbind -temacs-copy MouseDrag1Pane
|
||||
|
||||
# Some extra key bindings to select higher numbered windows
|
||||
bind F1 selectw -t:10
|
||||
bind F2 selectw -t:11
|
||||
bind F3 selectw -t:12
|
||||
bind F4 selectw -t:13
|
||||
bind F5 selectw -t:14
|
||||
bind F6 selectw -t:15
|
||||
bind F7 selectw -t:16
|
||||
bind F8 selectw -t:17
|
||||
bind F9 selectw -t:18
|
||||
bind F10 selectw -t:19
|
||||
bind F11 selectw -t:20
|
||||
bind F12 selectw -t:21
|
||||
|
||||
# Keys to toggle monitoring activity in a window, and synchronize-panes
|
||||
bind m set monitor-activity
|
||||
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
|
||||
|
||||
# Keys to hide and show a window name from the status line
|
||||
bind '-' set window-status-format '#I'\; set window-status-current-format '#I'
|
||||
bind '+' set window-status-format '#I:#W#F'\; set window-status-current-format '#I:#W#F'
|
||||
|
||||
# Create a single default session
|
||||
new -d -s0 -nirssi 'exec irssi'
|
||||
set -t0:0 monitor-activity on
|
||||
set -t0:0 aggressive-resize on
|
||||
neww -d -ntodo 'exec emacs ~/TODO'
|
||||
setw -t0:1 aggressive-resize on
|
||||
neww -d -nmutt 'exec mutt'
|
||||
setw -t0:2 aggressive-resize on
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
@ -1,42 +0,0 @@
|
||||
# $Id: h-boetes.conf,v 1.2 2009-10-25 21:45:26 nicm Exp $
|
||||
#
|
||||
# From Han Boetes.
|
||||
|
||||
set -g default-command zsh
|
||||
set -g status-right "#(uptime|awk '{print $11}') #(date)"
|
||||
|
||||
# Statusbar properties.
|
||||
set -g display-time 3000
|
||||
set -g status-bg black
|
||||
set -g status-fg cyan
|
||||
set-window-option -g window-status-current-attr bright,reverse
|
||||
set-window-option -g window-status-current-bg cyan
|
||||
set-window-option -g window-status-current-fg black
|
||||
|
||||
# Use c-t instead of c-b as the prefix
|
||||
unbind C-b
|
||||
set -g prefix C-t
|
||||
bind C-t send-prefix
|
||||
bind t send-prefix
|
||||
|
||||
# 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
|
||||
|
||||
# All new windows started at startup.
|
||||
new emacs
|
||||
neww irssi
|
||||
neww mutt
|
||||
neww
|
||||
neww
|
||||
neww
|
||||
neww
|
||||
neww
|
||||
|
||||
select-window -t 1
|
@ -1,110 +0,0 @@
|
||||
# $Id: n-marriott.conf,v 1.11 2009-11-24 19:03:59 nicm Exp $
|
||||
#
|
||||
# By Nicholas Marriott. Public domain.
|
||||
|
||||
# Default global options.
|
||||
set -g status-bg green
|
||||
set -g status-right "%H:%M" # %d-%b-%y
|
||||
set -g bell-action none
|
||||
set -g lock-after-time 1800
|
||||
|
||||
# Default global window options.
|
||||
setw -g remain-on-exit on
|
||||
setw -g window-status-current-attr "underscore"
|
||||
#setw -g xterm-keys on
|
||||
|
||||
# Prefix key.
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
bind C-a send-prefix
|
||||
|
||||
# Keys to switch session.
|
||||
bind Q switchc -t0
|
||||
bind W switchc -t1
|
||||
bind E switchc -t2
|
||||
|
||||
# Other key bindings.
|
||||
bind F1 selectw -t:10
|
||||
bind F2 selectw -t:11
|
||||
bind F3 selectw -t:12
|
||||
bind F4 selectw -t:13
|
||||
bind F5 selectw -t:14
|
||||
bind F6 selectw -t:15
|
||||
bind F7 selectw -t:16
|
||||
bind F8 selectw -t:17
|
||||
bind F9 selectw -t:18
|
||||
bind F10 selectw -t:19
|
||||
bind F11 selectw -t:20
|
||||
bind F12 selectw -t:21
|
||||
|
||||
bind m setw monitor-activity
|
||||
|
||||
bind y setw force-width 81
|
||||
bind u setw force-width 0
|
||||
|
||||
bind -n F1 run-shell 'mpc toggle >/dev/null 2>&1'
|
||||
bind -n F2 run-shell 'mpc'
|
||||
bind -n F3 run-shell 'mpc prev >/dev/null 2>&1'
|
||||
bind -n F4 run-shell 'mpc next >/dev/null 2>&1'
|
||||
bind -n F5 run-shell 'mpc volume -5 >/dev/null 2>&1'
|
||||
bind -n F6 run-shell 'mpc volume +5 >/dev/null 2>&1'
|
||||
|
||||
# Hide and show window name from status line
|
||||
bind '-' setw window-status-format '#I'\; setw window-status-current-format '#I'
|
||||
bind '+' setw window-status-format '#I:#W#F'\; setw window-status-current-format '#I:#W#F'
|
||||
|
||||
# First session.
|
||||
new -d -s0 -nirssi 'exec ssh -t natalya exec sh ~/bin/tmux-start'
|
||||
setw -t0:0 monitor-activity on
|
||||
setw -t0:0 aggressive-resize on
|
||||
set -t0 status-bg green
|
||||
neww -d -ntodo 'exec emacs ~/TODO'
|
||||
setw -t0:1 aggressive-resize on
|
||||
neww -d -ntodo2 'exec emacs ~/TODO2'
|
||||
setw -t0:2 aggressive-resize on
|
||||
neww -d -nncmpc 'exec ncmpc -f ~/.ncmpc.conf'
|
||||
setw -t0:3 aggressive-resize on
|
||||
neww -d -nmutt 'exec mutt'
|
||||
setw -t0:4 aggressive-resize on
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
|
||||
# Second session.
|
||||
new -d -s1
|
||||
set -t1 status-bg cyan
|
||||
linkw -dk -t0 -s0:0
|
||||
linkw -dk -t1 -s0:1
|
||||
linkw -dk -t2 -s0:2
|
||||
linkw -dk -t3 -s0:3
|
||||
linkw -dk -t4 -s0:4
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
|
||||
# Third session.
|
||||
new -d -s2
|
||||
set -t2 status-bg yellow
|
||||
linkw -dk -t0 -s0:0
|
||||
linkw -dk -t1 -s0:1
|
||||
linkw -dk -t2 -s0:2
|
||||
linkw -dk -t3 -s0:3
|
||||
linkw -dk -t4 -s0:4
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
||||
neww -d
|
@ -1,102 +0,0 @@
|
||||
# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $
|
||||
#
|
||||
# By Nicholas Marriott. Public domain.
|
||||
#
|
||||
# This configuration file binds many of the common GNU screen key bindings to
|
||||
# appropriate tmux key bindings. Note that for some key bindings there is no
|
||||
# tmux analogue and also that this set omits binding some commands available in
|
||||
# tmux but not in screen.
|
||||
#
|
||||
# Note this is only a selection of key bindings and they are in addition to the
|
||||
# normal tmux key bindings. This is intended as an example not as to be used
|
||||
# as-is.
|
||||
|
||||
# Set the prefix to ^A.
|
||||
unbind C-b
|
||||
set -g prefix ^A
|
||||
bind a send-prefix
|
||||
|
||||
# Bind appropriate commands similar to screen.
|
||||
# lockscreen ^X x
|
||||
unbind ^X
|
||||
bind ^X lock-server
|
||||
unbind x
|
||||
bind x lock-server
|
||||
|
||||
# screen ^C c
|
||||
unbind ^C
|
||||
bind ^C new-window
|
||||
unbind c
|
||||
bind c new-window
|
||||
|
||||
# detach ^D d
|
||||
unbind ^D
|
||||
bind ^D detach
|
||||
|
||||
# displays *
|
||||
unbind *
|
||||
bind * list-clients
|
||||
|
||||
# next ^@ ^N sp n
|
||||
unbind ^@
|
||||
bind ^@ next-window
|
||||
unbind ^N
|
||||
bind ^N next-window
|
||||
unbind " "
|
||||
bind " " next-window
|
||||
unbind n
|
||||
bind n next-window
|
||||
|
||||
# title A
|
||||
unbind A
|
||||
bind A command-prompt "rename-window %%"
|
||||
|
||||
# other ^A
|
||||
unbind ^A
|
||||
bind ^A last-window
|
||||
|
||||
# prev ^H ^P p ^?
|
||||
unbind ^H
|
||||
bind ^H previous-window
|
||||
unbind ^P
|
||||
bind ^P previous-window
|
||||
unbind p
|
||||
bind p previous-window
|
||||
unbind BSpace
|
||||
bind BSpace previous-window
|
||||
|
||||
# windows ^W w
|
||||
unbind ^W
|
||||
bind ^W list-windows
|
||||
unbind w
|
||||
bind w list-windows
|
||||
|
||||
# quit \
|
||||
unbind '\'
|
||||
bind '\' confirm-before "kill-server"
|
||||
|
||||
# kill K k
|
||||
unbind K
|
||||
bind K confirm-before "kill-window"
|
||||
unbind k
|
||||
bind k confirm-before "kill-window"
|
||||
|
||||
# redisplay ^L l
|
||||
unbind ^L
|
||||
bind ^L refresh-client
|
||||
unbind l
|
||||
bind l refresh-client
|
||||
|
||||
# split -v |
|
||||
unbind |
|
||||
bind | split-window
|
||||
|
||||
# :kB: focus up
|
||||
unbind Tab
|
||||
bind Tab select-pane -t:.+
|
||||
unbind BTab
|
||||
bind BTab select-pane -t:.-
|
||||
|
||||
# " windowlist -b
|
||||
unbind '"'
|
||||
bind '"' choose-window
|
@ -1,104 +0,0 @@
|
||||
# $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-a
|
||||
|
||||
# send the prefix to client inside window (ala nested sessions)
|
||||
bind-key a send-prefix
|
||||
|
||||
# toggle last window like screen
|
||||
bind-key C-a last-window
|
||||
|
||||
# confirm before killing a window or the server
|
||||
bind-key k confirm kill-window
|
||||
bind-key K confirm kill-server
|
||||
|
||||
# toggle statusbar
|
||||
bind-key b set-option status
|
||||
|
||||
# ctrl+left/right cycles thru windows
|
||||
bind-key -n C-right next
|
||||
bind-key -n C-left prev
|
||||
|
||||
# open a man page in new window
|
||||
bind / command-prompt "split-window 'exec man %%'"
|
||||
|
||||
# quick view of processes
|
||||
bind '~' split-window "exec htop"
|
||||
|
||||
# scrollback buffer n lines
|
||||
set -g history-limit 5000
|
||||
|
||||
# listen for activity on all windows
|
||||
set -g bell-action any
|
||||
|
||||
# on-screen time for display-panes in ms
|
||||
set -g display-panes-time 2000
|
||||
|
||||
# start window indexing at one instead of zero
|
||||
set -g base-index 1
|
||||
|
||||
# enable wm window titles
|
||||
set -g set-titles on
|
||||
|
||||
# wm window title string (uses statusbar variables)
|
||||
set -g set-titles-string "tmux.#I.#W"
|
||||
|
||||
# session initialization
|
||||
new -s mysession mutt
|
||||
neww -t 2
|
||||
neww -d -t 3
|
||||
neww -d -t 5 mocp
|
||||
neww -d -t 6 rtorrent
|
||||
selectw -t 1
|
||||
|
||||
# statusbar --------------------------------------------------------------
|
||||
|
||||
set -g display-time 2000
|
||||
|
||||
# default statusbar colors
|
||||
set -g status-fg white
|
||||
set -g status-bg default
|
||||
set -g status-attr default
|
||||
|
||||
# default window title colors
|
||||
set-window-option -g window-status-fg cyan
|
||||
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 white
|
||||
set-window-option -g window-status-current-bg default
|
||||
set-window-option -g window-status-current-attr bright
|
||||
|
||||
# command/message line colors
|
||||
set -g message-fg white
|
||||
set -g message-bg black
|
||||
set -g message-attr bright
|
||||
|
||||
# center align the window list
|
||||
set -g status-justify centre
|
||||
|
||||
# show some useful stats but only when tmux is started
|
||||
# outside of Xorg, otherwise dwm statusbar shows these already
|
||||
set -g status-right ""
|
||||
set -g status-left ""
|
||||
if '[ -z "$DISPLAY" ]' 'set -g status-left "[#[fg=green] #H #[default]]"'
|
||||
if '[ -z "$DISPLAY" ]' 'set -g status-right "[ #[fg=magenta]#(cat /proc/loadavg | cut -d \" \" -f 1,2,3)#[default] ][ #[fg=cyan,bright]%a %Y-%m-%d %H:%M #[default]]"'
|
||||
if '[ -z "$DISPLAY" ]' 'set -g status-right-length 50'
|
||||
|
@ -1,36 +0,0 @@
|
||||
# $Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $
|
||||
#
|
||||
# vim-keys.conf, v1.2 2010/09/12
|
||||
#
|
||||
# By Daniel Thau. Public domain.
|
||||
#
|
||||
# This configuration file binds many vi- and vim-like bindings to the
|
||||
# appropriate tmux key bindings. Note that for many key bindings there is no
|
||||
# tmux analogue. This is intended for tmux 1.3, which handles pane selection
|
||||
# differently from the previous versions
|
||||
|
||||
# split windows like vim
|
||||
# vim's definition of a horizontal/vertical split is reversed from tmux's
|
||||
bind s split-window -v
|
||||
bind v split-window -h
|
||||
|
||||
# move around panes with hjkl, as one would in vim after pressing ctrl-w
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# resize panes like vim
|
||||
# feel free to change the "1" to however many lines you want to resize by, only
|
||||
# one at a time can be slow
|
||||
bind < resize-pane -L 1
|
||||
bind > resize-pane -R 1
|
||||
bind - resize-pane -D 1
|
||||
bind + resize-pane -U 1
|
||||
|
||||
# bind : to command-prompt like vim
|
||||
# this is the default in tmux already
|
||||
bind : command-prompt
|
||||
|
||||
# vi-style controls for copy mode
|
||||
setw -g mode-keys vi
|
@ -1,49 +0,0 @@
|
||||
" tmux.vim - Set xterm input codes passed by tmux
|
||||
" Author: Mark Oteiza
|
||||
" License: Public domain
|
||||
" Description: Simple plugin that assigns some xterm(1)-style keys to escape
|
||||
" sequences passed by tmux when "xterm-keys" is set to "on". Inspired by an
|
||||
" example given by Chris Johnsen at:
|
||||
" https://stackoverflow.com/a/15471820
|
||||
"
|
||||
" Documentation: help:xterm-modifier-keys man:tmux(1)
|
||||
|
||||
if exists("g:loaded_tmux") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_tmux = 1
|
||||
|
||||
function! s:SetXtermCapabilities()
|
||||
set ttymouse=sgr
|
||||
|
||||
execute "set <xUp>=\e[1;*A"
|
||||
execute "set <xDown>=\e[1;*B"
|
||||
execute "set <xRight>=\e[1;*C"
|
||||
execute "set <xLeft>=\e[1;*D"
|
||||
|
||||
execute "set <xHome>=\e[1;*H"
|
||||
execute "set <xEnd>=\e[1;*F"
|
||||
|
||||
execute "set <Insert>=\e[2;*~"
|
||||
execute "set <Delete>=\e[3;*~"
|
||||
execute "set <PageUp>=\e[5;*~"
|
||||
execute "set <PageDown>=\e[6;*~"
|
||||
|
||||
execute "set <xF1>=\e[1;*P"
|
||||
execute "set <xF2>=\e[1;*Q"
|
||||
execute "set <xF3>=\e[1;*R"
|
||||
execute "set <xF4>=\e[1;*S"
|
||||
|
||||
execute "set <F5>=\e[15;*~"
|
||||
execute "set <F6>=\e[17;*~"
|
||||
execute "set <F7>=\e[18;*~"
|
||||
execute "set <F8>=\e[19;*~"
|
||||
execute "set <F9>=\e[20;*~"
|
||||
execute "set <F10>=\e[21;*~"
|
||||
execute "set <F11>=\e[23;*~"
|
||||
execute "set <F12>=\e[24;*~"
|
||||
endfunction
|
||||
|
||||
if exists('$TMUX')
|
||||
call s:SetXtermCapabilities()
|
||||
endif
|
Loading…
Reference in New Issue
Block a user