Skip to content

Instantly share code, notes, and snippets.

View rlychrisg's full-sized avatar

Chris G rlychrisg

View GitHub Profile
@rlychrisg
rlychrisg / tmux_panefocus.sh
Created June 25, 2025 18:37
quickly cycle between last pane across all windows of a session. also add a little flash when changing focus to a new pane.
#!/bin/bash
## about
# this does two things 1) provides a visual indicator when moving between panes
# 2) cleverly cycles between the previous pane on all windows across the session.
# NOTE this script does echo out every single tmux focus switch to a file in /tmp/
# so unless you turn your machine off every night you'll want to find some way of
# dealing with that.