You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo -e "\t\tClose the window programmatically. This is equal to the user pressing the X button or pressing alt+f4."
80
+
echo -e "\t\tClose the window programmatically. This is equal to the user pressing the X button or pressing alt+f4. Waits until closing operations finished (including --onclose commands)."
echo -e "\t\tAdd an action to be executed when a key (\"sequence\") is pressed. Possible sequences: See https://www.tcl.tk/man/tcl8.4/TkCmd/bind.htm#M5. Specify the commands to be executed use the --command option. Example: \"tkbash mygui --hotkey Escape --command 'echo You pressed Escape.'\" Also see --command note below."
[[ -f"$WISH_PIPE" ]] && rm "$WISH_PIPE"# can happen unintentionally (multiple calls interfering with each other)
361
362
mkfifo "$WISH_PIPE"
362
363
WISH_PIPE_HELPER=${WISH_PIPE}_
363
364
mkfifo "$WISH_PIPE_HELPER"
@@ -483,7 +484,10 @@ handle_window_commands() {
483
484
[ -n"$ICONIFY" ] && wish_exec "wm iconify .w"
484
485
[ -n"$HIDE" ] && wish_exec "wm withdraw .w"
485
486
[ -n"$SHOW" ] && wish_exec "wm deiconify .w"
486
-
[ -n"$CLOSE" ] && wish_exec "onexit"
487
+
if [ -n"$CLOSE" ];then
488
+
wish_exec "onexit"
489
+
while [ -p"$WISH_PIPE" ];do sleep 0.2;done# wait for pipe to disappear = everything cleaned up. prevents mess when bulk statements with close/create window
490
+
fi
487
491
if [ -n"$HOTKEY" ];then
488
492
[ ! -v COMMAND ] &&echo"hotkey command also needs the --command option."&& die 23
0 commit comments