bg-gen (553B)
1 #!/bin/sh 2 bg_set() { xwallpaper --zoom "$1"; } 3 4 CL1=$(xrdb -query | awk '/color0/{print $2;exit}') 5 CL2=$(xrdb -query | awk '/color7/{print $2;exit}') 6 7 mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/bg-gen" 8 IMG="${XDG_CACHE_HOME:-$HOME/.cache}/bg-gen/${CL1}_${CL2}.png" 9 10 if [ ! -f "$IMG" ]; then 11 RES="683x384" 12 #RES="1366x768" 13 #TAGS="xc: -attenuate 0.3 +noise Random" 14 #TAGS="xc: -attenuate 0.3 +noise Random -paint 10" 15 TAGS="plasma:" 16 convert -size "$RES" $TAGS \ 17 -channel B -separate +channel \ 18 +level-colors "$CL1,$CL2" \ 19 "$IMG" 20 fi 21 22 bg_set "$IMG"