win2xcur and x2wincur

win2xcur is a tool that converts cursors from Windows format (*.cur,
*.ani) to Xcursor format. This allows Windows cursor themes to be used on
Linux, for example.
win2xcur is more than a simple image conversion tool. It preserves the cursor
hotspot and animation delay, and has an optional mode to add shadows that
replicates Windows's cursor shadow effect.
x2wincur is a tool that does the opposite: it converts cursors in the Xcursor
format to Windows format (*.cur, *.ani), allowing to use your favourite
Linux cursor themes on Windows.
win2xcurtheme converts a packaged Windows cursor theme with an INF installer
into a directory of Xcursors, which can be used to construct your own cursor
theme on Linux.
Conversely, x2wincurtheme converts a directory of Xcursors into Windows, while
generating the complementary install.inf for easy installation.
Finally, inspectcur serves as a debugging tool, able to load arbitrary Windows
or X11 cursors and show the animation settings, image sizes, and hotspots.
Installation
To install the latest stable version:
pip install win2xcur
To install from GitHub:
pip install -e git+https://github.com/quantum5/win2xcur.git
The following unofficial packages are available (use at your own risk! I don't maintain these):
- AUR:
win2xcur, which may be installed withyay -S win2xcurorparu -S win2xcur.
Usage: win2xcur
For example, if you want to convert the sample cursor to Linux format:
mkdir output/
win2xcur sample/crosshair.cur -o output/
-s can be specified to enable shadows.
Multiple cursors files can be specified on the command line.
For example, to convert a directory of cursors with shadows enabled:
win2xcur input/*.{ani,cur} -o output/
For more information, run win2xcur --help.
Usage: x2wincur
For example, if you want to convert DMZ-White to Windows:
mkdir dmz-white/
x2wincur /usr/share/icons/DMZ-White/cursors/* -o dmz-white/
Usage: win2xcurtheme
To convert an example Windows cursor theme in example with an INF installer
install.inf:
mkdir -p example-linux/cursors
win2xcurtheme example/install.inf -o example-linux/cursors
You can then create example-linux/index.theme as follows:
[Icon Theme]
Name = example
Comment = My example cursor theme.
Example = default
Usage: x2wincurtheme
To convert a whole Xcursor theme to Windows format, run x2wincurtheme on the
cursors subdirectory of an Xcursor theme, then specify a name with -n.
For example, for DMZ-White:
x2wincurtheme /usr/share/icons/DMZ-White/cursors -n DMZ-White -o dmz-white/
Usage: inspectcur
$ inspectcur /usr/share/icons/DMZ-White/cursors/left_ptr
Cursor file: /usr/share/icons/DMZ-White/cursors/left_ptr
1. nominal size 24, 24x24, hotspot: (7, 4)
2. nominal size 32, 32x32, hotspot: (10, 5)
3. nominal size 48, 48x48, hotspot: (14, 8)
$ inspectcur /usr/share/icons/DMZ-White/cursors/watch
Cursor file: /usr/share/icons/DMZ-White/cursors/watch
- Frame 0, delay 30.0 ms
1. nominal size 24, 24x24, hotspot: (12, 12)
2. nominal size 32, 32x32, hotspot: (18, 18)
3. nominal size 48, 48x48, hotspot: (24, 24)
- Frame 1, delay 30.0 ms
1. nominal size 24, 24x24, hotspot: (12, 12)
2. nominal size 32, 32x32, hotspot: (18, 18)
3. nominal size 48, 48x48, hotspot: (24, 24)
...
Troubleshooting
win2xcur, x2wincur, win2xcurtheme, and x2wincurtheme should work out of
the box on most systems. If you are using unconventional distros (e.g. Alpine)
and are getting errors related to wand, please see the
Wand documentation on installation.
If you are having issues with a particular cursor or cursor theme, feel free to open an issue. However, be sure to include:
- the problematic cursor as an attachment1 to the issue;
- the command you ran; and
- the full output of the command run.
If I can't reproduce the issue, I will not be able to help you.
-
Don't make me sign up to a website or pay to download your cursor. ↩
Metadata
Release files for win2xcur 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| win2xcur-0.2.1.tar.gz | 17.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| win2xcur-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.8 kB
Release files / win2xcur-0.2.1.tar.gz
| Download URL | win2xcur-0.2.1.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
109d0a102db2f996c2e77c4bfd0f4f02639d8681506b6e1be06891775689963d
|
|
BLAKE2b-256 checksum How to use checksums |
f2e6b487f1619a5d4c4012d4254dbe83c41a0079f23b92e5d5092c8d95632f94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / win2xcur-0.2.1-py3-none-any.whl
| Download URL | win2xcur-0.2.1-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a3d23168b1700b46276d420ae9b7e374749ddbd02665dd4fb067f90ff66f2c5
|
|
BLAKE2b-256 checksum How to use checksums |
2f39caa9bd69b2e1ace3a83d7de1b61986d6204f25ea30a4db8b36aa19d7938d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for win2xcur 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.