You can find instructions on building xwinwrap here
I've written a script that will
- remove the current background and start xwinwrap, if xwinwrap is not running
- restore the current background and kill xwinwrap, if xwinwrap is running
I use this script as a launcher on my gnome panel, so I can toggle my background between a wallpaper and xwinwrap. The script is currently hard coded to run the electricsheep screensaver hack. If you use xwinwrap, You can modify the script for whatever your preferred hack is by editing the xwinwrap_string.
Code:
#!/bin/bash
#
# xwinset.sh version 1.0
# Created: 3/23/07 by mugwump67
#
# This script will:
# turn on xwinwrap if it is off and set background option to 'none'
# turn off xwinwrap if it is on and set background option to stretched
#
# future enhancements
# Currently only switches between none and stretched
# - better to save all current background settings to config file and restore from there
# Add right-click integration with nautilus (i.e. click mpeg/hack to set)
#
#---------------------------
# outline:
#---------------------------
# If xwinwrap is running,
# shut off xwinwrap
# set background option to stretched
# If xwinwrap is off
# If current background is not "none"
# set current background to "none"
# start xwinwrap
# --------------------------
xwinwrap_string="nice -n 15 xwinwrap -ni -o 0.11 -fs -s -sp -st -b -nf -- /usr/bin/electricsheep --root 1 --nick mugwump67 --zoom 1 --max-megabytes 5000 -window-id WID"
# if xwinwrap is running,
if [ -n "$(ps | grep xwinwrap)" ]
then
# shut off xwinwrap, set backgound option to 'stretched'
killall xwinwrap
gconftool-2 --type string -s /desktop/gnome/background/picture_options stretched
else
# xwinwrap is off
# save current background option to 'none'
# start xwinwrap
gconftool-2 --type string -s /desktop/gnome/background/picture_options none
$xwinwrap_string &
fi
This is the first significant shell script that I've ever written, and its missing a few things because I couldn't figure out how to do them yet (these are listed in future enhancements). Nonetheless, I hope others find it useful
Bookmarks