Skip to content

Instantly share code, notes, and snippets.

@mrdaemon
Created November 26, 2014 18:23
Show Gist options
  • Save mrdaemon/d01b78cccba14e32b8f5 to your computer and use it in GitHub Desktop.
Save mrdaemon/d01b78cccba14e32b8f5 to your computer and use it in GitHub Desktop.
# Dee's tmux configuration file
# start window indexing at one instead of zero
set -g base-index 1
# Bell in any window results in term bell
set -g bell-action any
# Home as default path
set -g default-path ~/
# Enablan 256color term
set -g default-terminal screen-256color
# urxvt specific hack, prevents ITALICS EVERYWHERE instead of reverse
set -g terminal-overrides 'rxvt-unicode*:sitm@...@'
# Default shell and command for windows
set -g default-command /bin/bash
set -g default-shell /bin/bash
# Enable mouse for selection of panes
# (Disabled because it breaks most of my term's select functionality)
#set -g mouse-select-pane on
# Prefix key is Control+a, because I am way too used to screen
unbind C-b
set -g prefix C-a
# Emulate behavior of screen's C-a, A (rename window)
unbind A
bind A command-prompt "rename-window %%"
# Splitting keybinds
unbind %
bind h split-window -v
unbind '"'
bind v split-window -h
# Pane resize keybinds
unbind J
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r H resize-pane -L 5
bind-key -r L resize-pane -R 5
bind-key -r M-j resize-pane -D
bind-key -r M-k resize-pane -U
bind-key -r M-h resize-pane -L
bind-key -r M-l resize-pane -R
# copy mode, scree-like, also vi bindings
unbind [
bind Escape copy-mode
setw -g mode-keys vi
# Send prefix to window (i.e. nested screen/session)
bind-key a send-prefix
# Toggle last window (screen, again)
bind-key C-a last-window
# Confirm window kills
#bind-key k confirm kill-window
#bind-key K confirm kill-server
# Toggle statusbar
bind-key b set-option status
# cycle windows with left/right
#bind-key right next
#bind-key left prev
# lock server with C-x, like screen, again.
bind x lock-server
# Refresh draw
bind l refresh-client
# Run command in split
bind / command-prompt "split-window 'exec %%'"
# Enable utf-8
set-window-option -g utf8 on
# Hueg buffer
set -g history-limit 10000
# watch activity on all windows
set -g bell-action any
# Enable titles
set -g set-titles on
# Source sessions
bind I source-file ~/.tmux-sessions.conf
# Reload Config
bind R source-file ~/.tmux.conf
#-- Misc Colours --------------------------------------------------------------
# Border Colours
set -g pane-active-border-bg default
set -g pane-active-border-fg colour240
set -g pane-border-bg default
set -g pane-border-fg colour235
#-- Statusbar -----------------------------------------------------------------
# Position
set -g status-position top
# Status refresh interval in seconds
set -g status-interval 5
# Default sb colours (256 -- love me some gray)
set -g status-bg colour235
set -g status-fg white
# Left shit (session name, bright blue)
set -g status-left-length 20
set -g status-left '#[fg=blue,bright]#(hostname):#[fg=blue]#S'
set -g status-left-attr bright
# Right shit
set -g status-right-length 90
set -g status-right '#[default]#(conky -c ~/.conky-tmux) #[fg=white,bright]%H:%M'
# Window title colors
set-window-option -g window-status-fg colour240
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg colour237
set-window-option -g window-status-current-attr default
# Center windows
set-option -g status-justify centre
# Command/message line colors
set -g message-fg black
set -g message-bg green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment