mirror of https://gitlab.com/dabruh/dotfiles.git
Added random Bible verse.
This commit is contained in:
parent
cfc84408b6
commit
c3e7c1dfa3
|
@ -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
|
||||
|
|
|
@ -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" &
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue