Differences between version 2 and predecessor to the previous major change of CyberLeo/Scraps/XineramaBackground.
Other diffs: Previous Revision, Previous Author
Newer page: | version 2 | Last edited on Sunday, 18 December 2011 9:36:56 | by CyberLeo | Revert |
Older page: | version 1 | Last edited on Monday, 11 April 2011 9:48:20 | by CyberLeo | Revert |
@@ -1,5 +1,5 @@
-Uses CyberLeo/Scraps/XineramaDump
+Uses [XineramaDump|
CyberLeo/Scraps/XineramaDump]
*Still* *a* *work* *in* *progress*
<code brush="bash">
version 2
Uses XineramaDump
Still a work in progress
# Compute the full canvas size, and the size of each display canvas_size() { xwininfo -root | sed -e ' /^ *\(Width\|Height\)/ { s/: /=/; H }; /./d; $ { g; s/\n/ /g; s/^\(.*\)$/\L\1/ }; /^$/d ' } canvas=$(eval $(canvas_size); printf "%ux%u" "${width}" "${height}") printf "Building canvas (%s)\n" "${canvas}" convert -size ${canvas} xc:transparent canvas.png xinerama_dump | while read line do eval ${line} printf "Processing screen %u (%ux%u+%u+%u)\n" "${screen}" "${width}" "${height}" "${x_org}" "${y_org}" img="$(printf "bg-%u.png" "${screen}")" [ -f "${img}" ] || img="${HOME}/.backgrounds/blank.png" convert "${img}" -resize ${width}x${height}\! canvas-tmp.png composite -geometry +${x_org}+${y_org} canvas-tmp.png canvas.png canvas.png rm -f canvas-tmp.png done # Reload background icewmbg -r exit # This will take a while. Display a blank background ln -svf .backgrounds/blank.png ~/.background icewmbg -r # Create canvas convert -size 3360x1080 xc:transparent canvas.png # Prescale source images convert ~/.backgrounds/blank.png -resize 1920x1080\! bg-0.png convert ~/.backgrounds/musicfox-wallpaper.png -resize 1440x900\! bg-1.png # Composite images onto canvas composite bg-0.png canvas.png canvas.png composite -geometry +1920+180 bg-1.png canvas.png canvas.png # Load newly created background ln -svf tmp/background/canvas.png ~/.background icewmbg -r