Skip to content

Instantly share code, notes, and snippets.

@Neo-Oli
Last active August 3, 2024 22:39
Show Gist options
  • Save Neo-Oli/8c5dcb1c75b59b8bf4474105f758e9ca to your computer and use it in GitHub Desktop.
Save Neo-Oli/8c5dcb1c75b59b8bf4474105f758e9ca to your computer and use it in GitHub Desktop.
Tmux settings for termux
set-option -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# Resize panes with arrow keys because alt-arrow keys doesn't work
bind-key -r Up resize-pane -U
bind-key -r Down resize-pane -D
bind-key -r Left resize-pane -L
bind-key -r Right resize-pane -R
# urlscan as context and url view
# install urlscan with
# pip install urlscan
bind-key u capture-pane \; save-buffer $TMPDIR/tmux-buffer \; \
new-window -n "urlscan" '$SHELL -c "urlscan < $TMPDIR/tmux-buffer"'
# Make scrolling in less and similar programms work in termux without using arrow keys
# Run this to install
# git clone https://github.com/nhdaly/tmux-better-mouse-mode ~/.tmux/plugins/tmux-better-mouse-mode
# termux-fix-shebang ~/.tmux/plugins/tmux-better-mouse-mode/scroll_copy_mode.tmux
set -g @scroll-without-changing-pane on
set -g @scroll-speed-num-lines-per-scroll 1
set -g @emulate-scroll-for-no-mouse-alternate-buffer on
run-shell ~/.tmux/plugins/tmux-better-mouse-mode/scroll_copy_mode.tmux
@seisdr
Copy link

seisdr commented Aug 3, 2024

Please how to scroll I'm going insane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment