Skip to content

Latest commit

 

History

History
68 lines (56 loc) · 3.86 KB

x11.md

File metadata and controls

68 lines (56 loc) · 3.86 KB

X11 cursor conversion

What is the purpose of this file?

This file lists the steps needed to convert Windows animated cursors into X11 format, which is used by Linux.


What will I need?

You will need a program that can edit cursor and animated cursors, like AniFX Portable.
Animated cursors can be opened if you type their names directly. When they do, you must extract all visible frames as PNG files. Maintain a consistent naming convention for all files. You will need a text editor to map out the cursors. Please use the following conventions:


pixel size x-position y-position png-filename


If you're working with animated cursors, the following convention is needed:

[pixel-size] [x-pos] [y-pos] [filename-framenumber.png] [milliseconds]
[pixel-size] [x-pos] [y-pos] [filename-framenumber.png] [milliseconds]


Be sure to add as many frames as needed.

For each png, there should be an extra line.
Save the file as `cursorname.cursor`. You'll need to repeat this for every cursor. If I can find a way to automate the process, you'll hear from me first.

I've created the renders and the .cursor files, now what?

From your Linux Terminal, issue the following commands for each .cursor file to create an X11 cursor:

xcursorgen [.cursor file] [name_of_x11_cursor]

This will create an X11 cursor in the same directory. If you run into errors, make sure your
.cursor files follow the conventions listed above. The X-Position and Y-Position are known as the cursor 'hotspot'.
I recommend an animation transition between 60[msec] to at least 150[msec], with higher [msec] meaning slower animations. A scripting file based on this command is in the works. It would work best if the naming conventions stated next are followed. To create cursors for other distros, please utilize symbolic links.

I've created templates for all 15 cursors, but where do they go?

Windows uses fifteen cursors to map out pointer tasks. Linux could use even more than that.
The mappings that worked for me are as follows: A better explanation is also here.

  • Windows Normal Select is left_ptr or arrow
  • Help Select is gumby or question_arrow
  • Working In Background is left_ptr_watch
  • Busy is watch
  • Handwriting cursor is pencil
  • Beam or Text Select is xterm
  • Cross/Precison Select is cross
  • NWSE/Diagonal Resize 1 is both top_left_corner and bottom_right_corner
  • NESW/Diagonal Resize 2 is both top_right_corner and bottom_left_corner
  • NS/Vertical Resize is v_double_arrow, top_side and bottom_side
  • WE/Horizontal Resize is h_double_arrow, left_side and right_side
  • Move or Resize All is hand1, hand2, grabbing and size_all
  • No/Unavailable is crosfleursed_circle and no_drop
  • Up/Alternative Select is center_ptr
  • Link Select is link

We know where to map them, but where do I put them?

In Ubuntu, the cursors should be stored in the following location:

/usr/share/icons/<ThemeName>/cursors/<put them here>

Install the Gnome Tweak Tool to select any cursor located in this folder. Some of the prefabricated shell scripts in this project will automatically toggle the appropriate settings for you. If you want to take a chimeric route in theming, you can simply edit the script to point to another existing resource. If you bungle the script, a fresh copy is waiting for you here to start over.