Another example of how to use xcur2png

tksmashiw2008-08-06

In this entry, I will show you how to change color(hue) of arbitrary X11 mouse cursor by using xcur2png. You need to install ImageMagick and xcursorgen (included in xorg-x11-apps package on Fedora) on ahead.

Golden XCursor 3D is one of the most beautiful cursor I've ever seen. But it have been left for about five years, and there is no way to get source images from original author.
So I'm going to change the color of Golden XCursor 3D to red.


$ []wget 'http://www.gnome-look.org/CONTENT/content-files/5507-Golden-XCursors-3D-0.8.tar.bz2'[]
$ []mkdir work ; cd work[] []make and move to working directory[]
$ []tar jxf ../5507-Golden-XCursors-3D-0.8.tar.bz2[]
$ []ls Golden-XCursors-3D-0.8[]
[]COPYING Gold/ README default/[]
$ []find Golden-XCursors-3D-0.8/Gold/cursors/ -type f -exec xcur2png {} \;[]
[]pass all normal file (which means not a symbolic link) in[]
[] Golden-XCursors-3D-0.8/Gold/cursors/to xcur2png[]
$ []ls[]
[]Golden-XCursors-3D-0.8[] []fleur_021.png pirate_011.png[]
[]bd_double_arrow.conf[] []fleur_022.png pirate_012.png[]
[]bd_double_arrow_000.png fleur_023.png pirate_013.png[]
[]...apprev...[]
$ []mogrify -modulate 100,100,67 *.png[] []change the color of all images to red.[]
[]See[] http://www.imagemagick.org/script/command-line-options.php#modulate .
$ []for file in *.conf ; do xcursorgen $file ${file%%.conf} ;done[]
[]build new red cursors by xcursorgen.[]
$ []rm -f *.png *.conf[]
$ []ls[]
[]Golden-XCursors-3D-0.8[] []fd_double_arrow left_ptr v_double_arrow[]
[]bd_double_arrow fleur left_ptr_watch watch[]
[]cross h_double_arrow pirate xterm[]
[]crossed_circle hand question_arrow[]
$ []find . -maxdepth 1 -type f -print |xargs mv --target-directory=Golden-XCursors-3D-0.8/Gold/cursors/[]
[]write created cursors on original place.[]
$ []mv Golden-XCursors-3D-0.8/Gold ~/.icons/Red[]
[]move into ~/.icons directory by the name of Red[]
Now you can select redly recolored Golden XCursor 3D in Appearance Preference dialog.