Skip to content

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
marguerite committed Nov 28, 2012
1 parent 8dc3211 commit 6de8710
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 5 deletions.
42 changes: 42 additions & 0 deletions README.md
@@ -0,0 +1,42 @@
# Linux Bing Wallpaper Shell Scripts

It sets Bing.com wallpaper of the Day as your Linux Desktop

supports GNOME and KDE4.

## Usage

Download these two scripts.

Put them somewhere

Change mkt varible in bing_wallpaper.sh to yours.

Give them execution permission.

Make them autostart.(Google is your friend)

So next time you boot your computer for the first time a day, it'll run once.

Next boots it will run too, but do nothing.

## Easy commands

mkdir bin
wget https://raw.github.com/marguerite/linux-bing-wallpaper/master/bing_wallpaper.sh -o bin/bing_wallpaper.sh
# If you use KDE
# wget https://raw.github.com/marguerite/linux-bing-wallpaper/master/kde4_set_wallpaper.sh
chmod +x bin/*.sh
./bin/bing_wallpaper.sh

## Crontab

You can also use cron jobs for them. But I didn't success on KDE4. Because it needs to prompt a KDE JS Console, but the user runs cron has no permission to GUI programs. You may try on GNOME.

crontab -e
1 0 * * * /home/YOUR_USERNAME/PATH/TO/SCRIPTS/bing_wallpaper.sh > /home/YOUR_USERNAME/.cronjob.log

Remove user crontabs

sudo rm -rf /var/spool/cron/tabs/YOUR_USERNAME
2 changes: 0 additions & 2 deletions bing_wallpaper.sh
Expand Up @@ -67,8 +67,6 @@ fi
if [[ `rpm -qa kdebase4-runtime` != "" ]]; then
test -e /usr/bin/xdotool || sudo zypper --no-refresh install xdotool
test -e /usr/bin/gettext || sudo zypper --no-refresh install gettext-runtime
wget https://raw.github.com/marguerite/linux-bing-wallpaper/master/kde4_set_wallpaper.sh
chmod +x kde4_set_wallpaper.sh
./kde4_set_wallpaper.sh $saveDir$picName
fi

Expand Down
6 changes: 3 additions & 3 deletions kde4_set_wallpaper.sh
Expand Up @@ -11,10 +11,10 @@ EN_CONSOLE2="Plasma Desktop Shell"

if [[ $LOCALE != "" ]]; then
JS_CONSOLE1=`LANGUAGE=$LOCALE gettext -d plasma-desktop -s "$EN_CONSOLE1"`
JS_CONSOLE2=`LANGUAGE=$LOCALE gettext -d plasma-desktop -s "$EN_CONSOLE2"`
JS_CONSOLE="$JS_CONSOLE1 - $JS_CONSOLE2"
JS_CONSOLE2=`LANGUAGE=$LOCALE gettext -d plasma-desktop -s "$EN_CONSOLE2"`
JS_CONSOLE="$JS_CONSOLE1 $JS_CONSOLE2"
else
JS_CONSOLE="$EN_CONSOLE1 - $EN_CONSOLE2"
JS_CONSOLE="$EN_CONSOLE1 $EN_CONSOLE2"
fi

js=$(mktemp)
Expand Down

0 comments on commit 6de8710

Please sign in to comment.