Skip to content

Instantly share code, notes, and snippets.

@thepoho
Created March 14, 2019 20:13
Show Gist options
  • Save thepoho/0de8f244fe8a05a9ef704c9c4a5b80d7 to your computer and use it in GitHub Desktop.
Save thepoho/0de8f244fe8a05a9ef704c9c4a5b80d7 to your computer and use it in GitHub Desktop.
My screen-ish tmux.conf
# $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.
#USE_PATCHED_FONT=true
set -g status-bg red
set -g status-fg colour231
set -g default-shell /bin/zsh
set -g mouse on
unbind Left
unbind Down
unbind Up
unbind Right
unbind C-Up
unbind C-Down
unbind C-Left
unbind C-Right
set-option -g default-command zsh
#bind -n End send-key C-e
#bind -n Home send-key C-a
# remap prefix to Control + a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
unbind r
bind-key r source-file ~/.tmux.conf
# Bind appropriate commands similar to screen.
# screen ^C c
unbind ^c
bind ^c new-window
# detach ^D d
unbind ^d
bind ^d detach
# next ^@ ^N sp n
unbind n
bind ^n next-window
# prev p ^?
unbind p
bind ^p previous-window
unbind x
bind ^x new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \; swap-pane -s tmux-zoom.0 \; select-window -t tmux-zoom
unbind z
bind ^z last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom
# unbind x
# bind ^x run ". ~/.tmux/zoom"
# windows w
# unbind w
# bind ^w list-windows
# kill K k
# unbind ^k
# bind ^k confirm-before "kill-window"
unbind h
bind ^h split-window -h
unbind j
bind ^j split-window -v
# unbind '"'
# unbind %
# :kB: focus up
unbind l
bind ^l select-pane -t:.+
unbind k
bind ^k select-pane -t:.-
# " windowlist -b
#unbind '"'
#bind '"' choose-window
# bind 'V' split-window -v
# bind 'v' split-window -v
# bind 'h' split-window -h
set -g status-left-length 52
set -g status-right-length 451
set -g status-fg white
set -g status-bg colour234
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
#set -g status-left '#[fg=colour235,bg=colour252,bold] ⮀ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
set -g status-left ''
set -g status-right "poho : %-l:%M %p, %-d %b %Y"
#set -g window-status-format "#[fg=colour235,bg=colour252,bold] #I:#W "
set -g window-status-format '#[fg=colour252,bold] #I:#(pwd="#{pane_current_path}"; echo ${pwd####*/}) '
#set -g window-status-current-format "#[fg=colour234,bg=colour39,bold][ #I:#W ]"
#set -g window-status-current-format "#[fg=colour234,bg=colour39][#[fg=black,bg=colour39,noreverse,bold] #I: #W #[fg=colour234,bg=colour39]]#[fg=colour39,bg=colour234,nobold]"
set -g window-status-current-format '#[fg=colour252,bold][ #I:#(pwd="#{pane_current_path}"; echo ${pwd####*/}) ]'
set-option -g status-interval 1
#set-option -ga terminal-overrides ',xterm-256color:kend=\E[F:khome=\E[H:smkx=\E=:rmkx=\E>'
set -g default-terminal screen-256color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment