Skip to content

Instantly share code, notes, and snippets.

@jasmeralia
Last active April 8, 2019 16:54
Show Gist options
  • Save jasmeralia/391a63a5bb7643c2dedae8cb1a9ce2c2 to your computer and use it in GitHub Desktop.
Save jasmeralia/391a63a5bb7643c2dedae8cb1a9ce2c2 to your computer and use it in GitHub Desktop.
# $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
# navigate through windows like screen
# bind-key C-a-n next
# bind-key C-a-p prev
# 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
# reload config file
bind ^ source ~/.tmux.conf
# open a man page in new window
bind / command-prompt "split-window 'exec man %%'"
# switch split window keys
unbind %
bind | split-window -h
bind - split-window -v
# quick view of processes
bind '~' split-window "exec htop"
# scrollback buffer n lines
set -g history-limit 10000
# don't listen for activity on any windows
setw -g monitor-activity off
set -g visual-activity off
# quickly toggle window monitoring
bind = setw monitor-activity
# 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
# Automatically set window title
setw -g automatic-rename
# statusbar --------------------------------------------------------------
set -g display-time 2000
# default statusbar colors
set -g status-fg white
set -g status-bg cyan
set -g status-attr default
# default window title colors
set-window-option -g window-status-fg black
set-window-option -g window-status-bg cyan
set-window-option -g window-status-attr default
# active window title colors
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-attr bright
# command/message line colors
set -g message-fg blue
set -g message-bg white
set -g message-attr dim
# 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-left "[#[fg=black]#H#(uptime | cut -d ',' -f 3- | sed -e 's/ load average: //' | sed -e 's/ / /g')#[default]]"
set -g status-left-length 50
set -g status-right "[#[fg=black]%a %Y-%m-%d %H:%M#[default]]"
set -g status-right-length 50
set -g default-terminal "screen"
set-option -g default-shell /bin/zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment