Skip to content

Instantly share code, notes, and snippets.

@TiZ-HugLife
Created March 29, 2015 21:37
Show Gist options
  • Save TiZ-HugLife/0cf7bcd29bbd7e4f4f7a to your computer and use it in GitHub Desktop.
Save TiZ-HugLife/0cf7bcd29bbd7e4f4f7a to your computer and use it in GitHub Desktop.
Script that blurs xfce's current wallpaper and sets it as lightdm's background.
#!/bin/bash
[[ "$(whoami)" != "root" ]] && exit 1
[[ "$(hostname)" = "TiZLappy" ]] && RES="1600x900" && MON="eDP1"
[[ "$(hostname)" = "NH116" ]] && RES="1680x1050" && MON="1"
[[ -z "$RES" ]] && exit 1
WALL="$(xmlstarlet sel -t -v "//property[@name='monitor$MON']/property[@name='workspace0']/property[@name='last-image']/@value" /home/trent/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml)"
gm convert "$WALL" -resize $RES^ -gravity center -extent $RES -blur 0x5 /var/lib/lightdm/background.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment