Added random Bible verse.

This commit is contained in:
dabruh 2022-06-06 12:26:54 +02:00
parent cfc84408b6
commit c3e7c1dfa3
3 changed files with 31118 additions and 0 deletions

View File

@ -17,3 +17,7 @@ for_window [class="Alacritty"][instance="translation"] floating enable
# emoji selection through dmenu
bindsym $mod+Ctrl+e exec dmenuunicode
# Random Bible verse
bindsym $mod+Ctrl+Shift+b exec randverse
for_window [class="Alacritty"][instance="bible"] floating enable

11
.local/bin/randverse Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
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 --class bible -e bash -c "echo '$VERSE' | less" &

31103
.local/share/dabruh/bible.txt Normal file

File diff suppressed because it is too large Load Diff