X11 & Windows cursor building API 👷
clickgen is API for building X11 and Windows Cursors from .png
files. clickgen is using anicursorgen
and xcursorgen
under the hood.
pip3 install clickgen
yay -S python-clickgen
pamac build python-clickgen
clickgen -h
- Pillow/python-pillow
- libxcursor-dev
- libx11-dev
- libpng-dev (<=1.6)
brew cask install xquartz libpng
sudo apt install libx11-dev libxcursor-dev libpng-dev
sudo pacman -S libx11 libxcursor libpng
sudo dnf install libx11-devel libxcursor-devel libpng-devel
🔥 Check examples here
Recommended: Design Cursor
bitmaps
images(.png) in 200x200 pixel for HiDPI size support. Note: Provide cursor's hotspot respect tobitmaps
, Clickgen'sLinker
automatically generate hotspots for eachcursor_sizes
. Check hotspots.json file for more info.
import json
from clickgen import configsgen
with open('./hotspots.json', 'r') as hotspot_file:
hotspots = json.loads(hotspot_file.read())
configsgen.generate_configs(
imgs_dir="./bitmaps", cursor_sizes=[24, 28], out_dir="./configs", delay=50)
import json
from clickgen import build_cursor_theme
with open('./hotspots.json', 'r') as hotspot_file:
hotspots = json.loads(hotspot_file.read())
build_cursor_theme(
name="My Cursor", image_dir="./bitmaps", cursor_sizes=[24, 28], hotspots=hotspots, out_path="./themes", delay=50)
import json
from clickgen import build_x11_cursor_theme
with open('./hotspots.json', 'r') as hotspot_file:
hotspots = json.loads(hotspot_file.read())
build_x11_cursor_theme(
name="My Cursor", image_dir="./bitmaps", cursor_sizes=[24, 28], hotspots=hotspots, out_path="./themes", delay=50)
import json
from clickgen import build_win_cursor_theme
with open('./hotspots.json', 'r') as hotspot_file:
hotspots = json.loads(hotspot_file.read())
build_win_cursor_theme(
name="My Cursor", image_dir="./bitmaps", cursor_sizes=[24, 28], hotspots=hotspots, out_path="./themes", delay=50)