Skip to content

Commit bc20297

Browse files
author
Bruno Sutic
committed
Extract docs to separate files
1 parent 7d875df commit bc20297

File tree

3 files changed

+87
-90
lines changed

3 files changed

+87
-90
lines changed

README.md

Lines changed: 10 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ Together these features enable uninterrupted tmux usage. No matter the computer
1010
or server restarts, if the machine is on, tmux will be there how you left it off
1111
the last time it was used.
1212

13-
Note: this plugin was recently renamed from `tmux-resurrect-auto` to
14-
`tmux-continuum`. Option names have changed too, so don't forget to update them
15-
if you're doing an upgrade.
16-
1713
#### Continuous saving
1814

1915
Tmux environment will be saved at the interval of 15 minutes. All the saving
@@ -44,9 +40,8 @@ action (e.g. sourcing `tmux.conf`) triggers this.
4440

4541
### Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) (recommended)
4642

47-
Please make sure you have the latest version of
48-
[tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect) installed (as
49-
of Feb 2015).
43+
Please make sure you have
44+
[tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect) installed.
5045

5146
Add plugin to the list of TPM plugins in `.tmux.conf`:
5247

@@ -58,9 +53,8 @@ automatically start "working" in the background, no action required.
5853

5954
### Manual Installation
6055

61-
Please make sure you have the latest version of
62-
[tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect) installed (as
63-
of Feb 2015).
56+
Please make sure you have
57+
[tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect) installed.
6458

6559
Clone the repo:
6660

@@ -70,91 +64,17 @@ Add this line to the bottom of `.tmux.conf`:
7064

7165
run-shell ~/clone/path/continuum.tmux
7266

73-
Reload TMUX environment:
74-
75-
# type this in terminal
76-
$ tmux source-file ~/.tmux.conf
67+
Reload TMUX environment with: `$ tmux source-file ~/.tmux.conf`
7768

7869
The plugin will automatically start "working" in the background, no action
7970
required.
8071

81-
### FAQ
82-
83-
> Will a previous save be overwritten immediately after I start tmux?
84-
85-
No, first automatic save starts 15 minutes after tmux is started. If automatic
86-
restore is not enabled, that gives you enough time to manually restore from a
87-
previous save.
88-
89-
> I want to make a restore to a previous point in time, but it seems that save
90-
is now overwritten?
91-
92-
None of the previous saves are deleted (unless you explicitly do that). All save
93-
files are kept in `~/.tmux/resurrect/` directory.<br/>
94-
Here are the steps to restore to a previous point in time:
95-
96-
- make sure you start this with a "fresh" tmux instance
97-
- `$ cd ~/.tmux/resurrect/`
98-
- locate the save file you'd like to use for restore (file names have a timestamp)
99-
- symlink the `last` file to the desired save file: `$ ln -sf <file_name> last`
100-
- do a restore with `tmux-resurrect` key: `prefix + Ctrl-r`
101-
102-
You should now be restored to the time when `<file_name>` save happened.
103-
104-
> Will this plugin fill my hard disk?
105-
106-
Most likely no. A regular save file is in the range of 5Kb. That said, it
107-
would be good to clean out old save files from `~/.tmux/resurrect/` dir from
108-
time to time.
109-
110-
> How do I change the save interval to i.e. 1 hour?
111-
112-
The interval is always measured in minutes. So setting the interval to `60`
113-
(minutes) will do the trick. Put this in `.tmux.conf`:
114-
115-
set -g @continuum-save-interval '60'
116-
117-
and then source `tmux.conf` by executing this command in the shell
118-
`$ tmux source-file ~/.tmux.conf`.
119-
120-
> How do I stop automatic saving?
121-
122-
Just set the save interval to `0`. Put this in `.tmux.conf`
123-
124-
set -g @continuum-save-interval '0'
125-
126-
and then source `tmux.conf` by executing this command in the shell
127-
`$ tmux source-file ~/.tmux.conf`.
128-
129-
> I had automatic restore turned on, how do I disable it now?
130-
131-
Just remove `set -g @continuum-restore 'on'` from `tmux.conf`.
132-
133-
To be absolutely sure automatic restore doesn't happen, create a
134-
`tmux_no_auto_restore` file in your home directory (command:
135-
`$ touch ~/tmux_no_auto_restore`). Automatic restore won't happen if this file
136-
exists.
137-
138-
### Behavior when running multiple tmux servers
139-
140-
(This is safe to skip if you're always running a single tmux server.)
141-
142-
If you're an advanced tmux user, you might be running multiple tmux servers at
143-
the same time. Maybe you start the first tmux server with `$ tmux` and then
144-
later another one with e.g. `$ tmux -S/tmp/foo`.
145-
146-
You probably don't want to "auto restore" the same environment in the second
147-
tmux that uses `/tmp/foo` socket. You also probably don't want two tmux
148-
environments both having "auto save" feature on (think about overwrites).
149-
150-
This plugin handles multi-server scenario by giving precedence to the tmux
151-
server that was first started.
72+
### Docs
15273

153-
In the above example, the server started with `$ tmux` will do "auto
154-
restore" (if enabled) and will start "auto saving".
155-
"Auto restore" or "auto saving" **will not** happen for the second server that
156-
was started later with the `$ tmux -S/tmp/foo` command. The plugin will
157-
detect the presence of another server (`$ tmux`) and give it precedence.
74+
- [frequently asked questions](docs/faq.md)
75+
- [behavior when running multiple tmux servers](docs/multiple_tmux_servers.md)
76+
this doc is safe to skip, but you might want to read it if you're using tmux
77+
with `-L` or `-S` flags
15878

15979
### Other goodies
16080

docs/faq.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
### FAQ
2+
3+
> Will a previous save be overwritten immediately after I start tmux?
4+
5+
No, first automatic save starts 15 minutes after tmux is started. If automatic
6+
restore is not enabled, that gives you enough time to manually restore from a
7+
previous save.
8+
9+
> I want to make a restore to a previous point in time, but it seems that save
10+
is now overwritten?
11+
12+
None of the previous saves are deleted (unless you explicitly do that). All save
13+
files are kept in `~/.tmux/resurrect/` directory.<br/>
14+
Here are the steps to restore to a previous point in time:
15+
16+
- make sure you start this with a "fresh" tmux instance
17+
- `$ cd ~/.tmux/resurrect/`
18+
- locate the save file you'd like to use for restore (file names have a timestamp)
19+
- symlink the `last` file to the desired save file: `$ ln -sf <file_name> last`
20+
- do a restore with `tmux-resurrect` key: `prefix + Ctrl-r`
21+
22+
You should now be restored to the time when `<file_name>` save happened.
23+
24+
> Will this plugin fill my hard disk?
25+
26+
Most likely no. A regular save file is in the range of 5Kb. That said, it
27+
would be good to clean out old save files from `~/.tmux/resurrect/` dir from
28+
time to time.
29+
30+
> How do I change the save interval to i.e. 1 hour?
31+
32+
The interval is always measured in minutes. So setting the interval to `60`
33+
(minutes) will do the trick. Put this in `.tmux.conf`:
34+
35+
set -g @continuum-save-interval '60'
36+
37+
and then source `tmux.conf` by executing this command in the shell
38+
`$ tmux source-file ~/.tmux.conf`.
39+
40+
> How do I stop automatic saving?
41+
42+
Just set the save interval to `0`. Put this in `.tmux.conf`
43+
44+
set -g @continuum-save-interval '0'
45+
46+
and then source `tmux.conf` by executing this command in the shell
47+
`$ tmux source-file ~/.tmux.conf`.
48+
49+
> I had automatic restore turned on, how do I disable it now?
50+
51+
Just remove `set -g @continuum-restore 'on'` from `tmux.conf`.
52+
53+
To be absolutely sure automatic restore doesn't happen, create a
54+
`tmux_no_auto_restore` file in your home directory (command:
55+
`$ touch ~/tmux_no_auto_restore`). Automatic restore won't happen if this file
56+
exists.
57+

docs/multiple_tmux_servers.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Behavior when running multiple tmux servers
2+
3+
(This is safe to skip if you're always running a single tmux server.)
4+
5+
If you're an advanced tmux user, you might be running multiple tmux servers at
6+
the same time. Maybe you start the first tmux server with `$ tmux` and then
7+
later another one with e.g. `$ tmux -S/tmp/foo`.
8+
9+
You probably don't want to "auto restore" the same environment in the second
10+
tmux that uses `/tmp/foo` socket. You also probably don't want two tmux
11+
environments both having "auto save" feature on (think about overwrites).
12+
13+
This plugin handles multi-server scenario by giving precedence to the tmux
14+
server that was first started.
15+
16+
In the above example, the server started with `$ tmux` will do "auto
17+
restore" (if enabled) and will start "auto saving".
18+
"Auto restore" or "auto saving" **will not** happen for the second server that
19+
was started later with the `$ tmux -S/tmp/foo` command. The plugin will
20+
detect the presence of another server (`$ tmux`) and give it precedence.

0 commit comments

Comments
 (0)