Skip to main content

The hassle-free cursor building toolbox 🧰

Project description

CI PyPI - Wheel Docs Code Coverage CodeFactor

Clickgen

The hassle-free cursor building toolbox 🧰

clickgen is API for building X11 and Windows Cursors from .png files. clickgen is using anicursorgen and xcursorgen under the hood.

Install

using pip

pip3 install clickgen

ArchLinux

yay -S python-clickgen

Manjaro

pamac build python-clickgen

CLI

clickgen -h

PyPi Dependencies

  • Pillow/python-pillow

Build Dependencies

  • gcc

External Libraries

  • libxcursor-dev
  • libx11-dev
  • libpng-dev (<=1.6)

Install Dependencies

macOS
brew install --cask xquartz
brew install libpng gcc
Debain/ubuntu
sudo apt install libx11-dev libxcursor-dev libpng-dev
ArchLinux/Manjaro
sudo pacman -S libx11 libxcursor libpng
Fedora/Fedora Silverblue/CentOS/RHEL
sudo dnf install libx11-devel libxcursor-devel libpng-devel

Examples

Check examples directory for building entire theme from .png files.

create a static XCursor

from pathlib import Path
from clickgen.builders import XCursor
from clickgen.core import CursorAlias

with CursorAlias.from_bitmap(png="all-scroll.png", hotspot=(5, 2)) as alias:
    x_cfg = alias.create(sizes=[(22, 22),(24, 24)])
    XCursor.create(alias_file=x_cfg, out_dir=Path("."))

create an animated XCursor

from pathlib import Path
from clickgen.builders import XCursor
from clickgen.core import CursorAlias

with CursorAlias.from_bitmap(png=["all-scroll-01.png", "all-scroll-02.png"], hotspot=(5, 2)) as alias:
    x_cfg = alias.create(sizes=[(22, 22),(24, 24)])
    XCursor.create(alias_file=x_cfg, out_dir=Path("."))

create a static Windows Cursor (.cur)

from pathlib import Path
from clickgen.builders import WindowsCursor
from clickgen.core import CursorAlias

with CursorAlias.from_bitmap(png="all-scroll.png", hotspot=(5, 2)) as alias:
    win_cfg = alias.create(sizes=(24, 24))
    WindowsCursor.create(alias_file=win_cfg, out_dir=Path("."))

create an animated Windows Cursor (.ani)

from pathlib import Path
from clickgen.builders import WindowsCursor
from clickgen.core import CursorAlias

with CursorAlias.from_bitmap(png=["all-scroll-01.png", "all-scroll-02.png"], hotspot=(5, 2)) as alias:
    win_cfg = alias.create(sizes=(24, 24))
    WindowsCursor.create(alias_file=win_cfg, out_dir=Path("."))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clickgen-1.1.9.tar.gz (29.6 kB view hashes)

Uploaded Source

Built Distribution

clickgen-1.1.9-py3-none-any.whl (31.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page