Added bespoke quick joplin search and updated vbox helper

master
Steven Saus 3 years ago
parent e63bc6472c
commit ed1d4008e9
  1. 21
      joplin_search.sh
  2. 2
      virtualbox-openbox.sh

@ -0,0 +1,21 @@
#!/bin/bash
##############################################################################
#
# joplin_search.sh
# Wrapper for searching and quickly viewing Joplin notes using fzf,rg, and bat
# (c) Steven Saus 2021
# Licensed under the MIT license
#
##############################################################################
JoplinSearchDir="/home/steven/documents/cloud_nextcloud/joplin"
#SearchTerm=$(echo ${@} | sed '/^$/!s/[^ ]* */| -e &/g' | tail -c +2)
SearchTerm=${@}
#SearchString=$(printf "rg %s -l -f $(rg --files-without-match \"_diff:\" %s)" "${SearchTerm}" "${JoplinSearchDir}")
#cat "$SearchString"
#eval "$SearchString"
#rg -l -w "${SearchTerm}" $(rg --files-without-match "title_diff:" ${JoplinSearchDir}) | fzf --no-hscroll -m --height 90% --border --ansi --no-bold --preview='bat {}'
#| rg --files-without-match -e "_diff:" -f - | fzf --no-hscroll -m --height 90% --border --ansi --no-bold --preview="bat {}"
/home/steven/bin/showdocs -g $(grep -l -i "${SearchTerm}" $(grep -l -x "type_: 1" ${JoplinSearchDir}/*.md) | fzf --no-hscroll -m --height 90% --border --ansi --no-bold --preview='bat {}')

@ -4,7 +4,7 @@
#
# command to launch VirtualBox
VBox_launcher_command='VBoxManage startvm '
VBox_launcher_command='VBoxHeadless-startvm'
function generate_vbox_menu {

Loading…
Cancel
Save