Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View yifeikong's full-sized avatar

Yifei yifeikong

View GitHub Profile
0402fc0c2fd7657f1c9a118fd2568b6e35cd0c5d7fac901f4dfa7d3ca6c83aeae03ce7bc694cf183eb1c9b09af88edaddeb0b90b892cbcd18a1a1990fa6ec671ac
#!/usr/bin/env bash
# Save and restore the state of tmux sessions and windows.
# TODO: persist and restore the state & position of panes.
set -e
dump() {
local d=$'\t'
tmux list-windows -a -F "#S${d}#W${d}#{pane_current_path}"
}