mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-12-23 07:18:57 +00:00
parent
05cf790493
commit
cedd1292c1
@ -8,6 +8,7 @@
|
||||
- if pane exists from before session restore - do not restore the process within
|
||||
it. This makes the restoration process even more idempotent.
|
||||
- more panes within a window can now be restored
|
||||
- restore window zoom state
|
||||
|
||||
### v0.2.0, 2014-08-29
|
||||
- bugfix: with vim 'session' strategy, if the session file does not exist - make
|
||||
|
@ -28,6 +28,7 @@ This plugin goes to great lengths to save and restore all the details from your
|
||||
- **exact pane layouts** within windows
|
||||
- active and alternative session
|
||||
- active and alternative window for each session
|
||||
- windows with focus
|
||||
- active pane for each window
|
||||
- programs running within a pane! More details in the
|
||||
[configuration section](#configuration).
|
||||
|
@ -160,13 +160,20 @@ restore_pane_layout_for_each_window() {
|
||||
}
|
||||
|
||||
restore_active_pane_for_each_window() {
|
||||
awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ && $7 != 0 && $9 == 1 { print $2, $3, $7; }' $(last_session_path) |
|
||||
awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ && $9 == 1 { print $2, $3, $7; }' $(last_session_path) |
|
||||
while IFS=$'\t' read session_name window_number active_pane; do
|
||||
tmux switch-client -t "${session_name}:${window_number}"
|
||||
tmux select-pane -t "$active_pane"
|
||||
done
|
||||
}
|
||||
|
||||
restore_zoomed_windows() {
|
||||
awk 'BEGIN { FS="\t"; OFS="\t" } /^window/ && $5 ~ /Z/ { print $2, $3; }' $(last_session_path) |
|
||||
while IFS=$'\t' read session_name window_number; do
|
||||
tmux resize-pane -t "${session_name}:${window_number}" -Z
|
||||
done
|
||||
}
|
||||
|
||||
restore_active_and_alternate_windows() {
|
||||
awk 'BEGIN { FS="\t"; OFS="\t" } /^window/ && $5 ~ /[*-]/ { print $2, $4, $3; }' $(last_session_path) |
|
||||
sort -u |
|
||||
@ -191,6 +198,7 @@ main() {
|
||||
restore_all_pane_processes
|
||||
# below functions restore exact cursor positions
|
||||
restore_active_pane_for_each_window
|
||||
restore_zoomed_windows
|
||||
restore_active_and_alternate_windows
|
||||
restore_active_and_alternate_sessions
|
||||
stop_spinner
|
||||
|
Loading…
Reference in New Issue
Block a user