diff --git a/apps/shell/tmux/conf b/apps/shell/tmux/conf index ccfff83..2ca5127 100644 --- a/apps/shell/tmux/conf +++ b/apps/shell/tmux/conf @@ -63,7 +63,7 @@ set -g status-left-length 200 set -g status-left "#[fg=colour7]#(~/.config/dotfiles/bin/tmux-session-list #S)" set -g message-style "fg=colour7 bg=colour18" -bind-key O display-message "#(tmux-save-buffer #S)" +bind-key O display-message "#(~/.config/dotfiles/bin/tmux-save-buffer #S)" # pane split line colors set -g pane-active-border-style bg=black,fg=blue @@ -155,3 +155,5 @@ run "~/.config/tmux/plugins/tpm/tpm" # refresh-client -S unbind-key C-p + +set -g @resurrect-hook-pre-restore-pane-processes 'tmux switch-client -n && tmux kill-session -t 0' diff --git a/bin/tmux-save-buffer b/bin/tmux-save-buffer index e32cb67..49d2253 100755 --- a/bin/tmux-save-buffer +++ b/bin/tmux-save-buffer @@ -1,6 +1,8 @@ #!/usr/bin/env sh -prelude +. ~/.config/dotfiles/bin/prelude + +echo "${USER_LOGS_PATH}" sess="$1"; shift d="$(date +%Y-%m-%d_%H-%M-%S)" @@ -8,4 +10,4 @@ f="${USER_LOGS_PATH}/${d}.${sess}.tmux-buffer.log" touch "$f" chmod 600 "$f" tmux capture-pane -pS -1000000000 > "$f" -echo "$f" +echo "Saved output to $f"