A python script to parse windows .ani cursors via xcursorgen. Inspired from the desire to bring NOiiRE's beautiful cursors to linux.
This script requires the numpy and pillow libaries, which you can set up through a python virtual environment:
# Set-up with pip
$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install .
# Set-up with uv
$ uv venv
$ source .venv/bin/activate
$ uv syncYou will also need to install xcursorgen for the script to generate the cursors:
# Arch
sudo pacman -S xcursorgen
# Debian/Mint/Ubuntu
sudo apt install xcursorgen
# Fedora
sudo dnf install xcursorgenBefore using the script, you need to do the following:
- Create a new directory for your theme:
# To install the theme for the current user:
$ cd ~/.local/share/icons
# To install the theme for everyone on the system:
# $ cd /usr/share/icons
$ mkdir -p <ThemeName>/ani- Copy your .ani files to
~/.local/share/icons/<ThemeName>/ani - Create a
config.tomlfile in~/.local/share/icons/<ThemeName>
After this setup, you can proceed to run the script:
$ win2xcursor --theme=<ThemeName>The config file for this project consists of a series of cursor items, each of which with the next structure:
[[cursor]]
file = "..." # The name of your ANI file, ending on .ani
name = "..." # The name of the associated cursor
aliases = ["..."] # Cursor aliasesThe aliases property should be defined as an empty list [] when a cursor has no defined aliases.
Additionally, smaller cursors can also be scaled by specifying a scale=<number>, property.
A template config.toml file has been provided in this repository, which contains most of the standard cursor names/aliases and a few additional associations for normally lacking icons.