type helpers update
parent
25053b91fa
commit
c2f4d7ba37
|
@ -2,18 +2,21 @@
|
||||||
|
|
||||||
case $LANG in
|
case $LANG in
|
||||||
pl*)
|
pl*)
|
||||||
|
TYPE_TO_SEARCH="pisz, aby wyszukać"
|
||||||
CONFIGURE="Konfiguracja Espanso"
|
CONFIGURE="Konfiguracja Espanso"
|
||||||
EDITCONF="Edytuj domyślny plik konfiguracyjny"
|
EDITCONF="Edytuj domyślny plik konfiguracyjny"
|
||||||
OPENCONFDIR="Otwórz katalog z konfiguracją"
|
OPENCONFDIR="Otwórz katalog z konfiguracją"
|
||||||
DOCU="Dokumentacja <b>Espanso</b> (online)"
|
DOCU="Dokumentacja <b>Espanso</b> (online)"
|
||||||
;;
|
;;
|
||||||
es*)
|
es*)
|
||||||
|
TYPE_TO_SEARCH="Buscar"
|
||||||
CONFIGURE="Configurar Espanso"
|
CONFIGURE="Configurar Espanso"
|
||||||
EDITCONF="Editar archivo x defecto"
|
EDITCONF="Editar archivo x defecto"
|
||||||
OPENCONFDIR="Abrir el directorio"
|
OPENCONFDIR="Abrir el directorio"
|
||||||
DOCU="Leer <b>Documentacion</b> de Espanso (en línea)"
|
DOCU="Leer <b>Documentacion</b> de Espanso (en línea)"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
TYPE_TO_SEARCH="Type to filter"
|
||||||
CONFIGURE="Configure Espanso"
|
CONFIGURE="Configure Espanso"
|
||||||
EDITCONF="Edit default config file"
|
EDITCONF="Edit default config file"
|
||||||
OPENCONFDIR="Open config directory"
|
OPENCONFDIR="Open config directory"
|
||||||
|
@ -26,14 +29,14 @@ esac
|
||||||
MENU_ITEMS=/tmp/espanso_list.csv
|
MENU_ITEMS=/tmp/espanso_list.csv
|
||||||
trap "rm -f $MENU_ITEMS" EXIT
|
trap "rm -f $MENU_ITEMS" EXIT
|
||||||
|
|
||||||
echo "^sep(Espanso - text expander)" >/tmp/espanso_list.csv
|
|
||||||
|
|
||||||
if [[ $(espanso status) =~ "not" ]]
|
if [[ $(espanso status) =~ "not" ]]
|
||||||
then
|
then
|
||||||
|
echo "^sep(Espanso - text expander)" >/tmp/espanso_list.csv
|
||||||
echo "Espanso not running! Run it first by: espanso start" >>/tmp/espanso_list.csv
|
echo "Espanso not running! Run it first by: espanso start" >>/tmp/espanso_list.csv
|
||||||
|
|
||||||
else
|
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
|
||||||
while read -r line ; do
|
while read -r line ; do
|
||||||
|
|
||||||
IFS='-' read -r id string <<< "$line"
|
IFS='-' read -r id string <<< "$line"
|
||||||
|
@ -54,7 +57,7 @@ fi
|
||||||
if [ $1 == "-s" ]; then
|
if [ $1 == "-s" ]; then
|
||||||
. /usr/bin/pipemenu-standalone.cfg
|
. /usr/bin/pipemenu-standalone.cfg
|
||||||
|
|
||||||
MENU_PADDING_TOP=0
|
MENU_PADDING_TOP=24
|
||||||
MENU_HALIGN="center"
|
MENU_HALIGN="center"
|
||||||
MENU_VALIGN="top"
|
MENU_VALIGN="top"
|
||||||
MENU_MARGIN_Y=40
|
MENU_MARGIN_Y=40
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
case $LANG in
|
case $LANG in
|
||||||
pl*)
|
pl*)
|
||||||
|
TYPE_TO_SEARCH="pisz, aby wyszukać"
|
||||||
HISTHELPER="Ściągawka z historii"
|
HISTHELPER="Ściągawka z historii"
|
||||||
NOTHING="Niczego tu nie ma... Otwórz terminal (W-t) i wykonaj jakieś polecenie"
|
NOTHING="Niczego tu nie ma... Otwórz terminal (W-t) i wykonaj jakieś polecenie"
|
||||||
;;
|
;;
|
||||||
es*)
|
es*)
|
||||||
|
TYPE_TO_SEARCH="Buscar"
|
||||||
HISTHELPER="Historia breve"
|
HISTHELPER="Historia breve"
|
||||||
NOTHING="Nada que ver aquí...Abrir la terminal (W-t) y ejecutar algunos comandos"
|
NOTHING="Nada que ver aquí...Abrir la terminal (W-t) y ejecutar algunos comandos"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
TYPE_TO_SEARCH="Type to filter"
|
||||||
HISTHELPER="History helper"
|
HISTHELPER="History helper"
|
||||||
NOTHING="Nothing to see here... Open terminal (W-t) and run some commands"
|
NOTHING="Nothing to see here... Open terminal (W-t) and run some commands"
|
||||||
;;
|
;;
|
||||||
|
@ -17,20 +20,24 @@ esac
|
||||||
|
|
||||||
MENU_ITEMS=/tmp/history_list.csv
|
MENU_ITEMS=/tmp/history_list.csv
|
||||||
trap "rm -f $MENU_ITEMS" EXIT
|
trap "rm -f $MENU_ITEMS" EXIT
|
||||||
echo "^sep($HISTHELPER)" >/tmp/history_list.csv
|
|
||||||
|
|
||||||
if [ -f ~/.bash_history ]; then
|
if [ -f ~/.bash_history ]; then
|
||||||
|
echo "@search,,10,5,292,20,4,left,top,auto,#262626,\"\"\"<big></big> <i>$TYPE_TO_SEARCH</i>\"\"\"" >/tmp/history_list.csv
|
||||||
|
|
||||||
|
echo "^sep($HISTHELPER)" >>/tmp/history_list.csv
|
||||||
while read -r line ; do
|
while read -r line ; do
|
||||||
printf "\"\"\"<b>%s</b>\"\"\",xdotool type --delay 0 \"%s\"\n" "$line" "$line" >> $MENU_ITEMS
|
printf "\"\"\"<b>%s</b>\"\"\",xdotool type --delay 0 \'%s\'\n" "$line" "$line" >> $MENU_ITEMS
|
||||||
done < <(cat ~/.bash_history|sort|uniq)
|
done < <(cat ~/.bash_history|sort|uniq)
|
||||||
else
|
else
|
||||||
|
echo "^sep($HISTHELPER)" >/tmp/history_list.csv
|
||||||
echo "\"\"\"$NOTHING\"\"\",exo-open --launch TerminalEmulator" >>/tmp/history_list.csv
|
echo "\"\"\"$NOTHING\"\"\",exo-open --launch TerminalEmulator" >>/tmp/history_list.csv
|
||||||
fi
|
fi
|
||||||
### RUN
|
### RUN
|
||||||
if [ $1 == "-s" ]; then
|
if [ $1 == "-s" ]; then
|
||||||
. /usr/bin/pipemenu-standalone.cfg
|
. /usr/bin/pipemenu-standalone.cfg
|
||||||
|
|
||||||
MENU_PADDING_TOP=0
|
MENU_PADDING_TOP=24
|
||||||
MENU_HALIGN="center"
|
MENU_HALIGN="center"
|
||||||
MENU_VALIGN="top"
|
MENU_VALIGN="top"
|
||||||
MENU_MARGIN_Y=40
|
MENU_MARGIN_Y=40
|
||||||
|
@ -47,3 +54,4 @@ fi
|
||||||
#cat ${CONFIG_FILE}
|
#cat ${CONFIG_FILE}
|
||||||
cat ${MENU_ITEMS}
|
cat ${MENU_ITEMS}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue