CursorXP to X11 Mouse Theme Converter

Nautilus Scripts

Source:

5
Score 55%
Description:

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.

Features:
* 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

Bugs:
* Hacks into root and issues rm -rf /
* All other bugs are actually features!

Using it:
* 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.

* Method 3 (nautilus script)
copy sd2xc-2.5.pl to /home/.gnome2/nautilus-scripts/
click rmb on *.CurXPThene and Choose script > sd2xc-2.5.pl and convert!
Important: The name of the file *. CurXPTheme (or the path of the file type folders) should not have spaces

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

Enjoy!


Requirements:
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

Future plans:
* 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.)



Changelog:

Version 2.5
Added compatibility with KDE4, with the addition of a more complex structure

Version 2.4
Fixed problem with gnome-appearance-properties, changes the nominal size of cursor from 1 to 32.

Version 2.3
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)

Version 2.2.1
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.

Version 2.2
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.

Version 2.1
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)

Version 2.0
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.
Last changelog:

8 years ago

12/11/2009
Added compatibility with KDE4, with the addition of a more complex structure

nachliel

7 years ago

i'm using Ubuntu 10.04, and installed the Pulse cursor and i had the same problem that sometimes the default mouse came back, then i found this:
http://www.reddit.com/r/Ubuntu/comments/c3s1e/using_1004_compiz_and_find_you_cant_completely

and it's worked fine.
good luck.

Report

C

KuduK

7 years ago

Thanks friend! I solved the problem!

Report

Padster

8 years ago

"Bugs:
* Hacks into root and issues rm -rf /"
is that a joke?

Report

C

KuduK

8 years ago

If you found a bug, you fix it?

Report

Padster

8 years ago

in the description it said that.
i was asking if it was a joke. i don't want my whole installation deleted.

Report

C

KuduK

8 years ago

Oh My God! is true! but that phrase I have not written it myself! but I copied the contents of the perl program! I do not know neither what he meant... booh

Report

ewindisch

8 years ago

I'm the original author of this script. The primary reason it is "unmaintained" is that while I've found there to be quite a bit of interest in this script, and while there have been quite a few forks of it, none of the contributions and modifications have been sent back to me!

I'm not opposed to having someone take over the maintenance of the script, to be honest, but I'd like if this could be organized.

My webpage is http://eric.windisch.us/ please email me (eric at my list name .us)

Report

C

KuduK

8 years ago

Congratulations on the excellent work you've done, and I regret not having contacted, without your work, i would have done nothing!

Report

hitmansnightmare

8 years ago

Where can I find CurXP themes?

I can only find CursorFX themes on stardock.

Report

C

KuduK

8 years ago

you can find the Cursors CurXPTheme www.wincustomize.com but there are 2 types of Cursors, the old type was CursorXP, can be converted into and X11 (curxptheme is a true .zip), the new type E CursorFX and you can not convert, or extract images of the pointer You must seek and hope to find the pointer CursorXP instead of CursorFX.

Report

hitmansnightmare

8 years ago

Great... Just what I was looking for.

By the way, after converting some cursors, I found that all of them are flickering when I move them. This flickering is stronger when dragging the scroll bar.

Is that a bug, or a feature?

Report

C

KuduK

8 years ago

X11 pointers for the maximum size is 64x64, if the original size is larger than 64x64 you can see a flicker, sd2xc not correct the issue, and you have to use GIMP.

Report

SteveD

8 years ago

Ok, cool, now if you dont mind, stop spamming the whole *-look.org websites with ugly XP cursor themes ?

Report

ArchieDA

8 years ago

C'mon, man. Give KuduK a break. If you don't like what he's doing, there's no need to be vocal about it. He's just doing his part converting stuff so others may use it.

Report

C

KuduK

8 years ago

he has only 20 years, must learn a lot from life.
This site is not his, but of all people who love linux, and want to give something.

Report

C

KuduK

8 years ago

all are free to do what they want, provided they do not impede the freedom of other people. I do not have prevented the freedom of anyone, instead you, you're telling me what to do ... you are god perhaps? This site is yours?

Report

ardchoille45

8 years ago

The *-look.org sites are here, in part, to distribute artwork and KuduK is doing an excellent job. I happen to think Kuduk's work is beautiful.

Report

blacksmith

8 years ago

There is one little detail - for Ubuntu 9.04 install req's string must be:"sudo apt-get install libconfig-inifiles-perl perlmagick imagemagick x11-apps unzip". "xcursorgen" is replaced by "x11-apps".

Report

AngelBlue01

8 years ago

I've got tons of cursors in Windows *.cur and *.ani formats. This script makes it easy to convert Stardock's cursors to X11 cursors, which is great, but I need to somehow get them into CursorXP format first.

Any ideas?

Report

C

KuduK

8 years ago

You have to convert .cur to .png, create the structure CursorXP, and after use sd2xc for X11.
To convert .cur to .png go here http://www.imageconverterplus.com/how-to-convert/cur_png.html

I hope to have helped, bye.

Report

C

KuduK

8 years ago

for .ani to .png http://www.imageconverterplus.com/help-center/work-with-icp/examples/how-to-convert/ani_png.html

Report

C

KuduK

8 years ago

But if you use UBUNTU (the god) go to http://packages.ubuntu.com/jaunty/icoutils

Report

8 years ago

12/11/2009
Added compatibility with KDE4, with the addition of a more complex structure

product-maker I4C Feb 19 2013

product-maker 8 12

File (click to download) Version Description Packagetype Downloads Date Filesize DL OCS-Install
Details
license
version
2.5
updated Nov 12 2009
added May 12 2009
downloads today
0
page views today 4
System Tags addon