Skip to content

eltaters/win2xcursor

Repository files navigation

win2xcursor

A python script to parse windows .ani cursors via xcursorgen. Inspired from the desire to bring NOiiRE's beautiful cursors to linux.

Installation

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 sync

You 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 xcursorgen

Usage

Before using the script, you need to do the following:

  1. 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
  1. Copy your .ani files to ~/.local/share/icons/<ThemeName>/ani
  2. Create a config.toml file in ~/.local/share/icons/<ThemeName>

After this setup, you can proceed to run the script:

$ win2xcursor --theme=<ThemeName>

config.toml

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 aliases

The 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.

Video Showcase

noiire.mp4

About

A python script to parse windows .ani cursors to linux via xcursorgen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages