mirror of https://gitlab.com/dabruh/dotfiles.git
16 lines
393 B
Bash
Executable File
16 lines
393 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# randverse
|
|
#
|
|
# Display a random Bible verse.
|
|
|
|
BIBLE=~/.local/share/dabruh/bible.txt
|
|
LINES="$(wc -l <"$BIBLE")"
|
|
LINE=$(( RANDOM % LINES + 2 )) # + 2 to skip first line
|
|
VERSE="$(sed -n "${LINE}p" "$BIBLE")"
|
|
|
|
echo "$VERSE"
|
|
printf '%s' "$VERSE" | xclip -selection clipboard
|
|
notify-send "Bible verse copied to clipboard." &
|
|
alacritty --title bible -e bash -c "echo '$VERSE' | less" &
|