Changing wallpaper on the latest KDE is just a right lick and choosing "Desktop Settings"... but what if you had conky running and you wanted to change the wallpaper / background using command line - like from a batch file - that is a problem.
Shall detail running conky in another post ...
Things to have installed - KDE 4.5.2, eterm
Here we create a folder "walls" in home folder and another called "gamma" in walls - as I have all my wallpapers in walls folder - you can modify as you please. The gamma folder holds the copy of the same wallpaper as the one used except we use convert [from imagemagick] to darken the image.
#!/bin/bash
The listed file is linked below and fbsetbg is a script file from fluxbox to set your wallpaper.fileext=`echo "$1"|awk -F . '{print $NF}'`;filename=$(basename "$1" "$fileext");out_file="$filename"gamma."$fileext";rm ~/walls/gamma/*;
cd ~/walls/gamma;convert "$1" -gamma 0.7,0.7,0.7 "$out_file";kwriteconfig --file plasma-desktop-appletsrc --group Containments --group 1 --group Wallpaper --group image --key wallpaper "$1";kquitapp plasma-desktop;
sleep 1;plasma-desktop ;~/bin/fbsetbg "$out_file";
conwall.sh
No comments:
Post a Comment