set_wallpaper.sh 324 B

123456789101112
  1. #!/bin/sh
  2. if empty? "$1" then exec sh -c "echo 'usage: $0 WALLPAPER'"
  3. if not stat -Lq "$1" then exec sh -c "echo '$0: $1 does not exist'"
  4. export-cmd DESKTOP cat /var/run/.wallpaper.pid
  5. if empty? "$DESKTOP" then sh -c "echo '$0: No wallpaper running?'"
  6. echo "wallpaper=$1" > $HOME/.wallpaper.conf
  7. kill -SIGUSR1 $DESKTOP