Skip to content

Instantly share code, notes, and snippets.

@micrypt
Created September 29, 2010 22:58
Show Gist options
  • Save micrypt/603732 to your computer and use it in GitHub Desktop.
Save micrypt/603732 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Check whether the external monitor is connected
xrandr | grep VGA | grep " connected "
# 0 is returned on success
if [ $? -eq 0 ]; then
gconftool -t string -s /desktop/gnome/background/picture_filename /path/to/wallpaper.png
else
gconftool -t string -s /desktop/gnome/background/picture_filename /path/to/wallpaper_small.png
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment