An open API service indexing awesome lists of open source software.

https://github.com/alexwaha/clicky

Tiny Windows utility that keeps your PC awake by simulating mouse clicks.
https://github.com/alexwaha/clicky

anti-sleep auto-clicker go golang idle-prevention keepalive mouse-clicker productivity-tool sleep-prevention windows

Last synced: 4 months ago
JSON representation

Tiny Windows utility that keeps your PC awake by simulating mouse clicks.

Awesome Lists containing this project

README

          

# Clicky — KeepAlive

Tiny cross-platform utility that keeps your PC/Mac awake by simulating mouse clicks.

## Features

- **Auto-clicker** — cursor moves along Bezier curves with random offset + periodic clicks
- **Prevents sleep** — blocks display & system idle timeout
- **Always on top** — small 300x300 window stays visible
- **Random delay** — 1-5 sec between movement cycles
- **Dark theme** — flat UI, no external dependencies
- **Hotkey** — Ctrl+Q (Windows) / Cmd+Q (macOS) to quit

## Usage

1. Launch **Clicky** from DMG (macOS) or `clicky.exe` (Windows)
2. Click the **Alive** button — it turns green (**Active**)
3. The cursor moves to button corners with random delays, simulating clicks
4. Click **X** or press **Cmd+Q** / **Ctrl+Q** to quit

## Build

Both targets must be built on **macOS** (requires `hdiutil`, `lipo`, `sips`, `iconutil`).

**macOS** (creates `dist/Clicky.dmg`, Universal Binary — Apple Silicon + Intel):

```bash
make dmg
```

Open `dist/Clicky.dmg` and drag **Clicky** to **Applications** to install.

**Windows** (cross-compile from macOS):

```bash
make windows
```

## Project Structure

```
Makefile — Build automation (make dmg / make windows / make clean)
src/
main.go — Entry point
app.go — Shared logic: Bezier curves, random delay, aliveLoop
platform_windows.go — Win32 GUI + mouse + sleep prevention
platform_macos.go — macOS: Go CGo bridge (calls into objc_darwin)
objc_darwin.h — C header for Objective-C functions
objc_darwin.m — Objective-C implementation (Cocoa + CoreGraphics + IOKit)
icon.go — Embedded app icon (icon.png)
icon.png — App icon
Info.plist — macOS app bundle metadata
rsrc_windows_amd64.syso — Windows resource (embedded icon for .exe)
go.mod
dist/ — Build output
Clicky.dmg — macOS disk image
```

## Design

![Design](img.png)

| Element | Color |
|---------|-------|
| Background | `#2B2B2B` |
| Button (idle) | `#0078D4` |
| Button (active) | `#107C10` |
| Text | `#FFFFFF` |
| Font | Segoe UI, semi-bold |

## Requirements

- **Windows:** Windows 10+, Go 1.21+, no CGO
- **macOS:** macOS 10.14+, Go 1.21+, Xcode CLT (for building). Universal Binary — Apple Silicon (M1–M4) + Intel

### macOS Accessibility Permission

Clicky uses `CGEventPost` and `CGWarpMouseCursorPosition` to simulate mouse movement and clicks. macOS requires **Accessibility** permission for this.

On first launch, macOS will prompt you to grant access. If it doesn't, or if clicks aren't working:

1. Open **System Settings** > **Privacy & Security** > **Accessibility**
2. Click **+** and add **Clicky.app** (or toggle it on if already listed)
3. Restart the app

Without this permission the app will launch and the button will work, but cursor movement and simulated clicks will be silently blocked by the system.