Skip to content

Script to automate symlinking files when porting Windows cursors to Linux

License

Notifications You must be signed in to change notification settings

claymorwan/lncur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 !

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: From command line (by instaling): just run lncur in your cursors directory :3

From the script directly

  1. Go into your cursors directory
  2. Paste the lncur.py file
  3. Run python lncur.py

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

About

Script to automate symlinking files when porting Windows cursors to Linux

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages