Skip to content

Instantly share code, notes, and snippets.

@bendavis78
Created August 11, 2018 00:24
Show Gist options
  • Save bendavis78/bcf6ba76c6f099bb4c534c405736cb1d to your computer and use it in GitHub Desktop.
Save bendavis78/bcf6ba76c6f099bb4c534c405736cb1d to your computer and use it in GitHub Desktop.
#!/bin/sh
[ -z "$1" ] && echo "Usage: $0 path" && exit 0;
[ ! -f "$1" ] && echo "File not found: $1" && exit 1;
img=$(realpath $1);
xfconf_query="/usr/bin/xfconf-query";
query() {
$xfconf_query -c xfce4-desktop -l | grep '^/backdrop/.*/last-image' || echo "fail" && exit 1
}
query | while read p; do
$xfconf_query -c xfce4-desktop -p $p --set "$img";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment