# 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 n next bind-key p prev # $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." # # # set prefix key to ctrl+a # 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 %%'" # switch split window keys unbind % bind | split-window -h bind s split-window -v # quick view of processes bind '`' split-window "exec htop" # scrollback buffer n lines set -g history-limit 100000 # listen for activity on all windows #set -g bell-action any setw -g monitor-activity off set -g visual-activity off # on-screen time for display-panes in ms set -g display-panes-time 2000 # start window indexing at three instead of zero set -g base-index 2 # start pane indexing at three instead of zero set-window-option -g pane-base-index 3 # enable wm window titles set -g set-titles on # Automatically set window title setw -g automatic-rename off setw -g allow-rename off # statusbar -------------------------------------------------------------- set -g display-time 2000 # set status-interval 3 # 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 ## 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 "[#[fg=black]#H #(cut -d ' ' -f1,2,3 < /proc/loadavg)#[default]]" ## set -g status-left "[#[fg=black]#H#(grep --perl -o '(\d+\.\d+)' < /proc/loadavg | tr '\n' ' ')#[default]]" set -g status-left-length 50 set -g status-right-length 75 ## set -g status-right "[#[fg=black]#(uptime -p)%a %Y-%m-%d %H:%M#[default]]" ## set -g status-right "[#[fg=black]#(uptime -p | grep -o '\([0-9]\)\+\ \([a-z]\)' | tr '\n' ' :')%a %Y-%m-%d %H:%M#[default]]" # ## not work on centos 6.9 # set -g status-right "[#[fg=black]#(uptime -p) :: %a %Y-%m-%d %H:%M#[default]]" # set -g status-right "[#[fg=black]#(uptime | awk -F, '{print $1}') :: %a %Y-%m-%d %H:%M:%S#[default]]" ## set -g status-right "[#[fg=black]#(uptime | awk -F, '{print $1}') :: %a %Y-%m-%d#[default]]" set -g status-right "[#[fg=black]#(uptime | awk -F, '{print $1}') :: %a %Y-%m-%d :: #(upower -d | awk '/percentage/ {x=$2} END {print x}') #[default]]" # set -g status-right '[#[fg=black]#(uptime | awk -F, "{print $1}") :: %a %Y-%m-%d :: #(upower -d | awk "/percentage/ {x=$2} END {print x}") #[default]]' # set -g status-right '[#(uptime | awk -F, '\''{print $1}'\'') :: %a %Y-%m-%d :: #(upower -d | awk '\''/percentage/ {x=$2} END {print x}'\'') :: #(hostname) #[default]]' # set -g status-right "[#[fg=black]#(uptime | awk -F, '{print $1}') :: #(hostname -f) :: #(upower -d | awk '$1 == "percentage:" {print $2;exit}') :: #(hostname -f) #[default]]" # set -g status-right "[#[fg=black]#(uptime | awk -F, '{print $1}') #(hostname -f) :: %a %Y-%m-%d :: #(upower -d | sed -n -e '/\/DisplayDevice/,$p' | grep -Eo '([0-9]+)%') #[default]]" set -g default-terminal "screen" ## vi style key bindings set-window-option -g mode-keys vi ## lock ## set-option -g lock-command vlock ## set-option -g lock-after-time 1212 ## bind-key Q lock-server ## rename-window -t${TMUX_PANE} "ash" ## https://github.com/tmux-plugins/tmux-resurrect # set -g @plugin 'tmux-plugins/tmux-resurrect' # run-shell /home/chika.tambun/github.com/tmux-resurrect/resurrect.tmux ## https://github.com/tmux-plugins/tmux-battery # run-shell /home/chika.tambun/github.com/tmux-battery/battery.tmux