*nohtml*

local/bin/start-menu

   1 #!/bin/bash
   2 
   3 _redshift(){ kill $(pidof redshift) || redshift; }
   4 _picker(){ gpick -so | tr A-Z a-z | tr -d \\n | xsel -b; }
   5 _img2text(){ maim -s | tesseract -l rus+eng - - 2>&-; }
   6 
   7 declare -A a
   8 a[picker]=_picker
   9 a[redshift]=_redshift
  10 
  11 for i in ${0%/*}/*-notify ${0%/*}/*-menu; do
  12     i=${i##*/} && a[${i%-*}]=$i
  13 done
  14 
  15 s=$(for i in ${!a[@]}; do icon $i ${i^}; done | sort -k 2 |
  16 menu -i os -c 10 -l 6 | awk '{ print tolower($NF) }')
  17 
  18 [[ $s ]] && ${a[$s]} &