mirror of
https://shylinux.com/x/ContextOS
synced 2025-05-09 14:18:11 +08:00
134 lines
3.8 KiB
Bash
134 lines
3.8 KiB
Bash
set -g prefix C-s #{{{
|
|
|
|
set default-terminal screen
|
|
#set default-shell /usr/bin/zsh
|
|
|
|
set -g mode-keys vi
|
|
set -g history-limit 500000
|
|
|
|
set -g base-index 1
|
|
set -g display-panes-time 5000
|
|
set -g display-time 5000
|
|
|
|
|
|
setw -g pane-base-index 1
|
|
#}}}
|
|
set -g status off #{{{
|
|
#set -g status-keys emacs
|
|
#set -g status-interval 1
|
|
#
|
|
#set -g status-justify centre
|
|
#set -g status-style bg=green
|
|
#
|
|
#set -g status-left-length 40
|
|
#set -g status-left-style bg=red
|
|
#set -g status-left ' [%m-%d %H:%M] #[bg=magenta] #S #[bg=green][#h.local] '
|
|
#
|
|
#set -g status-right-length 40
|
|
#set -g status-right-style bg=green
|
|
#set -g status-right '[#(basename `pwd`)/]#[bg=cyan] #P #[bg=blue][#{cursor_x},#{cursor_y} #{pane_height}x#{pane_width}] '
|
|
#
|
|
#setw -g window-status-format ' #I:#W#F '
|
|
#setw -g window-status-separator " "
|
|
#setw -g window-status-style bg=green
|
|
#setw -g window-status-bell-style bg=red
|
|
#setw -g window-status-last-style bg=green
|
|
#setw -g window-status-current-style bg=red
|
|
#setw -g window-status-current-format ' #I:#W#F '
|
|
|
|
#}}}
|
|
|
|
bind Space command-prompt
|
|
# session # {{{
|
|
bind d detach-client
|
|
bind g command-prompt -p "rename session:" "rename-session %%"
|
|
bind r source ~/.tmux.conf \; refresh-client
|
|
bind t clock-mode
|
|
# }}}
|
|
#window #{{{
|
|
bind w choose-window
|
|
bind q confirm-before kill-window
|
|
|
|
# bind b break-pane
|
|
bind b display-panes
|
|
bind c new-window
|
|
|
|
bind o last-window
|
|
bind n next-window
|
|
bind p previous-window
|
|
|
|
bind f command-prompt -p "find: " "find-window '%%'"
|
|
bind e command-prompt -p "name: " "rename-window '%%'"
|
|
bind m command-prompt -p "from:,to:" "swap-window -s %% -t %%"
|
|
|
|
bind 1 select-window -t :1
|
|
bind 2 select-window -t :2
|
|
bind 3 select-window -t :3
|
|
bind 4 select-window -t :4
|
|
bind 5 select-window -t :5
|
|
bind 6 select-window -t :6
|
|
|
|
#}}}
|
|
#pane #{{{
|
|
bind i display-panes
|
|
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
|
|
|
bind u split-window
|
|
bind v split-window -h
|
|
|
|
bind C-o last-pane
|
|
bind h select-pane -L
|
|
bind l select-pane -R
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
|
|
bind C-h command-prompt -p "size:" "resize-pane -L %%"
|
|
bind C-l command-prompt -p "size:" "resize-pane -R %%"
|
|
bind C-j command-prompt -p "size:" "resize-pane -D %%"
|
|
bind C-k command-prompt -p "size:" "resize-pane -U %%"
|
|
bind C-m command-prompt -p "from:,to:" "swap-pane -s %% -t %%"
|
|
|
|
# bind C-u select-layout main-horizontal
|
|
# bind C-v select-layout main-vertical
|
|
bind C-t select-layout tiled
|
|
|
|
bind ! select-window -t .1
|
|
bind @ select-window -t .2
|
|
bind '#' select-window -t .3
|
|
bind '$' select-window -t .4
|
|
bind '%' select-window -t .5
|
|
|
|
#}}}
|
|
#buffers #{{{
|
|
bind y capture-pane
|
|
bind C-s copy-mode
|
|
bind C-d clear-history
|
|
|
|
bind a choose-buffer
|
|
bind z paste-buffer
|
|
|
|
bind -t vi-copy v begin-selection
|
|
bind -t vi-copy c copy-selection
|
|
|
|
bind -t vi-copy Space page-down
|
|
bind -t vi-copy f page-down
|
|
bind -t vi-copy b page-up
|
|
bind -t vi-copy e scroll-down
|
|
bind -t vi-copy y scroll-up
|
|
#}}}
|
|
|
|
#version greate than 2.0# {{{
|
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "set -g mouse on"
|
|
# if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "set -g renumber-windows on"
|
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "setw -g -q utf8 on"
|
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "set -g -q status-utf8 on"
|
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "bind -t vi-copy d halfpage-down"
|
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "bind -t vi-copy u halfpage-up"
|
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "bind -t vi-copy a append-selection"
|
|
# }}}
|
|
#version less than 2.0# {{{
|
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -lt '2' ]" "set -g mouse-resize-pane on"
|
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -lt '2' ]" "set -g mouse-select-pane on"
|
|
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -lt '2' ]" "set -g mouse-select-window on"
|
|
# }}}
|