aboutsummaryrefslogtreecommitdiff
path: root/.config/tmux
diff options
context:
space:
mode:
Diffstat (limited to '.config/tmux')
-rw-r--r--.config/tmux/tmux.conf9
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
index 0d33568..394ae34 100644
--- a/.config/tmux/tmux.conf
+++ b/.config/tmux/tmux.conf
@@ -57,6 +57,15 @@ set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Shift up/down copy-mode without prefix
bind-key -n S-Up copy-mode \; send-key Up
bind-key -n S-Down copy-mode \; send-key Down
+bind-key -n Pageup copy-mode \; send-key Pageup
+bind-key -n Pagedown copy-mode \; send-key Pagedown
+is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
+ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
+#bind -n M-k if-shell "$is_vim" "send-keys Pageup" "copy-mode -u"
+bind -n Pageup if-shell "$is_vim" "send-keys Pageup" "copy-mode -u"
+bind -n S-Pageup if-shell "$is_vim" "send-keys Pageup" "copy-mode -u"
+bind -n S-Pagedown send-keys Pagedown
+#bind -n M-j send-keys Pagedown
# Focus events, allow supported requests from applications to passthrough/run in tmux
set-option -g focus-events on