UNPKG

jiggle-genius

Version:

Jiggle Genius is a simple and efficient mouse jiggler CLI tool designed to keep your computer awake during those times when you need it to stay active. Whether you're preventing your screen from locking during a presentation or keeping your online status

40 lines (39 loc) 1.24 kB
#!/usr/bin/env node /** * Configuration interface for the jiggle parameters */ export interface JiggleConfig { duration: number; radius: number; speed: number; } /** * Error class for jiggle-specific validation errors */ export declare class JiggleError extends Error { constructor(message: string); } /** * Default configuration values */ export declare const DEFAULT_CONFIG: JiggleConfig; /** * Validates the input parameters for the jiggle function * @param config - The configuration object to validate * @throws {JiggleError} If any parameters are invalid */ export declare function validateConfig(config: JiggleConfig): void; /** * Calculates the next mouse position based on the current angle and configuration */ export declare function calculateMousePosition(centerX: number, centerY: number, angle: number, radius: number): { x: number; y: number; }; /** * Moves the mouse in a circular pattern to prevent screen timeout * @param config - Configuration object containing duration, radius, and speed parameters * @returns Promise that resolves when the jiggling is complete */ export declare function jiggleGenius(config?: Partial<JiggleConfig>): Promise<void>; export default jiggleGenius;