+ Reply to Thread
Results 1 to 2 of 2

Thread: Starry, starry night

  1. #1
    DarkLordoftheMonkeys's Avatar
    DarkLordoftheMonkeys is offline Programming Professional
    Join Date
    Oct 2009
    Location
    Massachussets
    Posts
    255
    Blog Entries
    56
    Rep Power
    11

    Starry, starry night

    Thanks to Dargueta for the tutorial on generating ANSI color text. I'm using the output of this shell program as my desktop wallpaper:

    Code:
    #!/bin/bash
    # This script creates a neat looking space background for the terminal.
    
    for((i=0; i < 1000; i++))
    do
    	printf "\033[40m";
    	declare -i spaces=$RANDOM/1024;
    	for((j=0; j < $spaces; j++))
    	do
    		printf " ";
    	done
    	colors=([0]="\033[31m" [1]="\033[32m" [2]="\033[33m" [3]="\033[34m" [4]="\033[35m" [5]="\033[36m" [6]="\033[37m");
    	declare -i color=$RANDOM%7;
    	declare -i plusordot=$RANDOM%4;
    	if [ $plusordot -ne 0 ]
    	then
    		printf "${colors[$color]}.\033[0m";
    	else
    		printf "${colors[$color]}+\033[0m";
    	fi
    done
    echo "";
    unset i j spaces colors color plusordot;
    I'm probably going to modify this script to make the bash prompt appear at the top of the terminal window, so you're typing commands over the background.
    Life's too short to be cool. Be a nerd.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    asafe's Avatar
    asafe is offline Programmer
    Join Date
    Jul 2009
    Location
    Here
    Posts
    110
    Rep Power
    10

    Re: Starry, starry night

    Nice, just need to have the prompt above the background. Maybe you could hack $PS1?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. The Good Morning and Night Thread.
    By Donovan in forum Games
    Replies: 10
    Last Post: 08-19-2010, 01:48 AM
  2. Ibiza Night - Another deviantion by me
    By Jaan in forum The Lounge
    Replies: 2
    Last Post: 11-30-2009, 04:59 PM
  3. Kyle Maynard event (Auburn Fight Night)
    By xXHalfSliceXx in forum The Lounge
    Replies: 6
    Last Post: 04-30-2009, 08:37 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts