win2xcur is a tool that converts cursors from Windows format (*.cur, *.ani) to Xcursor format. It also contains x2wincur which does the opposite. https://github.com/quantum5/win2xcur
Find a file
2020-10-04 03:57:39 -04:00
.github/workflows Remove dependency on xcursorgen (#3) 2020-10-04 02:30:00 -04:00
sample Add example cursor created by hand 2020-09-26 18:26:27 -04:00
win2xcur Premultiply alpha when converting to Xcursor 2020-10-04 03:57:39 -04:00
.flake8 Enforce import order 2020-09-27 01:02:12 -04:00
.gitignore Initial commit 2020-09-26 18:14:55 -04:00
codecov.yml Disable codecov status 2020-10-03 15:11:26 -04:00
mypy.ini More strict mypy checking 2020-09-27 13:58:51 -04:00
README.md Add x2wincur to README.md 2020-10-03 01:56:26 -04:00
requirements.txt Premultiply alpha when converting to Xcursor 2020-10-04 03:57:39 -04:00
setup.py Premultiply alpha when converting to Xcursor 2020-10-04 03:57:39 -04:00

win2xcur and x2wincur Build Status PyPI PyPI - Format PyPI - Python Version

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.

Installation

To install the latest stable version:

pip install win2xcur

To install from GitHub:

pip install -e git+https://github.com/quantum5/win2xcur.git

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/