mirror of
https://github.com/tmux-plugins/tmux-continuum.git
synced 2024-12-18 04:38:48 +00:00
Merge pull request #93 from ahaasler/add-restore-max-delay-option
Add option to set restore max delay
This commit is contained in:
commit
6e58336c28
@ -46,7 +46,9 @@ add_resurrect_save_interpolation() {
|
|||||||
just_started_tmux_server() {
|
just_started_tmux_server() {
|
||||||
local tmux_start_time
|
local tmux_start_time
|
||||||
tmux_start_time="$(tmux display-message -p -F '#{start_time}')"
|
tmux_start_time="$(tmux display-message -p -F '#{start_time}')"
|
||||||
[ "$tmux_start_time" == "" ] || [ "$tmux_start_time" -gt "$(($(date +%s)-10))" ]
|
local restore_max_delay
|
||||||
|
restore_max_delay="$(get_tmux_option "$auto_restore_max_delay_option" "${auto_restore_max_delay_default}")"
|
||||||
|
[ "$tmux_start_time" == "" ] || [ "$tmux_start_time" -gt "$(($(date +%s)-${restore_max_delay}))" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
start_auto_restore_in_background() {
|
start_auto_restore_in_background() {
|
||||||
|
@ -15,6 +15,9 @@ auto_restore_default="off"
|
|||||||
|
|
||||||
auto_restore_halt_file="${HOME}/tmux_no_auto_restore"
|
auto_restore_halt_file="${HOME}/tmux_no_auto_restore"
|
||||||
|
|
||||||
|
auto_restore_max_delay_option="@continuum-restore-max-delay"
|
||||||
|
auto_restore_max_delay_default="10"
|
||||||
|
|
||||||
# tmux auto start options
|
# tmux auto start options
|
||||||
auto_start_option="@continuum-boot"
|
auto_start_option="@continuum-boot"
|
||||||
auto_start_default="off"
|
auto_start_default="off"
|
||||||
|
Loading…
Reference in New Issue
Block a user