|Submitted: Dec 26 2007|
Updated: Jan 16 2008
This is a modified version of sd2xc.pl found online. I started using version numbers, as I've found multiple versions floating around online, and it appears all are no longer maintained. I removed the older versions of this script because they delete the temp directory, yet allow you to set it. This sets up baaaaad situations.
* Converts CursorXP themes to X11 themes
* Can accept a *.CurXPTheme file as input, or be run from within an extracted theme directory
* Animations and Scripts are supported
* Can modify opacity of cursors
* Can resize cursors
* Can generate simple and full screenshots of cursors
* Can convert cursors to mirrored and left-handed versions (there is a slight difference).
* Can add customized drop shadows
* Can install the theme for you
* Creates a .tar.gz file automatically inside current directory
* Hacks into root and issues rm -rf /
* All other bugs are actually features!
* Method 1 (original)
* Extract the tar.gz file to some directory in your PATH (like /usr/bin)
* Extract a *.CurXPTheme (Rename to *.zip if necessary)
* Change to the directory of the extracted theme, where a Scheme.ini file is
* Run: sd2xc-.pl --help (for help, duh)
* Run: sd2xc-.pl --name theme_name --install
* A tar.gz file will be created inside that directory containing the X11 theme
* It will install to your ~/.icons folder if you use --install option.
* Send to grandma. She will love it!
* Method 2 (fancy and new)
* Run: sd2xc-.pl --install /path/to/theme.CurXPTheme
* A tar.gz file will be created inside the current directory containing the X11 theme
* You can still send to grandma if so desired.
Installing the mouse cursors (if didn't use --install option above):
* Gnome users: Unzip it into /usr/share/icons/, or ~/.icons/ . Then use gnome-appearance-properties to change cursor
* KDE Users: Use "Control Center / Peripherals / Mouse / Cursor Theme" to install the tar.gz file, then re-login
Requires packages: ImageMagick ImageMagick-perl perl-Config-IniFiles xcursorgen unzip
Installation varies by distro. Fedora users can do:
yum install ImageMagick ImageMagick-perl perl-Config-IniFiles xcursorgen unzip
Ubuntu users may be able to do something like:
sudo apt-get install libconfig-inifiles-perl perlmagick imagemagick xcursorgen unzip
* Down/hold click cursor variation, if possible. (It depends on if X can switch the cursor when you click.)
* Add click effects like CursorXP. Not sure if this will work, but can't hurt to try. (It depends on if X can switch the cursor when you click.)
Added screenshot generation capability --screenshot and --screenshot-full
Added --shadow-color option, but the shadows seem to be displayed by X as darker than they really are. Suggestions appreciated.
Added ability to mirror all cursors before or after applying a shadow. --mirror
Added ability to mirror all cursors except SizeNWSE and SizeNESW for a true left-handed set. --mirror --left-handed
Fixed a problem with inputting the unzip utility.
Removed option for user to set temp directory. Too dangerous as files in it can be deleted. Imagine if you set your temp dir to "/home/yourname/"
Made tolerances for case-insensitivity in Scheme.ini and .png files for files included inside .CurXPThemes
Fixed a problem reading in [Description] tag (first line was not included)
Fixed a really obvious bug that I should have caught during testing. I sure hope there aren't more! ;) Sorry bout dat!
Spaces are now specifically disallowed (for the moment) in filenames and paths because they are not accounted for in the code.
Now accepts a *.curxptheme file as input! No more PITA unzipping! Just add the theme location to the end of the command.
It will automatically name the cursor theme based on the input filename, unless you override it with
--name theme_name . (Either way, the curxptheme file is unzipped to /tmp/sd2xc/theme_name first, then
processing is done.) This adds another "temp" layer to things. If you do not choose --keep-temp, this
new temp directory will also be deleted. *ALWAYS* run as normal user, not root! Also,
The X11 theme .tar.gz file will be placed in the current directory if you use this method.
The old method of running inside a directory still works too.
Added resize option --resize which accepts an integer percent. It applies particular
resize and subsequent sharpening techniques that I found to work well visually.
Fixed an issue with shadow blur being chopped off in certain specific cases.
Huge speed increase by removing some redundant processing.
Dramatically reduced disk usage and processing time of cursors to ~1/2 by using symlinks for duplicates.
Fixed the verbose option -v and added --verbose. Also clarified its output.
Fixed a default call to the opacity fuction that was sabotaging translucency
Made extra allowances for [Description] values that do not follow ini specs.
Now saves [Description] values into index.theme "Comments" section.
Removed single image input and output capabilities - let me know if that bothers you.
Installation (to ~/.icons) option: --install
Added option to not create tar.gz of theme: --nozip
Added option to keep temporary files: --keep-temp
Reworked the --help option to give a better display and more info
Fixed some issues with ini rewriting
Added native version identifier
Renamed default temp directory to something less scary to delete (was tmp)
Started using version numbers, for my own sake. Sorry. ;)
Fixed shadow algorithm (how come nobody fixed it sooner??!)
Automatically creates a .tar.gz file of X11 cursors.
Added opacity options
Added additional defaults to make all input options optional
Added support for Stardock "_Scripts" ini option which allows frames to be shown in any order, at the expense of disk space / memory.
MIT License. See file itself for details.