Skip to content

Commit

Permalink
Improved title handling with OSC 22 and 23
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-yadav11 committed Aug 2, 2021
1 parent 3ed8b08 commit ca5f66e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pyfzf
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ keyprompt() {
read -s -n1 -p $'\n Press any key to continue or ^C to exit...'
}

settitle() {
echo -en '\e]0;pyfzf\e\\'
}
echo -en '\e[22t' # save title
echo -en '\e]0;pyfzf\e\\' # set title

settitle
while true ; do
clear
case "$(echo -e "$menu" | fzf --layout=reverse)" in
Expand Down Expand Up @@ -209,13 +207,13 @@ while true ; do
yay -Rns "${orpstorem[@]}"
trap - INT
else
echo -e "\e[1;32m==> \e[1;37mNo unneeded dependencies (orphans) found for removing\e[0m"
echo -e '\e[1;32m==> \e[1;37mNo unneeded dependencies (orphans) found for removing\e[0m'
fi
keyprompt
;;
"$sh")
"$SHELL"
settitle
echo -en '\e]0;pyfzf\e\\' # set title
;;
"$upg")
trap : INT
Expand All @@ -228,4 +226,6 @@ while true ; do
;;
esac
done

clear
echo -en '\e[23t' # restore title

0 comments on commit ca5f66e

Please sign in to comment.