Skip to main content

Script to automate symlinking files when porting Windows cursors to Linux

Project description

Lncur

A simple python script to easily port Windows cursor packs to Linux!

Install

Manually

  1. Get the executable by building it or downloaded from the releases.
  2. Run:
mv lncur ~/.local/bin/

Don't forget to add ~/.local/bin to your $PATH !

Aur

ln is also available on the AUR with your AUR helper (in my case paru).

$ paru -S lncur

Running from file

You can also just download/copy the lncur.py file and put it directly in your working directory.

Usage

Setup

  1. First you need to set up your cursor theme directory, you can refer to the step 5 of the KDE guide for creating cursor theme. It should look like this :
Root of your super cool ported theme :D
├── cursors
└── index.theme
  1. Put all of your Windows cursor theme files (.ico and/or .ani) in the cursors directory.
  2. Rename all your file like the following (here using default Windows cursor names, depending on what cursor theme you're porting, the files can be named different, it's fine just rename them):
Cursor Windows name Linux/X name
Normal_select.png Normal select default
Text_select.png Text select text
Busy.png Busy wait
Precision_select.png Precision select crosshair
Alternate_select.png Alternate select up-arrow
Diagonal_resize_1.png Diagonal resize 1 size_fdiag
Diagonal_resize_1.png Diagonal resize 2 size_bdiag
Horizontal_resize.png Horizontal resize size_hor
Horizontal_resize.png Vertical resize size_ver
Move.png Move fleur
Unavailable.png Unavailable not-allowed
Link_select.png Link select pointer
Working_in_background.gif Working in background progress
Help_select.png Help select help
Pen.png The pen one idk the name pencil

All of the names are taken from the KDE breeze cursor theme
Cursors image from Microsoft
You can remove the pin and person cursors as they're not used.

  1. Convert the files to X cursor files using win2xcur, you can convert them all by going in the cursors directory and run
win2xcur *

Now your cursor theme should look like this now:

Root of ur super amazing theme :3
├── cursors
│   ├── crosshair
│   ├── default
│   ├── fleur
│   ├── help
│   ├── not-allowed
│   ├── pencil
│   ├── pointer
│   ├── progress
│   ├── size_bdiag
│   ├── size_fdiag
│   ├── size_hor
│   ├── size_ver
│   ├── text
│   ├── up-arrow
│   └── wait
└── index.theme

Running the program

Now you can use lncur to do all the symlinking by running lncur inside the directory where the cursors dir and running:

$ lncur -l

All arguments:

$ lncur -h
usage: lncur.py [-h] [-v] [-l]

options:
  -h, --help     show this help message and exit
  -v, --version  Prints version
  -l, --link     Symlinks cursors files

Build

  1. Install pyinstaller
  2. Run:
git clone https://github.com/claymorwan/lncur.git
cd lncur
pyinstaller --onefile lncur.py
  1. The path to the executable will be ./dist/lncur

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

lncur-1.0.3.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lncur-1.0.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file lncur-1.0.3.tar.gz.

File metadata

  • Download URL: lncur-1.0.3.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for lncur-1.0.3.tar.gz
Algorithm Hash digest
SHA256 713a70309f8fb6cc87b675cde0969bbbb02a02c99583121b05045fa33bc30aa3
MD5 1666952ab58da2fdcc973661e185a3f9
BLAKE2b-256 182acd23bf87ce54918f6475922dd7203c053f79d2719862c221d76d6bc17c25

See more details on using hashes here.

File details

Details for the file lncur-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: lncur-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for lncur-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b2eb96c1ad170ebc57ad0b9de4fdda7f39f61425e7e60ca8f9d10892f6d1beb0
MD5 4bf18befdf38f9c332cfc7d59eb029fe
BLAKE2b-256 5ed9be60bceb323bedc2de235ccec4fa32f79a113e5f4559d4af0b8e4f38349e

See more details on using hashes here.

Supported by

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