From cff4b96399e26b356d3a43a324223c58c0764464 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 18 Jul 2018 19:12:41 +0800 Subject: tmux.conf: Add bind P to save scrollback to file --- _tmux.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_tmux.conf b/_tmux.conf index 40018a3..c03c17e 100644 --- a/_tmux.conf +++ b/_tmux.conf @@ -33,6 +33,7 @@ # Aaron LI # 2015-01-22 # +# 2018-03-24: Add bind P to save scrollback to file # 2017-11-25: Tweak styles/format # 2017-11-21: Increase scrollback history # 2017-09-04: Tweak and fix several mistakes; more tweaks @@ -152,6 +153,11 @@ bind , command-prompt -p "(rename-window '#W')" "rename-window '%%'" # Do the same for session renaming bind '$' command-prompt -p "(rename-session '#S')" "rename-session '%%'" +# Save all scrollback to a file +# Credit: https://unix.stackexchange.com/a/26568 +bind P command-prompt -p 'save history to filename:' \ + -I '~/tmux.history' 'capture-pane -S - ; save-buffer %1 ; delete-buffer' + # Copy & paste bind Escape copy-mode bind p paste-buffer @@ -188,7 +194,7 @@ setw -g window-status-current-format \ # Window mode setw -g mode-style "fg=yellow,bg=default,bold" -setw -g clock-mode-colour yellow +setw -g clock-mode-colour green setw -g clock-mode-style 24 # Messaging -- cgit v1.2.2