Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y xvfb libx11-6
dotnet test tests/OpenSnip.Recording.Tests/OpenSnip.Recording.Tests.csproj -c Release --nologo
dotnet test tests/OpenSnip.Tests/OpenSnip.Tests.csproj -c Release --nologo
dotnet test tests/OpenSnip.Hotkeys.Tests/OpenSnip.Hotkeys.Tests.csproj -c Release --nologo

Expand Down
70 changes: 70 additions & 0 deletions PARITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Linux parity

Status of each Windows feature on Linux. This file describes the tree it ships with.

`working` matches Windows. `partial` works with a gap named here. `missing` has no Linux path yet. `not possible` cannot exist on Linux; the closest equivalent is named.

## Capture

| Feature | Linux | Files |
|---|---|---|
| Region snip on a frozen screen | working | `linux/Capture.cs`, `linux/OverlayWindow.cs` |
| Click grabs the monitor | working | `linux/OverlayWindow.cs` |
| Click grabs the window under the cursor | partial. X11 only | `linux/OverlayWindow.cs`, `src/CaptureOverlay.cs` |
| `F` selects the monitor | partial. Sets the selection; Enter or the mouse confirms. Windows completes immediately. While recording, `F` completes the monitor. | `linux/OverlayWindow.cs` |
| `A` selects all monitors | partial. Same as `F` for a snip. While recording, `A` completes the one monitor under the cursor. | `linux/OverlayWindow.cs` |
| Enter confirms, arrows nudge, Esc and right-click cancel | working | `linux/OverlayWindow.cs` |
| Magnifier with coordinates | working | `linux/OverlayWindow.cs` |
| Magnifier color | working | `linux/OverlayWindow.cs` |
| X11 capture | working | `linux/Capture.cs` |
| Wayland capture (portal screenshot) | working | `linux/Capture.cs`, `linux/DBus.cs` |
| Copy PNG to the clipboard | working. `xclip` on X11, `wl-copy` on Wayland, then Avalonia. | `linux/ClipboardService.cs` |
| Auto-save PNG or JPG | working | `linux/CapturedFrame.cs`, `linux/SettingsWindow.cs` |
| Monthly folders | working | `src/Settings.cs` |
| Preview thumbnail | working | `linux/ThumbnailWindow.cs` |
| Click the preview to annotate | working | `linux/ThumbnailWindow.cs` |
| Drag the preview into another app | working | `linux/ThumbnailWindow.cs`, `src/SmallWindows.cs` |
| Annotation editor | working | `src/EditorForm.cs` |
| Open the editor after a snip | working | `src/Settings.cs` |
| Pin a snip, including from the clipboard | partial. Pin from clipboard or file; editor pin remains Windows-only | `src/SmallWindows.cs` |
| Delayed snip | working | `linux/CountdownWindow.cs`, `linux/App.cs` |
| Repeat the last region | working | `linux/App.cs` |

## Screen recording

| Feature | Linux | Files |
|---|---|---|
| Record a region to MP4 | working on X11. Tray **Record video** and `opensnip --record`. | `linux/App.cs`, `linux/RecordingSession.cs`, `linux/FramePump.cs` |
| Wayland recording | missing. The portal ScreenCast API is not wired. The app reports that recording needs an X11 session. | `linux/App.cs` |
| Record the window under the cursor | working on X11. | `linux/OverlayWindow.cs` |
| One monitor, even dimensions, 16 px minimum | working | `linux/RecordGeometry.cs` |
| 3-2-1 countdown | working | `linux/RecordingChrome.cs` |
| Red outline | working | `linux/RecordingChrome.cs` |
| Pause, microphone mute, stop, discard | working | `linux/RecordingChrome.cs`, `linux/RecordingSession.cs` |
| Outline and bar left out of the video | working on X11. Those rectangles are rebuilt from the wallpaper pixmap and the windows underneath. | `linux/X11FrameSource.cs` |
| System audio | partial. PulseAudio or PipeWire monitor source through `pactl` and `ffmpeg`. Video only when `pactl` or a monitor source is missing. | `linux/AudioDevices.cs`, `linux/FfmpegPlan.cs` |
| Microphone, off until enabled | partial. Same `pactl` dependency. Mute keeps a silent stream so paused segments stay compatible. | `linux/AudioDevices.cs` |
| Hardware H.264 | partial. Software libx264 (CRF 18 high, 28 standard). VAAPI and NVENC are not selected. | `linux/FfmpegPlan.cs` |
| 30 or 60 fps | working | `linux/FfmpegPlan.cs`, `linux/SettingsWindow.cs` |
| Mouse cursor in the video | working. XFixes cursor image. | `linux/X11FrameSource.cs` |
| Copy the MP4 | partial. `text/uri-list` through `xclip` or `wl-copy`. | `linux/ClipboardService.cs`, `linux/FileUri.cs` |
| Preview still that plays on click | working. Play badge; click opens the file. The preview stays at least 8 seconds. | `linux/ThumbnailWindow.cs`, `linux/App.cs` |
| Drag the video preview out | missing | `linux/ThumbnailWindow.cs` |
| `Win+Shift+R` | missing. The tray item and `opensnip --record` start and stop a recording. A global key grab is not built in. | `linux/App.cs`, `linux/Cli.cs` |
| Tray click stops a recording, otherwise snips | working | `linux/App.cs` |
| Snip blocked while recording | working | `linux/App.cs` |
| Open the recordings folder | working | `linux/App.cs` |
| Save under Videos/OpenSnip as `Recording yyyy-MM-dd HH.mm.ss.mp4` | working | `linux/FfmpegPlan.cs`, `linux/SettingsDefaults.cs` |

## Shortcuts and settings

| Feature | Linux | Files |
|---|---|---|
| `Win+Shift+S`, delay, repeat, Print Screen | working on X11. Bind commands in the desktop on Wayland. | `linux/Cli.cs`, `linux/SettingsWindow.cs` |
| Settings pages for capture, saving, recording, shortcuts, general | working. Shortcuts supports X11 key bindings and lists commands on Wayland. | `linux/SettingsWindow.cs` |
| Recording options: system sound, microphone, device, frame rate, quality, cursor, countdown, copy file | working | `linux/SettingsWindow.cs` |
| Reset defaults, including the recording options and video folder | working | `linux/SettingsWindow.cs`, `linux/SettingsDefaults.cs` |
| Start on login | working. XDG autostart. | `linux/Autostart.cs` |
| First-run tray balloon | missing. The tray menu is available as soon as the icon is. | `src/TrayApp.cs`, `linux/App.cs` |
| Diagnostics include capture, clipboard, ffmpeg, and audio devices | working | `linux/Diagnostics.cs` |
| Second launch forwards snip, delay, repeat, record, and settings | working | `linux/SingleInstance.cs` |
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ Run `OpenSnip.exe --diagnostics` to write a report (displays, audio devices, and

## Linux

The Linux app is a separate native Avalonia build. It covers screenshots, annotation, pinned images, and global shortcuts on X11; recording remains Windows-only.
The Linux app is a separate native Avalonia build. It covers screenshots, annotation, pinned images, global shortcuts and screen recording on X11.

**What works:** X11 capture through libX11, with `maim`, ImageMagick `import` and `scrot` as fallbacks; Wayland capture through the `xdg-desktop-portal` Screenshot API, with `grim`, `gnome-screenshot` and `spectacle` as fallbacks; region, window, monitor and all-monitor selection with a magnifier; clipboard as PNG; auto-save as PNG or JPG; preview; annotation; pinned images (under the pointer on X11, centered on Wayland); tray icon; global shortcuts on X11; and settings.
**What works:** X11 capture through libX11, with `maim`, ImageMagick `import` and `scrot` as fallbacks; Wayland capture through the `xdg-desktop-portal` Screenshot API, with `grim`, `gnome-screenshot` and `spectacle` as fallbacks; region, window, monitor and all-monitor selection with a magnifier; clipboard as PNG; auto-save as PNG or JPG; preview; annotation; pinned images (under the pointer on X11, centered on Wayland); tray icon; global shortcuts and MP4 recording on X11; and settings.

**Install:** download `OpenSnip-linux-x64.tar.gz` from [Releases](https://github.com/DevanMetz/OpenSnip/releases), then:

Expand All @@ -129,12 +129,14 @@ cd OpenSnip-linux-x64

The installer copies the binary to `~/.local/bin/opensnip`, so make sure `~/.local/bin` is on your `PATH`.

**Requirements:** x64 Linux; X11 or Wayland with `xdg-desktop-portal`; `xclip` (X11) or `wl-clipboard` (Wayland) for clipboard support. A tray host is optional. Without one, Settings opens on launch and closing it quits OpenSnip, unless a pin or editor is still open. `opensnip --pin` opens only the pin, and `opensnip --edit file.png` opens only the editor.
**Requirements:** x64 Linux; X11 or Wayland with `xdg-desktop-portal`; `xclip` (X11) or `wl-clipboard` (Wayland) for clipboard support; `ffmpeg` for screen recording. A tray host is optional. Without one, Settings opens on launch and closing it quits OpenSnip, unless a pin or editor is still open. `opensnip --pin` opens only the pin, and `opensnip --edit file.png` opens only the editor.

### Shortcuts

On X11, OpenSnip uses the same shortcuts as Windows. The defaults are `Win` + `Shift` + `S`, `PrtSc`, `Shift` + `PrtSc`, and `Ctrl` + `PrtSc`. Change them in **Settings → Shortcuts**. `Alt` + `PrtSc` and `Win` + `PrtSc` stay with the desktop, as does any chord the desktop already owns.

Recording has no built-in global shortcut; bind `opensnip --record` in the desktop settings.

On Wayland, bind `opensnip --snip`, `opensnip --snip-delay`, or `opensnip --repeat` in the desktop's shortcut settings. Use `opensnip --pin` to pin the clipboard image, `opensnip --pin file.png` to pin a file, `opensnip --edit file.png` to edit an image, and `opensnip --settings` to open settings.

### Selecting a region
Expand All @@ -151,13 +153,19 @@ On Wayland, bind `opensnip --snip`, `opensnip --snip-delay`, or `opensnip --repe

On X11 the outline follows the window under the pointer. On Wayland a click grabs the monitor.

While recording, `F` and `A` record the monitor under the cursor. A recording stays on that one monitor.

### Screen recording

Choose **Record video** in the tray, or run `opensnip --record`, then pick a region the same way as a snip. On X11, `ffmpeg` writes an H.264 MP4. A red outline and a bar (pause, microphone, stop, discard) stay on screen and are left out of the file. Videos go to `~/Videos/OpenSnip`. Wayland sessions do not record.
### Annotating

Click the preview to annotate, or drag it to drop the file. The tray command **Open image in editor…** and `opensnip --edit file.png` open an existing image. Settings can open the editor instead of the preview. Keys match the editor table above. Pin (`P`) is Windows-only. Edits are copied to the clipboard.

### Command line

```bash
opensnip --record # record a region (X11, needs ffmpeg)
opensnip --pin # pin the clipboard image
opensnip --pin file.png # pin a file
opensnip --capture file.png # capture the whole desktop without UI
Expand All @@ -177,6 +185,7 @@ dotnet publish linux/OpenSnip.Linux.csproj -c Release -r linux-x64 --self-contai
### Where things live

- Screenshots: `~/Pictures/OpenSnip` by default
- Recordings: `~/Videos/OpenSnip` by default
- Settings: `~/.config/OpenSnip/settings.json`
- Crash log: `~/.config/OpenSnip/error.log`

Expand Down Expand Up @@ -220,6 +229,7 @@ Issues and pull requests are welcome. The code is plain WinForms + GDI+; recordi
| `linux/Capture.cs` / `linux/DBus.cs` | X11, Wayland portal and external capture backends |
| `linux/X11Windows.cs` | Top-level X11 windows for click-to-capture |
| `linux/OverlayWindow.cs` | Linux selection overlay and magnifier |
| `linux/RecordingSession.cs` | X11 recording, red outline, and control bar |
| `linux/PinWindow.cs` | Linux pinned images |
| `linux/Annotation.cs` | Annotation shapes for the Linux editor |
| `linux/EditorWindow.cs` | Linux annotation editor |
Expand Down
Loading
Loading