mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-21 20:08:48 +00:00
Show spinner during the env save process
This commit is contained in:
parent
f9ad59900a
commit
2b259cf11a
@ -1,6 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
### master
|
||||
- show spinner during the save process
|
||||
|
||||
### v0.4.0, 2014-08-29
|
||||
- change plugin name to `tmux-resurrect`. Change all the variable names.
|
||||
|
@ -192,7 +192,7 @@ restore_active_and_alternate_sessions() {
|
||||
|
||||
main() {
|
||||
if supported_tmux_version_ok && check_saved_session_exists; then
|
||||
start_spinner
|
||||
start_spinner "Restoring..." "Tmux restore complete!"
|
||||
restore_all_panes
|
||||
restore_pane_layout_for_each_window >/dev/null 2>&1
|
||||
restore_all_pane_processes
|
||||
|
@ -4,6 +4,7 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
source "$CURRENT_DIR/scripts/variables.sh"
|
||||
source "$CURRENT_DIR/helpers.sh"
|
||||
source "$CURRENT_DIR/spinner_helpers.sh"
|
||||
|
||||
pane_format() {
|
||||
local delimiter=$'\t'
|
||||
@ -96,12 +97,14 @@ save_all() {
|
||||
dump_windows >> $resurrect_file_path
|
||||
dump_state >> $resurrect_file_path
|
||||
ln -fs "$resurrect_file_path" "$(last_resurrect_file)"
|
||||
display_message "Tmux environment saved!"
|
||||
}
|
||||
|
||||
main() {
|
||||
if supported_tmux_version_ok; then
|
||||
start_spinner "Saving..." "Tmux environment saved!"
|
||||
save_all
|
||||
stop_spinner
|
||||
display_message "Tmux environment saved!"
|
||||
fi
|
||||
}
|
||||
main
|
||||
|
@ -1,5 +1,5 @@
|
||||
start_spinner() {
|
||||
$CURRENT_DIR/tmux_spinner.sh "Restoring tmux..." "Tmux restore complete!" &
|
||||
$CURRENT_DIR/tmux_spinner.sh "$1" "$2" &
|
||||
export SPINNER_PID=$!
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user