Skip to content

hachispin/currust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

303 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

currust - a cursor converter

Release crates.io

A tool written in Rust to convert cursors between Windows and Linux. Specifically, converting from the CUR/ANI format to the Xcursor format (plus some other features).

Installation

There are currently two supported methods of installation:

  • download the binaries on the releases page (recommended)
  • build from crates with cargo install currust (requires cargo)

Usage

The intended use-case of this tool is to convert a Windows cursor theme to Linux. A cursor theme is a directory that contains some cursors, along with an installer file that uses the INF format.

You can convert a cursor theme as such:

currust ./my-cursor-theme

This converts the theme and writes the produced X11 theme (which is a directory) in the current directory. Add the --out (or -o for short) argument to place it in the specified path.

currust ./my-cursor-theme -o ./please/go/here/instead

Cursor themes on Windows can be scaled by Windows itself. Unfortunately, this feature doesn't exist on most Linux distributions, so Xcursor themes have to include their own size variations.

The --scale-to argument is available to provide some scale factors, along with --scale-with to provide a scaling algorithm to use (default: Lanczos3).

Note that this increases the size of the resulting cursor theme.

Tip

For pixel art cursors, use nearest-neighbour scaling with --scale-with nearest. Integer scale factors work best.

currust ./my-cursor-theme --scale-to 1.5 2 3 --scale-with mitchell

Afterwards, move the converted theme to the system-wide /usr/share/icons or the local ~/.local/share/icons. Note that other valid locations do exist, according to the specification. Switching to this cursor theme depends on your distribution, so just (kindly) look it up.

For more information on other commands and possible usages, view the help text:

currust -h      # Summarised help text
currust --help  # Detailed help text

About Windows

If you're using Windows, you can still use this. For symlink coverage, a bash script will be generated for users to run instead. (though, an option to export to tar.gz would be better...)

Goals

All the baseline goals I had for this project are complete, so this is more akin to a "planned/future features" section. Note that not everything here may be added.

  • Publish or otherwise for usage with cargo and package managers
  • Implement exporting to tar.gz and possibly other formats
  • Conversion from X11 cursors to Windows cursors (i.e, the other way around)
  • SVG cursor themes for KDE Plasma
  • hyprcursor (cursor format for hyprland) support ➜ covered by hyprcursor-util, I think.

The name ("currust") comes from a portmanteau of "cursor" and "Rust".