history helper

master
Daniel Napora 2020-09-25 10:42:23 +02:00
parent 893d903f86
commit 31ec360d1c
3 changed files with 40 additions and 4 deletions

View File

@ -29,7 +29,7 @@ echo "^sep(Espanso - text expander)" >/tmp/espanso_list.csv
while read -r line ; do
IFS='-' read -r id string <<< "$line"
printf "\"\"\"<b><tt>%-12s</tt></b> %s\"\"\",espanso match exec %s\n" $id "$string" $id >> $MENU_ITEMS
printf "\"\"\"<b><tt>%-12s</tt></b> <i>%s</i>\"\"\",espanso match exec %s\n" $id "$string" $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
@ -42,7 +42,9 @@ if [ $1 == "-s" ]; then
MENU_PADDING_TOP=0
MENU_HALIGN="center"
MENU_VALIGN="center"
MENU_VALIGN="top"
MENU_MARGIN_Y=30
MENU_MARGIN_X=30
jgmenu_icon_size=0
JGWIDTH=500
#MENU_HEIGHT_MAX=600

View File

@ -0,0 +1,34 @@
#!/bin/bash
MENU_ITEMS=/tmp/history_list.csv
trap "rm -f $MENU_ITEMS" EXIT
echo "^sep(History helper)" >/tmp/history_list.csv
while read -r line ; do
printf "\"\"\"<b>%s</b>\"\"\",xdotool type --delay 0 \"%s\"\n" "$line" "$line" >> $MENU_ITEMS
done < <(cat ~/.bash_history|sort|uniq)
### RUN
if [ $1 == "-s" ]; then
. /usr/bin/pipemenu-standalone.cfg
MENU_PADDING_TOP=0
MENU_HALIGN="center"
MENU_VALIGN="top"
MENU_MARGIN_Y=30
MENU_MARGIN_X=30
jgmenu_icon_size=0
JGWIDTH=500
#MENU_HEIGHT_MAX=600
mkconfigfile
jgmenu --config-file=${CONFIG_FILE} --csv-file=/tmp/history_list.csv 2>/dev/null
rm -f /tmp/history_list.csv
exit 0
fi
#cat ${CONFIG_FILE}
#cat ${MENU_ITEMS}

View File

@ -36,8 +36,8 @@ terminal_exec = terminator
terminal_args = -e
tabs = ${TABS:-220}
menu_border = ${menu_border:-0}
menu_margin_x = 0
menu_margin_y = 0
menu_margin_x = ${MENU_MARGIN_X:-0}
menu_margin_y = ${MENU_MARGIN_Y:-0}
menu_width = $JGWIDTH
menu_height_min = ${MENU_HEIGHT_MIN:-0}
menu_height_max = ${MENU_HEIGHT_MAX:-0}