Created
August 11, 2018 00:24
-
-
Save bendavis78/bcf6ba76c6f099bb4c534c405736cb1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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