diff --git a/etc/conf/tmux.conf b/etc/conf/tmux.conf index 57b30454..5209998e 100644 --- a/etc/conf/tmux.conf +++ b/etc/conf/tmux.conf @@ -1,4 +1,4 @@ -# 配置管理{{{ +# 配置管理 {{{ set -g prefix C-s set -g base-index 1 @@ -12,38 +12,37 @@ set -g mode-keys vi set -gw other-pane-width 60 set -gw other-pane-height 15 -set -gw other-pane-height 15 +# 标题栏 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-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-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 -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 q confirm-before "detach-client" # }}} # 窗口管理{{{ -bind c new-window 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 B command-prompt -p "target window:" "join-pane -v -t %%" bind m choose-tree -suw -c "swap-window -t %%" -bind o last-window -bind n next-window bind p previous-window +bind n next-window +bind o last-window # }}} # 面板管理{{{ bind i display-panes @@ -80,14 +79,12 @@ bind -t vi-copy Space begin-selection # }}} # 命令管理{{{ 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-b cursor-left +bind -t vi-edit C-n history-down bind -t vi-edit C-f cursor-right +bind -t vi-edit C-b cursor-left bind -t vi-edit C-j enter # }}} -source-file ~/.tmux_local +if-shell "[ -e ~/.tmux_local ]" "source-file ~/.tmux_local" diff --git a/go.mod b/go.mod index 1dbb3aa9..2c9f5d2b 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,10 @@ module contexts go 1.13 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 ) -// 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 diff --git a/go.sum b/go.sum index acd7c9e6..a42a29c3 100644 --- a/go.sum +++ b/go.sum @@ -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.19 h1:9D2f5CKFKF2dqmDF36jmsEiMj9quZ/ZhWXnltSU/1A8= 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/go.mod h1:zCLHbPPSJ1bJ+84Q7HigCNVBgjhFzHhQC84BNPAHnzM= github.com/shylinux/toolkits v0.1.1 h1:w/EjFjRB4V/fIRGXl3zU8MEf647DH2oLswTwGIwF3VM=