From 4e2279688d8a577ed14f42c4e8af1acb58100a57 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Thu, 7 Feb 2019 13:32:58 +0100 Subject: [PATCH] Fix auto-restore feature Credit to @badjware for the solution Fixes $45, #52, #54 --- CHANGELOG.md | 1 + continuum.tmux | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9516f1..2fe9bcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ### master +- bugfix: "auto restore" feature stopped working ### v3.1.0, 2015-03-14 - properly quote scripts diff --git a/continuum.tmux b/continuum.tmux index e8d60e3..5087f98 100755 --- a/continuum.tmux +++ b/continuum.tmux @@ -43,15 +43,8 @@ add_resurrect_save_interpolation() { fi } -number_of_sessions() { - tmux list-sessions | - wc -l | - sed "s/ //g" -} - -# when tmux server is first started, number of sessions is 0 just_started_tmux_server() { - [ "$(number_of_sessions)" -eq 0 ] + [ "$(tmux display-message -p -F '#{start_time}')" -gt "$(($(date +%s)-10))" ] } start_auto_restore_in_background() {