espanso pipe update

master
Daniel Napora 2024-02-02 14:45:14 +01:00
parent dacd4082ba
commit d386eec298
1 changed files with 5 additions and 2 deletions

View File

@ -32,7 +32,7 @@ esac
MENU_ITEMS=/tmp/espanso_list.csv
trap "rm -f $MENU_ITEMS" EXIT
if [[ $(espanso status) =~ "not" ]]
if ! pgrep -x "espanso" > /dev/null
then
echo "^sep(Espanso - text expander)" >/tmp/espanso_list.csv
echo "Espanso not running! Run it first by: espanso start,^term(espanso start)" >>/tmp/espanso_list.csv
@ -47,7 +47,10 @@ echo "^sep($LIST)" >>/tmp/espanso_list.csv
while read -r line ; do
IFS='-' read -r id string <<< "$line"
printf "\"\"\"<b><tt>%-12s</tt></b> <i>%s</i>\"\"\",xdotool type %s\n" $id "${string//</&lt;}" $id >> $MENU_ITEMS
#printf "\"\"\"<b><tt>%-12s</tt></b> <i>%s</i>\"\"\",xdotool type %s\n" $id "${string//</&lt;}" $id >> $MENU_ITEMS
string="${string//</&lt;}"
string="${string//&/&amp;}"
printf "\"\"\"<b><tt>%-12s</tt></b> <i>%s</i>\"\"\",xdotool type %s\n" $id "${string}" $id >> $MENU_ITEMS
done < <(espanso match list)