aboutsummaryrefslogtreecommitdiffstats
path: root/_tmux.conf
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-07-18 19:12:41 +0800
committerAaron LI <aly@aaronly.me>2018-07-18 19:12:41 +0800
commitcff4b96399e26b356d3a43a324223c58c0764464 (patch)
tree31100589ae99e3926eee6262dd7d9ac717fe08cf /_tmux.conf
parentf88efcdd78943965700f1c7ad6d148f75f74976d (diff)
downloaddotfiles-cff4b96399e26b356d3a43a324223c58c0764464.tar.bz2
tmux.conf: Add bind P to save scrollback to file
Diffstat (limited to '_tmux.conf')
-rw-r--r--_tmux.conf8
1 files changed, 7 insertions, 1 deletions
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