From 785c8558e87d835f31d2f855457891746fb0baa0 Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 20 Sep 2023 23:46:06 +0200 Subject: More settings related to scroll keys --- .config/tmux/tmux.conf | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.2.3