dotfiles/.local/bin/randverse

16 lines
393 B
Plaintext
Raw Normal View History

2022-06-06 12:26:54 +02:00
#!/bin/bash
2022-06-08 21:23:51 +02:00
# randverse
#
# Display a random Bible verse.
2022-06-06 12:26:54 +02:00
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." &
2022-11-25 22:10:28 +01:00
alacritty --title bible -e bash -c "echo '$VERSE' | less" &