Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ThomasAdam/867d04309c7af4e73721395855fdfe47 to your computer and use it in GitHub Desktop.
Save ThomasAdam/867d04309c7af4e73721395855fdfe47 to your computer and use it in GitHub Desktop.
tmux config
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
set-option -s set-clipboard on
set -sg escape-time 0
set -g bell-action other
set -g lock-after-time 1800
set -g lock-command 'tput civis && read -s -n1'
set -g history-limit 10000
set -g default-terminal "screen-256color"
set -g default-shell "/bin/zsh"
set -g repeat-time 100
set -ga terminal-overrides ',xterm-256color*:Tc'
set -g mouse on
set -g status-bg blue
set -g status-fg cyan
set -g renumber-windows on
set-hook -g alert-bell 'run -b "notify-send \"Bell in session #{session_name}:#{window_index}:#{window_name}\""'
unbind-key /
unbind-key c
unbind-key d
unbind-key f
unbind-key i
unbind-key n
unbind-key o
unbind-key p
unbind-key r
unbind-key s
unbind-key t
unbind-key w
unbind-key x
unbind-key |
unbind-key -
unbind-key A
unbind-key S
unbind-key .
unbind-key "'"
unbind-key '#'
unbind-key ' '
unbind-key z
unbind-key ^z
bind a send-prefix
bind c new-window -a -c '#{pane_current_path}'
bind d detach-client
bind "/" command-prompt "find-window '%%'"
bind i display-message
bind a last-window
bind n next-window
bind o select-pane -D
bind p previous-window
bind r respawn-window
bind s choose-tree -ws -O time -Z
bind t clock-mode
bind w choose-window -Z
bind k confirm-before kill-pane
bind x set lock-command '/usr/bin/vlock' \; lock-client \; set lock-command 'tput civis && read -s -n1'
bind "|" split-window -v -c '#{pane_current_path}'
bind "-" split-window -h -c '#{pane_current_path}'
bind S command-prompt "rename-session '%%'"
bind R if -F '#{pane_dead}' 'respawn-pane'
bind . display-panes
bind "'" command-prompt -p "SSH: " "new-window -n %1 'ssh %1'"
bind ' ' choose-window -Z
bind z resize-pane -Z
bind ^a last-window
bind ^c new-window -a -c '#{pane_current_path}'
bind ^d detach-client
bind ^i display-message
bind a last-window
bind ^n next-window
bind ^o select-pane -D
bind ^p previous-window
bind ^r respawn-window
bind ^s choose-session
bind ^t clock-mode
bind ^w choose-window
bind ^k confirm-before kill-pane
bind ^x lock-client
bind ^S command-prompt "rename-session '%%'"
bind ^z resize-pane -Z
bind -n C-Left previous-window
bind -n C-Right next-window
bind -n C-s set status
bind -r C-Left swapw -d -t:-
bind -r C-Right swapw -d -t:+
# Status stuff.
set -g status-left-style fg=white,bg='#808080'
set -g status-left-length 30
set -g status-left "[#{session_name}]"
set -g status-right-length 30
set -g status-right-style fg=white,bg=blue
set -g status-right "#{?client_prefix,#[reverse][^a]#[noreverse],}#[bg=#A57922][%a-%m-%d %H:%M]"
set -g display-panes-active-colour red
set -g display-panes-colour green
set -g display-panes-time 4000
setw -g mode-style bg=blue,fg=yellow
setw -g mode-keys vi
set -g window-status-separator "| "
set -g window-status-format "#[fg=#{?window_bell_flag,black,default},bg=#{?window_bell_flag,'#F03B3B',default}]#I:#W:#{window_flags}"
set -g window-status-current-format "#[fg=black,bg=green]#I:#W:#{window_flags}"
set-window-option -g clock-mode-colour green
# Sessions
new -d -swork -d -nmutt 'exec neomutt'
neww -d -nirc 'exec ssh -t xteddy.org TERM=screen-256color tmux -2 a -tirc'
neww -d
neww -d
neww -d
new -d -sother -d
linkw -swork:irc -tother:1
swapw -sother:1 -tother:0
new -sswsupport -c ~/work/repos/ -d -nvup
neww -d -c ~/work/repos
neww -d -c ~/work/repos
neww -d -c ~/work/repos
neww -d -c ~/work/repos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment