tmux: add resurrect to save/restore pane/window layout
This commit is contained in:
parent
e1160acbe1
commit
2f2a9657c2
47 changed files with 2579 additions and 0 deletions
22
.config/tmux/plugins/resurrect/save_command_strategies/pgrep.sh
Executable file
22
.config/tmux/plugins/resurrect/save_command_strategies/pgrep.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
PANE_PID="$1"
|
||||
|
||||
exit_safely_if_empty_ppid() {
|
||||
if [ -z "$PANE_PID" ]; then
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
full_command() {
|
||||
\pgrep -lf -P "$PANE_PID" |
|
||||
cut -d' ' -f2-
|
||||
}
|
||||
|
||||
main() {
|
||||
exit_safely_if_empty_ppid
|
||||
full_command
|
||||
}
|
||||
main
|
||||
Loading…
Add table
Add a link
Reference in a new issue