repo: uritools
action: commit
revision: 
path_from: 
revision_from: 9a83498e8d9d421a76be4fab7224965224ef2b2c:
path_to: 
revision_to: 
git.thebackupbox.net
uritools
git clone git://git.thebackupbox.net/uritools
commit 9a83498e8d9d421a76be4fab7224965224ef2b2c
Author: epoch 
Date:   Thu Jun 27 00:14:24 2024 -0500

    choose will now grab the focused window and then set it back before exiting

diff --git a/choose b/choose
index aa191e7c1b86a9b98fefebdb99cf59cbd4e00f15..
index ..d90ab6a275f86bb92bfeaa18da01bfa52f5febaa 100755
--- a/choose
+++ b/choose
@@ -6,6 +6,8 @@
 #message=$1
 #shift
 #sed 's|,|\\,|g;s|:|\\:|g' | tr '\n' ',' | rev | cut -b2- | rev | tr '\n' '\0' | xargs -0 xmessage -nearmouse "$@" "$message" -print -buttons
+orig_focus="$(xdotool getwindowfocus)"
+
 if [ "$1" ];then
  prompt="$1"
 else
@@ -41,3 +43,5 @@ else
     printf "pmenu missing. %s\n" "https://github.com/sgtpep/pmenu"
   fi
 fi
+
+xdotool windowfocus "${orig_focus}"

-----END OF PAGE-----