New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mousecape-from-windows-cursor

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mousecape-from-windows-cursor

Converts Windows cursors to macOS Mousecape .cape files

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

mousecape-from-windows-cursor

Converts Windows cursors (.cur, .ani) to macOS Mousecape .cape files.

Usage (Command line)

npm install -G mousecape-from-windows-cursor
mousecape-from-windows-cursor ./install.inf

Usage (Node)

import { dirname, resolve } from "path";
import { buildMousecape, parseInstall, stringifyMousecape } from "mousecape-from-windows-cursor";
import { readFile, writeFile } from "fs/promises";

const installInfPath = "./windows-cursor/Install.inf";
const cursorsPath = dirname(installInfPath);


// parse install.inf
const install = parseInstall(await readFile(installInfPath, "utf8"));

// create { ["fileName.cur"]: { cursor: Buffer, animated?: boolean } } object
const cursors = await Promise.all(Object.entries(install)
    .filter(([e]) => e == e.toLowerCase())
    .map(
        async ([cursor, path]) => ([
            cursor, {
                animated: path.endsWith(".ani"),
                cursor: await readFile(resolve(cursorsPath, path))
            }] as [string, { cursor: Buffer, animated?: boolean }]
        )));

// create cape
const cape = await buildMousecape(Object.fromEntries(cursors), {
    author: install.INF_Provider ?? "you",
    capeName: install.SCHEME_NAME ?? "Unnamed"
});

// and stringify it to plist
await writeFile(resolve(cursorsPath, `./${cape.id}.cape`), stringifyMousecape(cape))

Keywords

mousecape

FAQs

Package last updated on 15 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts