Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christian Salzmann-Jaeckel
tmux-resurrect
Commits
5dc22a4a
Unverified
Commit
5dc22a4a
authored
Feb 09, 2015
by
Bruno Sutic
Browse files
Restore grouped sessions
parent
bfc625e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
5dc22a4a
...
...
@@ -3,6 +3,7 @@
### master
-
add link to the wiki page for "first pane/window issue" to the README as well
as other tweaks
-
save and restore grouped sessions (used with multi-monitor workflow)
### v1.5.0, 2014-11-09
-
add support for restoring neovim sessions
...
...
scripts/restore.sh
View file @
5dc22a4a
...
...
@@ -183,6 +183,22 @@ restore_active_pane_for_each_window() {
done
}
restore_grouped_session
()
{
local
grouped_session
=
"
$1
"
echo
"
$grouped_session
"
|
while
IFS
=
$'
\t
'
read
line_type grouped_session original_session
;
do
TMUX
=
""
tmux
-S
"
$(
tmux_socket
)
"
new-session
-d
-s
"
$grouped_session
"
-t
"
$original_session
"
done
}
restore_grouped_sessions
()
{
while
read
line
;
do
if
is_line_type
"grouped_session"
"
$line
"
;
then
restore_grouped_session
"
$line
"
fi
done
<
$(
last_resurrect_file
)
}
restore_active_and_alternate_windows
()
{
awk
'BEGIN { FS="\t"; OFS="\t" } /^window/ && $5 ~ /[*-]/ { print $2, $4, $3; }'
$(
last_resurrect_file
)
|
sort
-u
|
...
...
@@ -211,6 +227,7 @@ main() {
# below functions restore exact cursor positions
restore_active_pane_for_each_window
restore_zoomed_windows
restore_grouped_sessions
restore_active_and_alternate_windows
restore_active_and_alternate_sessions
stop_spinner
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment