NEVER MIND. THE GNU PROJECT IMPRESSES AGAIN.
Please check out the org-mode to emacs for a program that did all this years ago.
Made a small change to the TextFileToTable script. Now the user is able to exploit more of the Text::ASCIITable work with the addition of horizontal lines.
By inserting a ‘<<hr>>’ on a line by itself, the program will put another horizontal rule there.
perl TextFileToTable.pl [delimiter] [File to be read]
perl TextFileToTable.pl \& data.txt
| ID | Fruit | Color |
| 1 | apple | red |
| 2 | banana | yellow |
| 3 | orange | orange |
Grab the new script here:
Feh can Stretch, Center, and Tile a background image, among other functions, but cannot Scale an image. That is fine. Feh follows the Unix Philosophy. This is where Image Magick and some bash scripting come in.
The plan is to create a directory of images that a bash script will peruse and feh will plaster to the background.
Start by compiling a directory of images to use. Copy these images to a new directory as the next step could irrevocably change the size of the used images. This is unlikely, however, as Image Magick tends to leave the originals alone.
Enter this into a terminal emulator:
convert * -resize 1024×768 background
It runs “convert” on all files. Resizes them to a best fit within a 1024 by 768 pixel box. Then names the new copy after the last argument. Adjust the numbers to your screen’s resolution. You can find it using:
xdpyinfo | grep dimensions
After the images are properly sized, it is time to set up the random selector. This is the bash code used. It assumes you have feh installed. Stick it in a file named “Roller” (or whatever you want; change the $NAME variable so that it can prevent itself from being selected) and make it executable.
# Version 1
# Does not sterilize input and such
# Assumes feh is installed
# Change to match the name of the file the script sits in
# Only need to change the script's name once this way
# Change to the directory that contains the images
# Counts the number of files in the directory
count=`ls $dir | wc -l`
# Sets a variable for counting the number of files skipped to that point
# Generates a psuedo-random number
# Sets ran_num to an integer in range:
# 0 to $count - 1
let "ran_num %= $count"
# For all files in the directory
for file in $dir
# If the file to be used has been found
if [ "$j" -eq "$ran_num" ]
# If the image to be used is not this script
# (Originally, this script sat in the same directory as the images)
if [ "$file" != "$NAME" ]
# Set the image using feh
feh --bg-center $file
# Break out of the loop: it is done
# Skip past Roller, will use the next file found
# Appropriate file not found yet: increment and try again
Edit the $NAME and $dir variables to your needs.