commit a5d8119d3b3fba34787e9f52f139b43974142e76
parent ab48c95248bd9ae45058668fb3c1178ec222fa0d
Author: William Casarin <jb55@jb55.com>
Date: Fri, 30 Apr 2021 10:54:11 -0700
undistract-me: save last window
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/dotfiles/bash-undistract-me/long-running.bash b/dotfiles/bash-undistract-me/long-running.bash
@@ -76,9 +76,12 @@ function notify_when_long_running_commands_finish_install() {
now=$(get_now)
current_window=$(active_window_id)
+
+
if [[ $current_window != $__udm_last_window ]] ||
[[ ! -z "$IGNORE_WINDOW_CHECK" ]] ||
[[ $current_window == "nowindowid" ]] ; then
+ echo "$__udm_last_window" > $HOME/var/cmd_last_window
local time_taken=$(( $now - $__udm_last_command_started ))
local longtimeout="$(((time_taken / 3) * 1000))"
local timeout="$(btcs -t 15000 $longtimeout min)"