echo -e '\n' >/tmp/TP
without it formfeed character is added at the end of the last string.
Code: Select all
function savedtranstexts (){
rm -f /tmp/TP
stxtp=/tmp/TP
mkfifo -m 755 $stxtp
exec 4<> $stxtp
yad --plug=$$ --tabnum=1 --list --item-separator=" " --column="Saved Trans" \
$(for f in $HOME/Trans-Text*; do [[ -f "${f}" ]] && echo "${f##*/}"; done) \
--select-action="bash -c \"echo -e '\f' >/tmp/TP ; cd "$HOME" ; cat "%s" >/tmp/TP ; echo -e '\n' >/tmp/TP \"" &
yad --plug=$$ --tabnum=2 --editable --text-info --listen <&4 &
WINDOWTITLE="Saved-Texts"
yad --window-icon=$pics/wireless.png --width=600 --height=440 --no-buttons --on-top --paned --splitter=160 --key=$$ --title="$WINDOWTITLE" --tab="Selector" --tab="Preview" --orient=horizontal
}; export -f savedtranstexts