Skip to content

Instantly share code, notes, and snippets.

@Frankz
Forked from Neo-Oli/.tmux.conf
Created February 12, 2018 07:40
Show Gist options
  • Save Frankz/75c01a023d6aae39fd8a8557c30c9fd3 to your computer and use it in GitHub Desktop.
Save Frankz/75c01a023d6aae39fd8a8557c30c9fd3 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment