dmenu_guides.sh 516 B

1234567891011121314151617
  1. #!/bin/sh
  2. dmenu_font="monospace:size=10"
  3. col_black="#000000"
  4. col_pink="#ff00f0"
  5. col_violet="#8f00ff"
  6. col_gray4="#eeeeee"
  7. grep -hR "" $HOME/src/guides/*/* > /tmp/file
  8. file=/tmp/file
  9. in=$(cat $file | dmenu -m 0 -fn ${dmenu_font} -nb ${col_black} -nf ${col_pink} -sb ${col_violet} -sf ${col_gray4} -l 10 -p guides:) # dmenu input
  10. match=$(cat $file | grep "$in" | sed 's/\$ //g') # check match with ~/.bookmarks file
  11. rm /tmp/file
  12. if [ "$match" != "" ]; then
  13. echo -n "$match" | xclip -selection clipboard
  14. fi