Skip to content

Instantly share code, notes, and snippets.

@wsgac
Created February 11, 2019 15:30
Show Gist options
  • Save wsgac/e31ff633ad4927e3d0afd822256b275c to your computer and use it in GitHub Desktop.
Save wsgac/e31ff633ad4927e3d0afd822256b275c to your computer and use it in GitHub Desktop.
Override Tmux's window switcher to display pane numbers upon switch
# Invoke our custom command when switching windows
bind -T prefix n run "tmux-switch-windows n"
bind -T prefix p run "tmux-switch-windows p"
#!/bin/sh
# -*-sh-*-
# This file needs to be placed somewhere in $PATH for Tmux to see.
case $1 in
"p") tmux previous-window ;;
"n") tmux next-window ;;
esac
tmux display-panes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment