diff --git a/.gitmodules b/.gitmodules index ca61747..21898a1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -52,3 +52,6 @@ [submodule "tmux/tmux-mode-indicator"] path = config/tmux/plugins/tmux-mode-indicator url = https://github.com/MunifTanjim/tmux-mode-indicator.git +[submodule "tmux/tmux-current-pane-hostname"] + path = config/tmux/plugins/tmux-current-pane-hostname + url = https://github.com/soyuka/tmux-current-pane-hostname.git diff --git a/add-submodules.sh b/add-submodules.sh index 1c8aab3..61be931 100755 --- a/add-submodules.sh +++ b/add-submodules.sh @@ -31,6 +31,8 @@ git submodule add --name tmux/tmux-window-name \ -f https://github.com/ofirgall/tmux-window-name.git config/tmux/plugins/tmux-window-name git submodule add --name tmux/tmux-yank \ -f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank +git submodule add --name tmux/tmux-current-pane-hostname \ + -f https://github.com/soyuka/tmux-current-pane-hostname.git config/tmux/plugins/tmux-current-pane-hostname # Takes submodules and sets them to ignore all changes for MODULE in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'); do diff --git a/config/tmux/plugins/tmux-current-pane-hostname b/config/tmux/plugins/tmux-current-pane-hostname new file mode 160000 index 0000000..6bb3c95 --- /dev/null +++ b/config/tmux/plugins/tmux-current-pane-hostname @@ -0,0 +1 @@ +Subproject commit 6bb3c95250f8120d8b072f46a807d2678ecbc97c diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index a029981..132a943 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -8,8 +8,8 @@ # │ Bindings │ # ╰──────────────────────────────────────────────────────────╯ -# Set to Control + Space -unbind C-b +# Set to Control + Space, keeping the default of C-b intact. +# unbind C-b set -g prefix C-Space bind C-Space send-prefix @@ -105,7 +105,7 @@ set-option -g window-status-format ' #I:#W ' set-window-option -g window-status-current-style 'fg=#111111,bg=#7aa2f7' set-option -g window-status-current-format ' #I:#W#{?window_zoomed_flag,  , } ' -set-option -g status-left "#S" +set-option -g status-left "#{?#{pane_ssh_connected},#{hostname_short}/,}#S" set-option -g status-right "%H:%M #{tmux_mode_indicator}" # ╭──────────────────────────────────────────────────────────╮ @@ -152,4 +152,5 @@ run-shell ~/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux run-shell ~/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux run-shell ~/.dotfiles/config/tmux/plugins/tmux-suspend/suspend.tmux run-shell ~/.dotfiles/config/tmux/plugins/tmux-yank/yank.tmux +run-shell ~/.dotfiles/config/tmux/plugins/tmux-current-pane-hostname/current_pane_hostname.tmux