From e1b01ee4f9937df74f21920a5fade09fb2526943 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Thu, 12 Feb 2015 12:48:06 +0100 Subject: [PATCH] Export script paths so that 'tmux-resurrect-auto' plugin can use them --- CHANGELOG.md | 2 ++ resurrect.tmux | 6 ++++++ scripts/variables.sh | 2 ++ 3 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c027ff6..f119b12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ### master - bugfix: zoomed windows related regression +- export save and restore script paths so that 'tmux-resurrect-save' plugin can + use them ### v2.1.0, 2015-02-12 - if restore is started when there's only **1 pane in the whole tmux server**, diff --git a/resurrect.tmux b/resurrect.tmux index 7bbb38b..e79c3bf 100755 --- a/resurrect.tmux +++ b/resurrect.tmux @@ -25,9 +25,15 @@ set_default_strategies() { tmux set-option -g "${restore_process_strategy_option}irb" "default_strategy" } +set_script_path_options() { + tmux set-option -g "$save_path_option" "$CURRENT_DIR/scripts/save.sh" + tmux set-option -g "$restore_path_option" "$CURRENT_DIR/scripts/restore.sh" +} + main() { set_save_bindings set_restore_bindings set_default_strategies + set_script_path_options } main diff --git a/scripts/variables.sh b/scripts/variables.sh index 06c73bb..ee047f2 100644 --- a/scripts/variables.sh +++ b/scripts/variables.sh @@ -1,9 +1,11 @@ # key bindings default_save_key="C-s" save_option="@resurrect-save" +save_path_option="@resurrect-save-script-path" default_restore_key="C-r" restore_option="@resurrect-restore" +restore_path_option="@resurrect-restore-script-path" # default processes that are restored default_proc_list_option="@resurrect-default-processes"