Topic: Bible Verses in Conky
With much determination (and of course God's help) here is a script and conkyrc to display a random bible verse on your desktop.
verse.sh:
#!/bin/bash
############################################################
#
# This is a script to output bible verses from
# Diatheke for use in a conky script.
#
# This script depends on diatheke and rand.
# In Ubuntu and it's derivatives use:
# sudo apt-get install diatheke rand
#
# Visit http://www.crosswire.org/sword/diatheke/
# to learn more about Diatheke and the Sword Project.
#
# Usage:
# When called by itself this script will choose
# a verse at random from the list at $List. The
# list should be plain text with one verse or a
# group of verses per line. Examples of
# acceptable lines are as follows:
#
# Jn 3:16
# 1 Corinthians 12:8-10,12
# Revelation 22:20
#
# When called with an argument this script will
# attempt to use the argument as a verse and
# display the results.
#
# Feeding the script any other input will give
# unpredictable results.
#
# A suitable list of verses can be found at:
# http://www.gnpcb.org/esv/share/rss2.0/?show-verses=true
#
# The sample conkyrc can be invoked with
# conky -c verse.conkyrc
#
# Help with configuring conky can be found at:
# http://conky.sourceforge.net/documentation.html
#
# To learn about Jesus visit:
# http://www.christianity.com/Essentials/
#
############################################################
# Module must be an installed Sword Module.
# Install new modules with bibletime.
Module=NETfree
# Location of plain text file with verses to choose from.
List=~/bin/bibleverse/verse.list
# Height and Width of output to keep the conky display sane.
OutputHeight=17
OutputWidth=48
# When set to true padding will be added to top of output.
# Otherwise the padding will be added to the bottom.
AlignBottom=true
# We use a temp file to speed up the script run time.
TempFile=/tmp/conky-verse
getVerse (){
case $1 in
"") ListLength=`wc -l $List | cut -d " " -f 1`
RandomNumber=`rand -M $ListLength -N 1`
VerseNumber=`expr $RandomNumber + 1`
Verse=`cat $List | head -n $VerseNumber | tail -n 1` ;;
*) Verse=$@ ;;
esac
}
printVerse (){
Verse=$1
Chapter=`diatheke -b $Module -k $Verse | head -n 1 | cut -d : -f 1`
# Print book chapter:verse(s)
echo '${color1}'$Verse'${color0}'
# Print the verse(s)
diatheke -b $Module -k $Verse | \
sed 's/'"$Chapter:"'//' | \
sed 's/('$Module')//' | \
sed 's/ ^[ \t]*//' | \
sed '/./!d' | \
sed 's/\t/ /g' | \
sed 's/^/ /' | \
fold -sw $OutputWidth | \
sed 's/^ /${color1} /' | \
sed 's/:/${color0}/'
}
padVerse (){
Lines=`cat $TempFile | wc -l | cut -d " " -f 1`
LinesAdd=`expr $OutputHeight - $Lines`
let i=0
while [ $i -lt $LinesAdd ]; do
echo
let i=$i+1
done
}
displayVerse (){
cat $TempFile
}
getVerse "$@"
printVerse "$Verse" > $TempFile
case $AlignBottom in
true|True) padVerse
displayVerse ;;
*) displayVerse
padVerse ;;
esac
exit 0verse.list
Exodus 14:14
Exodus 15:11
Exodus 20:16
Leviticus 20:7-8
Numbers 23:19
Deuteronomy 6:4-5
Deuteronomy 7:9
Deuteronomy 8:17-18
Deuteronomy 32:4
Joshua 1:8
1 Samuel 2:2
2 Samuel 7:28
2 Samuel 22:31
1 Kings 8:27
1 Kings 8:56
Job 1:21
Psalm 1:1-3
Psalm 3:3
Psalm 4:8
Psalm 5:11-12
Psalm 9:7-8
Psalm 18:1-2
Psalm 19:14
Psalm 23:1
Psalm 23:4
Psalm 24:7-8
Psalm 25:7
Psalm 27:1
Psalm 27:14
Psalm 28:1-2
Psalm 29:11
Psalm 30:2
Psalm 30:4
Psalm 30:5
Psalm 30:11-12
Psalm 31:1-2
Psalm 31:24
Psalm 32:1-2
Psalm 32:8
Psalm 33:6
Psalm 34:8
Psalm 37:4
Psalm 37:27-29
Psalm 42:11
Psalm 46:1-3
Psalm 50:14-15
Psalm 51:4
Psalm 51:10
Psalm 55:17
Psalm 55:22
Psalm 63:3-4
Psalm 68:19
Psalm 73:28
Psalm 84:11
Psalm 85:2
Psalm 86:4-5
Psalm 90:2
Psalm 91:1-2
Psalm 94:12-13
Psalm 94:14-15
Psalm 99:9
Psalm 100:4-5
Psalm 103:2-5
Psalm 103:11-12
Psalm 104:1-2
Psalm 104:24
Psalm 105:7-8
Psalm 107:1
Psalm 115:3
Psalm 118:24
Psalm 119:11
Psalm 119:105
Psalm 121:5-6
Psalm 121:7-8
Psalm 130:5
Psalm 135:5-7
Psalm 136:1-3
Psalm 139:7-10
Psalm 145:8
Psalm 145:18-19
Proverbs 1:7
Proverbs 3:1-2
Proverbs 3:3-4
Proverbs 3:5-6
Proverbs 3:7-8
Proverbs 3:9-10
Proverbs 3:11-12
Proverbs 3:28-29
Proverbs 10:4-5
Proverbs 10:12
Proverbs 11:28
Proverbs 12:1
Proverbs 12:11
Proverbs 12:18
Proverbs 12:19
Proverbs 13:1
Proverbs 13:20
Proverbs 14:30
Proverbs 15:1
Proverbs 15:9
Proverbs 15:22
Proverbs 15:26
Proverbs 15:29
Proverbs 15:31-32
Proverbs 15:33
Proverbs 16:3
Proverbs 16:7
Proverbs 16:8
Proverbs 16:9
Proverbs 16:12
Proverbs 16:19
Proverbs 16:28
Proverbs 16:32
Proverbs 17:17
Proverbs 17:22
Proverbs 18:10
Proverbs 18:12
Proverbs 18:24
Proverbs 19:11
Proverbs 19:20
Proverbs 19:21
Proverbs 20:3
Proverbs 20:9
Proverbs 20:22
Proverbs 21:17
Proverbs 21:21
Proverbs 22:4
Proverbs 22:6
Proverbs 23:4-5
Proverbs 23:22
Proverbs 25:15
Proverbs 25:21-22
Proverbs 25:28
Proverbs 26:12
Proverbs 27:5-6
Proverbs 28:6
Proverbs 28:10
Proverbs 28:22
Proverbs 29:25
Ecclesiastes 7:8
Ecclesiastes 7:9
Isaiah 1:18
Isaiah 26:4
Isaiah 26:8
Isaiah 30:21
Isaiah 32:17
Isaiah 40:26
Isaiah 40:30-31
Isaiah 41:10
Isaiah 43:2
Isaiah 50:7
Isaiah 50:10
Isaiah 52:7
Isaiah 55:6-7
Isaiah 55:8-9
Isaiah 55:10-11
Isaiah 61:1
Jeremiah 23:23-24
Jeremiah 29:11
Jeremiah 31:3
Lamentations 3:22-23
Micah 6:8
Nahum 1:7
Zephaniah 3:17
Zechariah 7:9-10
Matthew 5:3
Matthew 5:4
Matthew 5:5
Matthew 5:6
Matthew 5:7
Matthew 5:8
Matthew 5:9
Matthew 5:10
Matthew 5:11-12
Matthew 5:14-16
Matthew 5:18
Matthew 5:23-24
Matthew 5:43-45
Matthew 5:46-48
Matthew 6:1
Matthew 6:2-4
Matthew 6:6
Matthew 6:14-15
Matthew 6:19-21
Matthew 6:24
Matthew 6:34
Matthew 7:7-8
Matthew 11:28-30
Matthew 12:36-37
Matthew 12:50
Matthew 16:24
Matthew 18:1-4
Matthew 18:5-6
Matthew 18:20
Matthew 18:21-22
Matthew 22:37-39
Matthew 23:12
Matthew 24:42
Matthew 28:18-20
Mark 10:43-45
Mark 11:25
Mark 12:30-31
Mark 13:31
Luke 4:18-19
Luke 6:27-28
Luke 6:35-36
Luke 6:37-38
Luke 12:6-7
Luke 12:15
Luke 12:29-31
Luke 19:10
John 1:1-3
John 1:12
John 1:14
John 3:3
John 3:16-17
John 3:36
John 4:13-14
John 5:24
John 6:27
John 6:35
John 6:37
John 6:47
John 6:51
John 8:32
John 8:36
John 10:27-30
John 11:25-26
John 13:34-35
John 14:2-3
John 14:16-17
John 14:18
John 14:21
John 14:23
John 14:27
John 15:9-11
John 15:12-14
John 15:16
John 20:29
Acts 2:36
Acts 2:38
Acts 16:31
Acts 17:24-25
Acts 20:32
Acts 20:35
Romans 1:16-17
Romans 5:1
Romans 5:3-5
Romans 5:8
Romans 5:17
Romans 6:3-4
Romans 6:14
Romans 6:22
Romans 6:23
Romans 8:2
Romans 8:6
Romans 8:15
Romans 8:18
Romans 8:26
Romans 8:28
Romans 8:29
Romans 8:31
Romans 8:32
Romans 8:37
Romans 8:38-39
Romans 10:9-10
Romans 10:17
Romans 12:1
Romans 12:2
Romans 12:10
Romans 12:11
Romans 12:13
Romans 12:21
Romans 13:10
Romans 14:8
Romans 15:4
1 Corinthians 2:9
1 Corinthians 3:19-20
1 Corinthians 4:20
1 Corinthians 6:19-20
1 Corinthians 10:13
1 Corinthians 11:32
1 Corinthians 13:1-3
1 Corinthians 13:4-6
1 Corinthians 13:7-8
1 Corinthians 13:13
1 Corinthians 15:56-57
1 Corinthians 15:58
2 Corinthians 1:21-22
2 Corinthians 3:4-6
2 Corinthians 3:17
2 Corinthians 4:7-10
2 Corinthians 4:11
2 Corinthians 4:16
2 Corinthians 5:9-10
2 Corinthians 5:17
2 Corinthians 5:21
2 Corinthians 7:1
2 Corinthians 7:10
2 Corinthians 9:7
2 Corinthians 10:17-18
2 Corinthians 12:9
Galatians 1:10
Galatians 3:24-26
Galatians 5:1
Galatians 5:16-17
Galatians 5:22-23
Galatians 5:24
Galatians 6:1
Galatians 6:2
311ns 3:12-14
Colossians 3:15
Colossians 3:16
Colossians 3:17
Colossians 3:23-24
1 Thessalonians 5:15
1 Thessalonians 5:16-18
1 Thessalonians 5:23-24
2 Thessalonians 3:3
2 Thessalonians 3:5
1 Timothy 1:17
1 Timothy 6:12
2 Timothy 1:7
2 Timothy 1:8-9
2 Timothy 2:2
2 Timothy 2:15
2 Timothy 2:22
2 Timothy 3:16-17
2 Timothy 4:7
Titus 3:4-7
Hebrews 2:18
Hebrews 4:12
Hebrews 4:15
Hebrews 4:16
Hebrews 6:11-12
Hebrews 10:23
Hebrews 10:24-25
Hebrews 11:1
Hebrews 11:6
Hebrews 12:1-2
Hebrews 12:3
Hebrews 13:1-2
Hebrews 13:3
Hebrews 13:5
Hebrews 13:6
Hebrews 13:8
Hebrews 13:15
Hebrews 13:16
James 1:2-4
James 1:5-6
James 1:12
James 1:13-14
James 1:17-18
James 1:19-20
James 1:22-25
James 3:7-9
James 4:7
James 4:8
James 4:11-12
James 5:8
1 Peter 1:3-5
1 Peter 1:24-25
1 Peter 2:2-3
1 Peter 2:9
1 Peter 2:11
1 Peter 3:8-9
1 Peter 3:10-11
1 Peter 3:12-13
1 Peter 3:18
1 Peter 4:12-13
1 Peter 4:16
1 Peter 5:8-9
1 Peter 5:10
2 Peter 3:8
2 Peter 3:9
1 John 1:9
1 John 2:4-6
1 John 2:15-17
1 John 2:24-25
1 John 2:28
1 John 3:1
1 John 3:2
1 John 4:4
1 John 4:7-8
1 John 4:9
1 John 4:10-11
1 John 4:12-13
1 John 4:14
1 John 4:18
1 John 4:20-21
Jude 1:20-21
Jude 1:24-25
Revelation 1:8
Revelation 3:20
Revelation 4:11
Revelation 22:20verse.conkyrc
# Use Xft?
use_xft yes
xftfont monofur:Bold:size=12
xftalpha 0.8
text_buffer_size 4096
# Update interval in seconds
update_interval 10
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 600 300
# Draw shades?
draw_shades yes
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_margin 5
# border width
border_width 1
# Default colors and also border colors
default_color white
own_window_colour black
color1 steelblue
# Text alignment, other possible values are commented
alignment bottom_left
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 10
gap_y 5
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer none
TEXT
${font Lt Oksana Medium:size=12}${execpi 300 ~/bin/bibleverse/verse.sh}I placed these three files in ~/bin/bibleverse and added conky -c ~/bin/bibleverse/verse.conkyrc to autostart.sh
![]()
<'(((>< power of God, the salvation of everyone who believes. ><)))'>
EeePC 900a : #! 9.04 : Atom 1.60 GHz : 1 GB RAM : 4 GB SSD
