mirror of https://gitlab.com/dabruh/dotfiles.git
dmenu bible.
This commit is contained in:
parent
ecbc619380
commit
e718dbeac2
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
BIBLE=~/.local/share/dabruh/bible.txt
|
||||||
|
BOOKS="$(cut -d' ' -f1 $BIBLE | grep -o '^[[:digit:]]*[[:alpha:]]*' | uniq | sed 1d | nl -s:)"
|
||||||
|
BOOK="$(xargs -n 1 <<<"$BOOKS" | dmenu -i -l 30 -p "Choose a book" | cut -d: -f2-)"
|
||||||
|
echo "Chose book: '$BOOK'."
|
||||||
|
|
||||||
|
CHAPTERS="$(cut -d' ' -f1 $BIBLE | grep -o "^${BOOK}[[:digit:]]*" | uniq)"
|
||||||
|
CHAPTER="$(xargs -n 1 <<<"$CHAPTERS" | dmenu -i -l 30 -p "$BOOK chapter")"
|
||||||
|
echo "Chose chapter: '$CHAPTER'."
|
||||||
|
|
||||||
|
alacritty --class translation -e bash -c "vim <(grep '^${CHAPTER}:' $BIBLE)"
|
Loading…
Reference in New Issue