master
Daniel Napora 2021-09-04 22:53:28 +02:00
parent e150a84622
commit 23711499e2
2 changed files with 20 additions and 15 deletions

View File

@ -7,6 +7,7 @@ case $LANG in
EDITCONF="Edytuj domyślny plik konfiguracyjny"
OPENCONFDIR="Otwórz katalog z konfiguracją"
DOCU="Dokumentacja <b>Espanso</b> (online)"
LIST="Lista wyzwalaczy:"
;;
es*)
TYPE_TO_SEARCH="Buscar"
@ -14,6 +15,7 @@ case $LANG in
EDITCONF="Editar archivo x defecto"
OPENCONFDIR="Abrir el directorio"
DOCU="Leer <b>Documentacion</b> de Espanso (en línea)"
LIST="List of triggers:"
;;
*)
TYPE_TO_SEARCH="Type to filter"
@ -21,6 +23,7 @@ case $LANG in
EDITCONF="Edit default config file"
OPENCONFDIR="Open config directory"
DOCU="Read <b>Espanso</b> documentation (online)"
LIST="List of triggers:"
;;
esac
@ -37,15 +40,17 @@ then
else
echo "@search,,10,5,292,20,4,left,top,auto,#262626,\"\"\"<big></big> <i>$TYPE_TO_SEARCH</i>\"\"\"" >/tmp/espanso_list.csv
echo "^sep(Espanso - text expander)" >>/tmp/espanso_list.csv
echo "^sep($CONFIGURE)" >>/tmp/espanso_list.csv
echo "$EDITCONF, geany ~/.config/espanso/default.yml" >>/tmp/espanso_list.csv
echo "$OPENCONFDIR,pcmanfm ~/.config/espanso/user/" >>/tmp/espanso_list.csv
echo "$DOCU,exo-open --launch WebBrowser https://espanso.org/docs/" >>/tmp/espanso_list.csv
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>\"\"\",espanso match exec %s\n" $id "${string//</&lt;}" $id >> $MENU_ITEMS
done < <(espanso match list)
echo "^sep($CONFIGURE)" >>/tmp/espanso_list.csv
echo "$EDITCONF, geany ~/.config/espanso/default.yml" >>/tmp/espanso_list.csv
echo "$OPENCONFDIR,pcmanfm ~/.config/espanso/user/" >>/tmp/espanso_list.csv
echo "$DOCU,exo-open --launch WebBrowser https://espanso.org/docs/" >>/tmp/espanso_list.csv
fi
@ -64,7 +69,7 @@ MENU_VALIGN="top"
MENU_MARGIN_Y=40
jgmenu_icon_size=0
JGWIDTH=500
#MENU_HEIGHT_MAX=600
MENU_HEIGHT_MAX=600
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0

View File

@ -8,22 +8,22 @@ case $LANG in
pl*)
LNGDIR="pl"
TYPE_TO_SEARCH="pisz aby wyszukać"
ME="MB helper (to menu)"
EDIT="Dostosuj to menu"
ME="Paleta komend (to menu)"
EDIT="Dostosuj..."
RESET="Przywróć domyślne"
;;
es*)
LNGDIR="en"
TYPE_TO_SEARCH="type to search"
ME="MBhelper (this menu)"
EDIT="Edit this menu"
ME="CMD Palette (this menu)"
EDIT="Edit..."
RESET="Reset to default"
;;
*)
LNGDIR="en"
TYPE_TO_SEARCH="type to search"
ME="MBhelper (this menu)"
EDIT="Edit this menu"
ME="CND Palette (this menu)"
EDIT="Edit..."
RESET="Reset to default"
;;
esac
@ -42,8 +42,8 @@ MENU_HALIGN="center"
MENU_VALIGN="top"
MENU_MARGIN_Y=40
jgmenu_icon_size=0
JGWIDTH=500
#MENU_HEIGHT_MAX=600
JGWIDTH=400
MENU_HEIGHT_MAX=600
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
@ -53,10 +53,11 @@ mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@search,,25,15,292,20,4,left,top,auto,#262626,"""<big></big> <i>$TYPE_TO_SEARCH</i>"""
. $CSVFILE
^sep($ME)
$EDIT,mbhelper edit
${TODEFAULT}
. $CSVFILE
EOF
@ -65,7 +66,6 @@ jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
exit 0
fi
printf '%s\n' "${out[@]}"
}
edit() {