1
0
mirror of https://github.com/RyanGreenup/cadmus.git synced 2025-04-21 02:01:50 +02:00

Added layout for skim recoll

This commit is contained in:
ryangreenup 2020-07-15 10:07:47 +10:00
parent b23fe878dc
commit e2670555d6

View File

@ -91,22 +91,23 @@ readFirstArgument () {
}
# *** Note Recoll Search
NoteRecollSearch () {
NoteSearchRecoll () {
## Change directory if One was specified, exit if no directory exists
cd "${1}"
## I really really like this one!!
## Display Path Relative to Notes Dir
sk -i -c 'recoll -b -t -q "ext:md" | cut -c 8- | sd \'^\' \'realpath "\' | sd \'$\' \'" --relative-to "./"\' | bash ' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "bat --color=always --line-range :500 --terminal-width 80 --theme=Dracula {}"
sk -i -c 'recoll -b -t -q "ext:md" | cut -c 8- | sd '^' 'realpath "' | sd '$' '" --relative-to "./"' | bash ' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "bat --color=always --line-range :500 --terminal-width 80 --theme=Dracula {}"
## Display full path
sk -i -c 'recoll -b -t -q "ext:md {}" | cut -c 8-' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "bat --color=always --line-range :500 --terminal-width 80 --theme=Dracula {}"
## Display only file name
##
sk -i -c 'recoll -b -t -q "ext:md" | cut -c 8- | sd \'^\' \'"\' | sd \'$\' \'"\' | sd \'^\' \'basename \' | bash' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "echo {} | xargs fd | xargs bat --color=always --line-range :500 --terminal-width 80 --theme=Dracula "
## ## Display full path
## sk -i -c 'recoll -b -t -q "ext:md {}" | cut -c 8-' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "bat --color=always --line-range :500 --terminal-width 80 --theme=Dracula {}"
##
##
## ## Display only file name
## ##
## sk -i -c 'recoll -b -t -q "ext:md" | cut -c 8- | sd \'^\' \'"\' | sd \'$\' \'"\' | sd \'^\' \'basename \' | bash' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "echo {} | xargs fd | xargs bat --color=always --line-range :500 --terminal-width 80 --theme=Dracula "
exit 0
}