# CachyOS Cinnamon Print Screen

A minimal Windows-like Print Screen implementation for CachyOS with Cinnamon
running under X11.

## Behavior

- `Print Screen` copies the entire screen to the clipboard.
- `Alt+Print Screen` copies the active window to the clipboard.
- Screenshots are not automatically saved in `Pictures`.
- Both shortcuts work while a context menu is open.

The listener is written in C, compiles to an approximately 2.6 KB static
x86-64 binary, uses approximately 12 KB process RSS, and consumes no CPU while
idle.

## Requirements

- CachyOS on x86-64
- Cinnamon under X11
- `sudo` access

Run the installer as the Cinnamon desktop user, not as root. Missing `gcc` and
`gnome-screenshot` packages are installed automatically.

Check the session before installing:

```bash
echo "$XDG_CURRENT_DESKTOP"
echo "$XDG_SESSION_TYPE"
```

The expected values are `X-Cinnamon` and `x11`. Native Wayland sessions are not
supported. The installer checks both variables and `DISPLAY`, then stops with
an explanatory error before making changes when the session is unsupported.

## Install

```bash
chmod +x printscreen.sh
./printscreen.sh install
```

## Check status

```bash
./printscreen.sh status
```

## Uninstall

```bash
./printscreen.sh uninstall
```

Uninstallation removes the service and binary, then restores the Cinnamon
screenshot shortcuts saved during installation.

## Files

- `clipboard-screenshot-hotkey.c` — complete listener source code.
- `printscreen.sh` — automatic installer, status tool, and uninstaller.
