You are not logged in.

#1 2009-04-19 19:25:42

timetrap
Member
From: Here and There
Registered: 2008-06-05
Posts: 342
Website

Dynamically Generated Wallpaper

Recently I stumbled across evr's excellent noaa wallpaper generator in the forums. So I made a few modifications; I use feh to set the wallpaper, black background instead of a transparent one, and I put it in a loop.

200904191437581280x800s.th.png

#!/bin/bash
# Deps: imagemagick, feh

TEMPDIR="/tmp/"

while [ 1 ]
        do
        cd $TEMPDIR
        rm latest.gif
        wget http://radar.weather.gov/Conus/RadarImg/latest.gif 
        convert -modulate 75 -negate latest.gif latest.gif
        #convert -transparent "#b03e00" latest.gif latest.gif
        convert -fill "#000000" -opaque "#b03e00" latest.gif latest.gif
        mv $TEMPDIR/latest.gif radarwall.gif
        feh --bg-scale radarwall.gif
        #gconftool-2 -t str --set /desktop/gnome/background/picture_filename /tmp/radarwall.gif
        sleep 300 
        done

I also created a fortune wallpaper generator (See the screen shot below).

200904191435541280x800s.th.png

#!/bin/bash
#Deps: imagemagick, feh

TEMPDIR=/tmp
#bgcolor="#222222"
bgcolor="#000000"
fgcolor="#dcdccc"

while [ 1 ]
    do 
        fortune | expand > $TEMPDIR/quote.txt 

        convert -background $bgcolor -fill $fgcolor -font DejaVu-Sans-Book \
        -pointsize 40 -size 1200x label:@$TEMPDIR/quote.txt \
        $TEMPDIR/backgound.png

        feh --bg-center $TEMPDIR/backgound.png
        sleep 300
    done

Anyone else have a wallpaper generator they want to share?

EDIT: Also here is a brief wallpaper switcher. It will randomly pick out and set a wallpaper from a directory of images. Just point it at a directory full of wallpaper images.

#!/bin/bash

WALLPAPERS="$HOME/Pictures/Desktops"
ALIST=( `ls -w1 $WALLPAPERS` )
RANGE=${#ALIST[*]}

while [ 1 ]
        do
                SHOW=$(( $RANDOM % $RANGE ))
                feh --bg-scale $WALLPAPERS/${ALIST[$SHOW]}
                sleep 300
        done

Last edited by timetrap (2009-04-23 20:34:06)

Offline

#2 2009-04-19 23:09:48

jwcxz
Member
Registered: 2008-09-23
Posts: 239
Website

Re: Dynamically Generated Wallpaper

This is a really nice idea.  The other day I had a similar thought...  My desk faces direct sunlight for a few hours during the day.  During that time, it's very difficult to distinguish between my dark color scheme, my desktop, and the window edges.  So, if I write a quick script that will lighten or darken the wallpaper based on the time of day, I would improve overall visiblity of my computer.


-- jwc
http://jwcxz.com/ | blog
dotman - manage your dotfiles across multiple environments
icsy - an alarm for powernappers

Offline

#3 2009-04-20 01:08:09

HashBox
Member
Registered: 2009-01-22
Posts: 271

Re: Dynamically Generated Wallpaper

jwcxz wrote:

This is a really nice idea.  The other day I had a similar thought...  My desk faces direct sunlight for a few hours during the day.  During that time, it's very difficult to distinguish between my dark color scheme, my desktop, and the window edges.  So, if I write a quick script that will lighten or darken the wallpaper based on the time of day, I would improve overall visiblity of my computer.

Just thought I'd point out that hsetroot would probably be useful here, from the help:

Manipulations:
 -tint <color>                 Tint the current image
 -blur <radius>             Blur the current image
 -sharpen <radius>          Sharpen the current image
 -contrast <amount>         Adjust contrast of current image
 -brightness <amount>       Adjust brightness of current image
 -gamma <amount>            Adjust gamma level of current image
 -flipv                     Flip the current image vertically
 -fliph                     Flip the current image horizontally
 -flipd                     Flip the current image diagonally

Offline

#4 2009-04-20 12:38:17

jwcxz
Member
Registered: 2008-09-23
Posts: 239
Website

Re: Dynamically Generated Wallpaper

HashBox wrote:

Just thought I'd point out that hsetroot would probably be useful here, from the help:

Interesting... thanks for that.  It wouldn't work on my KDE environment, but it would certainly work on my other computer, which only uses fluxbox.  I'll look into it.


-- jwc
http://jwcxz.com/ | blog
dotman - manage your dotfiles across multiple environments
icsy - an alarm for powernappers

Offline

#5 2009-04-21 14:14:30

deicist
Member
Registered: 2009-03-17
Posts: 36

Re: Dynamically Generated Wallpaper

In a similar vein, here's the random APOD wallpaper script.  Sets your desktop to a random picture from the astronomy picture of the day site.  Works with xfce4, gnome or feh (no kde love sorry)

linky

Offline

#6 2009-04-23 00:22:36

dr/owned
Member
Registered: 2009-01-09
Posts: 136

Re: Dynamically Generated Wallpaper

Very interesting stuff...reminds me of when I set the Vista Aurora screensaver to my active wallpaper (in Vista of course).  It became quite an annoyance to have my eyes constantly pulled to the ever moving image but I like the idea of a wallpaper that updates at a set interval.

Offline

#7 2009-04-23 10:42:02

timetrap
Member
From: Here and There
Registered: 2008-06-05
Posts: 342
Website

Re: Dynamically Generated Wallpaper

dr/owned wrote:

Very interesting stuff...reminds me of when I set the Vista Aurora screensaver to my active wallpaper (in Vista of course).  It became quite an annoyance to have my eyes constantly pulled to the ever moving image but I like the idea of a wallpaper that updates at a set interval.

Even setting it to run once per login is great. You never get bored of your wallpaper.

Offline

Board footer

Powered by FluxBB