Commit Graph

55 Commits

Author SHA1 Message Date
Bruno Sutic
ca6468e2de
Fix restoring active/alternate windows 2022-05-01 17:32:14 +02:00
Bruno Sutic
6050d2d8d8
Remove deprecated "restoring shell history" 2022-04-10 08:58:27 +02:00
Jiří Málek
1ad109d3a8
Adds support for saving and restoring pane titles. 2022-04-09 13:52:28 +02:00
Bruno Sutic
027960ad25
Explain delayed pane content cleanup 2021-12-19 16:21:44 +01:00
Ali Ghaffaari
c3d0599a6e Fix #141
The issue apprently happens when using fish as the default shell. This commit
fixes this issue by postponing `restore/pane_contents` clean-up after calling
`restore_active_pane_for_each_window` (scripts/restore.sh:392). It might also
fix #192.
2021-12-19 12:50:20 +01:00
Bruno Sutic
6be2f34b5f
automatic-rename: changelog and comments 2021-08-30 14:17:15 +02:00
A Farzat
3e8fbdf7aa Make window_name variable local in restoring func
In restore_window_properties function, the window_name is set globally
at first, but now it is first declared as local to prevent that from
happening.
2021-08-27 18:02:00 +09:00
A Farzat
1b63a940a0 Fix even more bugs in before last commit
First, increment the relevant indices in the awk statements regarding
windows, as now the window_name entry exists.

Second, remove the window_name entry from the dump_pane_contents and
dump_shell_history functions as it no longer exists in the format.
2021-08-27 15:57:26 +09:00
A Farzat
02a7f1f9d6 Fix some of the errors in the last commit
First, make sure to include the ":" placeholder in the window_name
format.

Second, decrement the indices in relevant awk commands to make sure they
point to the right items.
2021-08-27 13:27:00 +09:00
A Farzat
6c9322aa99 Leave window name handling to windows
Previously, window names were set when creating panes and were therefore
saved with pane data. However, saving the names with window data is more
intuitive and easier to manage. In addition, one can set the name and
automatic-rename options in the same function, so one can make sure that
renaming the windows will not overwrite the automatic-rename option.
2021-08-26 07:00:49 +09:00
A Farzat
80adb917c1 Maintain the value of automatic-rename
When the session is restored, the windows are renamed to their original
names switching off automatic-rename, which can be undesirable.
Therefore the value of automatic-rename is now saved for each window and
restored after the renaming.

If the value is set, that value is saved and then applied. Otherwise, a
placeholder of ':' is placed instead, in which case the local option is
unset for that window (as it originally was).
2021-08-23 14:04:11 +09:00
Yordan Georgiev
716b958145
enable tilde expansion ( aka ~ ) into /home/ubuntu in saved session files's paths 2021-07-05 09:53:56 +02:00
Diego Ximenes
b6cbf652c4 Fix rename-window's target-window during restore 2020-09-18 00:47:32 -03:00
Bruno Sutic
5f5f9d8fd5
Kill session 0 if it's not restored 2020-08-03 08:58:41 +02:00
Bruno Sutic
78d67e4dcb
Merge pull request #211 from malkomalko/mm-rename-window
actually rename windows when restoring
2020-07-27 09:18:18 +02:00
Bruno Sutic
905abba3c3
Merge pull request #283 from rummik/cmdline
Add cmdline save strategy
2019-12-17 18:03:06 +01:00
Helmut K. C. Tessarek
1160c1da71
only add -l when default_shell is bash 2019-12-06 13:00:39 +01:00
*Kim Zick (rummik)
ac8a446667 Remove lingering code from base64-dependent cmdline solution 2019-01-07 11:34:59 -05:00
*Kim Zick (rummik)
913f693f80 Remove cmdline dependency on base64 and perl 2018-12-28 19:37:33 -05:00
*Kim Zick (rummik)
15cabbb930 Fixes for cmdline save/restore strategy 2018-12-28 17:16:53 -05:00
donat-b
edd8132bef Add cmdline strategy 2018-12-27 22:45:15 -05:00
Lars Wilke
9187f8b377 Fix #94 start default-shell as login shell.
If pane content is restored and no default-command is set, restore.sh
falls back to default-shell, which tmux sets automatically and calls as
a login shell.

In pane_creation_command() we need to make sure to call default-shell as a login shell.
As tmux does. But take care not to call default-command as a login shell.
2018-12-10 10:43:16 +01:00
Bruno Sutic
b020b2481e
Merge pull request #220 from kevinkjt2000/fix-issue-95
fix #95 restore name of first window
2018-11-30 13:29:24 +01:00
Ash Berlin-Taylor
8aa999c591 Add more hook points
And make the hook calling simpler at the call site.
2018-08-20 12:17:43 +01:00
Sergey Vlasov
0133c7a96a Save and restore hooks 2018-08-17 20:19:27 +01:00
Kevin Tindall
8f3f8d7cb9
fix #95 restore name of first window 2017-12-03 22:11:51 -06:00
Robert Malko
365a2e78ae
actually rename windows when restoring 2017-10-30 08:40:56 -07:00
Mohammad Alsaleh
655ed8c6f4
Add @resurrect-save-shell-history option
Also make @resurrect-save-bash-history an alias to the new option.

Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com>
2017-06-04 00:16:51 +02:00
Mohammad Alsaleh
e757e1b8a9
Add zsh support in save/restore functions
Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com>
2017-06-04 00:15:01 +02:00
Bruno Sutic
b7a4ee2a40
Pane contents save and restore in separate dirs 2017-06-01 05:47:09 +02:00
Bruno Sutic
ba59a2b642
Revert "remove pane contents cleanup to repair restore"
This reverts commit 0a6f90788f.
2017-05-30 06:14:21 +02:00
Bruno Sutic
8de2570960 Merge pull request #193 from Mellbourn/restore-pane-fix
remove pane contents cleanup to repair restore
2017-05-30 05:49:13 +02:00
Klas Mellbourn
0a6f90788f remove pane contents cleanup to repair restore
as suggested in https://github.com/tmux-plugins/tmux-resurrect/issues/141
2017-05-07 19:35:06 +02:00
Klas Mellbourn
71fd3c8dd2 remove terminal clearing since it collides with capture-pane-contents 2017-05-06 00:37:13 +02:00
Heath Naylor
3bc852bbae Fix comparision operators. Fixes #124 2016-01-29 09:41:52 -07:00
Bruno Sutic
a47236d247
Implement pane content files compression 2015-07-10 18:01:20 +02:00
Bruno Sutic
74773bed62
Save pane contents only if pane not blank 2015-07-08 00:02:20 +02:00
Bruno Sutic
aa0b424ca6
Refactoring 2015-07-07 23:35:41 +02:00
Bruno Sutic
8af7aed9b3
Bugfix for pane contents restoration 2015-05-12 13:31:13 +02:00
Bruno Sutic
c85a3b4487
Improve pane content restore: remove extra cat 2015-05-09 14:05:51 +02:00
quentin
b22b2a7203 Save and restore tmux pane contents
This feature is controlled by the '@resurrect-capture-pane-contents'
option.
Currently only the visible area of each pane is saved and restored.
2015-03-17 03:17:37 +01:00
Bruno Sutic
b7e7669999
Improve fetching "window_layout" value
It's faster now.
2015-02-12 14:10:56 +01:00
Bruno Sutic
708cd49d31
Fix a zoomed windows related regression 2015-02-12 12:47:09 +01:00
Bruno Sutic
c4375bf642
Enable 'full restore' by overwriting a single pane 2015-02-10 15:16:26 +01:00
Bruno Sutic
ddf9c5ef87
Reorder function in restore script 2015-02-10 13:44:14 +01:00
Bruno Sutic
028e7b7c2e
Refactoring: prefer using variable with tab character 2015-02-10 12:48:53 +01:00
Bruno Sutic
b502572a07
Restore active and alternate windows only if they are present in the 'last' file 2015-02-10 12:48:53 +01:00
Bruno Sutic
95ec3c1d9b
Save and restore active and alternate windows for grouped sessions 2015-02-10 12:48:53 +01:00
Bruno Sutic
5dc22a4a9b
Restore grouped sessions 2015-02-10 12:48:53 +01:00
Arno Mayrhofer
ad52ade4bf Preserving layout of zoomed windows across restores
The problem is that tmux list-window shows only the current pane layout
if a pane is maximized. This is a bug in tmux. In order to avoid this
bug we unzoom the window when saving and zoom in again after saving.
This implies that the Z flag is no longer set in list-windows, and so it
can't be used when restoring. Instead we use the Z flag of the panes
(which still have it) to restore the zoom.
2014-10-25 18:29:52 +02:00