aboutsummaryrefslogtreecommitdiff
path: root/.config/tmux
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-09-20 23:46:06 +0200
committersrdusr <trevorgray@srdusr.com>2023-09-20 23:46:06 +0200
commit785c8558e87d835f31d2f855457891746fb0baa0 (patch)
tree51b5cb72f1c6b9834cab1a94ca17a59b2a41e969 /.config/tmux
parent661b363fc7ac02c1c9a807596647a003d15eb7fb (diff)
downloaddotfiles-785c8558e87d835f31d2f855457891746fb0baa0.tar.gz
dotfiles-785c8558e87d835f31d2f855457891746fb0baa0.zip
More settings related to scroll keys
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