1
0
forked from x/ContextOS

opt tmux.conf

This commit is contained in:
shaoying 2020-03-19 15:51:06 +08:00
parent 891e66994f
commit d36e046761
3 changed files with 22 additions and 23 deletions

View File

@ -12,38 +12,37 @@ set -g mode-keys vi
set -gw other-pane-width 60 set -gw other-pane-width 60
set -gw other-pane-height 15 set -gw other-pane-height 15
set -gw other-pane-height 15
# 标题栏
set -g set-titles on set -g set-titles on
set -g set-titles-string "#(whoami)@#h/#{session_name}:#{window_name}.#{pane_index} #{pane_current_command}" set -g set-titles-string "#S:#W.#P"
# 状态栏
set -g allow-rename off
set -g status-interval 1 set -g status-interval 1
set -g status-left-length 60 set -g status-left-length 60
set -g status-left "#[bg=red fg=white]\ [#h/#S]\ #[bg=yellow fg=black]\ [#{pane_height},#{pane_width}]\ #[bg=red]"
set -g status-right "#[bg=yellow]\ [#(date '+%Y-%m-%d %H:%M:%S')]\ "
set -g status-right-length 60 set -g status-right-length 60
# set -g status-left "#[bg=red]\ [#H/#S]\ #[bg=yellow]\ [#{cursor_y},#{cursor_x};#{pane_height},#{pane_width}]\ "
set -g status-left "#[bg=red]\ [#h/#S]\ #[bg=yellow]\ [#{cursor_y},#{cursor_x};#{pane_height},#{pane_width}]\ "
set -g status-right "#[bg=yellow]\ [#(date '+%Y-%m-%d %H:%M:%S')]\ #[bg=red]\ [#{pane_current_path}]\ "
set -gw window-status-current-format "#[bg=magenta]\ [#I:#W.#{pane_index}#F#{?pane_in_mode,COPY,}]\ "
set -gw window-status-format "#[fg=blue]\ [#I:#W.#{pane_index}#F]\ "
set -gw window-status-separator "" set -gw window-status-separator ""
set -g allow-rename off set -gw window-status-format "#[fg=blue]\ [#I:#W.#{pane_index}#F]\ "
set -gw window-status-current-format "#[bg=red fg=white]\ [#I:#W.#{pane_index}#F#{?pane_in_mode,COPY,}]\ "
# }}} # }}}
# 会话管理{{{ # 会话管理{{{
bind s choose-tree -u bind s choose-tree -u
bind q confirm-before "detach-client" bind q confirm-before "detach-client"
# }}} # }}}
# 窗口管理{{{ # 窗口管理{{{
bind c new-window
bind b break-pane bind b break-pane
bind B command-prompt -p "target pane:" "join-pane -v -t %%" bind c new-window
bind e command-prompt -p "window new name:" "rename-window '%%'" bind e command-prompt -p "window new name:" "rename-window '%%'"
bind B command-prompt -p "target window:" "join-pane -v -t %%"
bind m choose-tree -suw -c "swap-window -t %%" bind m choose-tree -suw -c "swap-window -t %%"
bind o last-window
bind n next-window
bind p previous-window bind p previous-window
bind n next-window
bind o last-window
# }}} # }}}
# 面板管理{{{ # 面板管理{{{
bind i display-panes bind i display-panes
@ -80,14 +79,12 @@ bind -t vi-copy Space begin-selection
# }}} # }}}
# 命令管理{{{ # 命令管理{{{
bind Space command-prompt bind Space command-prompt
bind ! command-prompt "run-shell %%"
bind @ confirm-before "source-file ~/.tmux.conf"
bind -t vi-edit C-n history-down
bind -t vi-edit C-p history-up bind -t vi-edit C-p history-up
bind -t vi-edit C-b cursor-left bind -t vi-edit C-n history-down
bind -t vi-edit C-f cursor-right bind -t vi-edit C-f cursor-right
bind -t vi-edit C-b cursor-left
bind -t vi-edit C-j enter bind -t vi-edit C-j enter
# }}} # }}}
source-file ~/.tmux_local if-shell "[ -e ~/.tmux_local ]" "source-file ~/.tmux_local"

6
go.mod
View File

@ -3,10 +3,10 @@ module contexts
go 1.13 go 1.13
require ( require (
github.com/shylinux/icebergs v0.1.19 github.com/shylinux/icebergs v0.1.20
github.com/shylinux/linux-story v0.0.0-20200316075352-8fb93659909a // indirect github.com/shylinux/linux-story v0.0.0-20200316075352-8fb93659909a // indirect
) )
// replace github.com/shylinux/icebergs => ./usr/icebergs replace github.com/shylinux/icebergs => ./usr/icebergs
// replace github.com/shylinux/toolkits => ./usr/toolkits replace github.com/shylinux/toolkits => ./usr/toolkits

2
go.sum
View File

@ -14,6 +14,8 @@ github.com/shylinux/icebergs v0.1.18 h1:P/7/h3MkKW3lx2Vj/jlaYWwgdzSP7he/4R6Diy9U
github.com/shylinux/icebergs v0.1.18/go.mod h1:tKj0hsss2irljPmeBf2dcsgQSxa+nakiXjhI00i/cww= github.com/shylinux/icebergs v0.1.18/go.mod h1:tKj0hsss2irljPmeBf2dcsgQSxa+nakiXjhI00i/cww=
github.com/shylinux/icebergs v0.1.19 h1:9D2f5CKFKF2dqmDF36jmsEiMj9quZ/ZhWXnltSU/1A8= github.com/shylinux/icebergs v0.1.19 h1:9D2f5CKFKF2dqmDF36jmsEiMj9quZ/ZhWXnltSU/1A8=
github.com/shylinux/icebergs v0.1.19/go.mod h1:ZAhyYiOZR3x6BE4FAMfPUN+0eYhH5aglz2KYDG3WLEk= github.com/shylinux/icebergs v0.1.19/go.mod h1:ZAhyYiOZR3x6BE4FAMfPUN+0eYhH5aglz2KYDG3WLEk=
github.com/shylinux/icebergs v0.1.20 h1:NjXC+Hxg0Xg3sT5yJsHnUih7kpB6zXPe4plQUMp0rMM=
github.com/shylinux/icebergs v0.1.20/go.mod h1:ZAhyYiOZR3x6BE4FAMfPUN+0eYhH5aglz2KYDG3WLEk=
github.com/shylinux/linux-story v0.0.0-20200316075352-8fb93659909a h1:qCI58kuU/6HiFQLmnUAFI/M62HR/7ZgLs6hokMvwmSY= github.com/shylinux/linux-story v0.0.0-20200316075352-8fb93659909a h1:qCI58kuU/6HiFQLmnUAFI/M62HR/7ZgLs6hokMvwmSY=
github.com/shylinux/linux-story v0.0.0-20200316075352-8fb93659909a/go.mod h1:zCLHbPPSJ1bJ+84Q7HigCNVBgjhFzHhQC84BNPAHnzM= github.com/shylinux/linux-story v0.0.0-20200316075352-8fb93659909a/go.mod h1:zCLHbPPSJ1bJ+84Q7HigCNVBgjhFzHhQC84BNPAHnzM=
github.com/shylinux/toolkits v0.1.1 h1:w/EjFjRB4V/fIRGXl3zU8MEf647DH2oLswTwGIwF3VM= github.com/shylinux/toolkits v0.1.1 h1:w/EjFjRB4V/fIRGXl3zU8MEf647DH2oLswTwGIwF3VM=