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
5 changes: 1 addition & 4 deletions agents/skills/visual-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ Take a full-screen screenshot without opening the editor:
omarchy capture screenshot fullscreen save
```

The command prints the saved path and writes to the configured Pictures
directory. Use `omarchy screenshot` for the interactive smart-region flow.
Capture reference and candidate states as separate images when changing a
layer-shell surface or layout, then compare both.
The command writes to Omasnap's configured screenshot directory. Use `omarchy screenshot` for the interactive capture flow, which copies the capture and shows a timed preview. Use `omarchy screenshot --editor=overlay` to test annotation before output. Capture reference and candidate states as separate images when changing a layer-shell surface or layout, then compare both.

Record a short full-screen video for animation, transition, timing, capture, or
screen-recording changes:
Expand Down
81 changes: 11 additions & 70 deletions bin/omarchy-capture-screenshot
Original file line number Diff line number Diff line change
Expand Up @@ -2,81 +2,22 @@

# omarchy:summary=Take a screenshot
# omarchy:group=capture
# omarchy:args=[smart|region|windows|fullscreen] [slurp|copy|save] [--editor=<name>]
# omarchy:args=[smart|region|windows|fullscreen|scroll] [copy|save]
# omarchy:examples=omarchy screenshot | omarchy capture screenshot region
# omarchy:aliases=omarchy screenshot

[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}"

if [[ ! -d $OUTPUT_DIR ]]; then
mkdir -p "$OUTPUT_DIR"
omarchy-notification-send "Created screenshot directory: $OUTPUT_DIR" -t 2000
if [[ -n ${OMARCHY_SCREENSHOT_DIR:-} && -z ${OMASNAP_SCREENSHOT_DIR:-} ]]; then
export OMASNAP_SCREENSHOT_DIR="$OMARCHY_SCREENSHOT_DIR"
fi

pkill slurp && exit 0

SCREENSHOT_EDITOR="${OMARCHY_SCREENSHOT_EDITOR:-tensaku-edit}"

# Parse --editor flag from any position
ARGS=()
omasnap_args=()
for arg in "$@"; do
if [[ $arg == --editor=* ]]; then
SCREENSHOT_EDITOR="${arg#--editor=}"
else
ARGS+=("$arg")
fi
case "$arg" in
copy) omasnap_args+=(--copy) ;;
save) omasnap_args+=(--save) ;;
slurp) ;;
*) omasnap_args+=("$arg") ;;
esac
done
set -- "${ARGS[@]}"

MODE="${1:-smart}"
PROCESSING="${2:-slurp}"

# The picker leaves the screen freeze running (PID on its first output line)
# so grim captures the frozen overlay rather than live content shifting
# during teardown.
#
# Software-composited cursors (Hyprland's fallback on GPUs without working
# hardware cursors) are baked into the frames grim captures, so force
# hardware cursors until after grim runs and restore the setting on exit.
NO_HW_CURSORS=$(hyprctl getoption cursor:no_hardware_cursors -j | jq '.int')

set_no_hw_cursors() {
hyprctl eval "hl.config({ cursor = { no_hardware_cursors = $1 } })" &>/dev/null ||
hyprctl keyword cursor:no_hardware_cursors "$1" &>/dev/null
}

cleanup() {
[[ -n $FREEZE_PID ]] && kill $FREEZE_PID 2>/dev/null
set_no_hw_cursors "$NO_HW_CURSORS"
}
trap cleanup EXIT

set_no_hw_cursors 0
{ read -r FREEZE_PID; read -r SELECTION; } < <(omarchy-capture-region "$MODE" --keep-freeze)

[[ -z $SELECTION ]] && exit 0

FILENAME="screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png"
FILEPATH="$OUTPUT_DIR/$FILENAME"

case "$PROCESSING" in
slurp)
grim -g "$SELECTION" "$FILEPATH" || exit 1
echo "$FILEPATH"
wl-copy --type image/png <"$FILEPATH"

# Best-effort: the screenshot is already saved and on the clipboard, so a
# notification outage must not report the capture itself as failed.
omarchy-notification-send "Screenshot saved to clipboard and file" "Edit with Super + Alt + , (or click this)" \
--image "$FILEPATH" \
--exec "$SCREENSHOT_EDITOR" "$FILEPATH" || true
;;
copy)
grim -g "$SELECTION" - | wl-copy --type image/png
;;
save)
grim -g "$SELECTION" "$FILEPATH" || exit 1
echo "$FILEPATH"
;;
esac
exec omasnap "${omasnap_args[@]}"
2 changes: 1 addition & 1 deletion bin/omarchy-clipboard-open
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ open_image() {
local path="$1"

[[ -r $path ]] || exit 1
exec tensaku-edit "$path"
exec omasnap "$path"
}

open_text() {
Expand Down
4 changes: 2 additions & 2 deletions config/imv/config
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
# Rotate the currently open image by 90 degrees
<Ctrl+r> = exec mogrify -rotate 90 "$imv_current_file"

# Edit the current image in Tensaku and quit the viewer
<Ctrl+e> = exec tensaku-edit "$imv_current_file" & ; quit
# Edit the current image in Omasnap and quit the viewer
<Ctrl+e> = exec omasnap "$imv_current_file" & ; quit
7 changes: 3 additions & 4 deletions default/agents/skills/omarchy/capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ omarchy screenshot # Interactive smart-region flow
omarchy capture screenshot region # Select a region
omarchy capture screenshot windows # Pick a window
omarchy capture screenshot fullscreen save # Full screen, straight to disk (no editor)
omarchy capture screenshot scroll # Capture and stitch a scrolling region
omarchy screenshot --editor=overlay # Opt into annotation before output
```

The first argument picks the mode (`smart|region|windows|fullscreen`), the
second what happens with it (`slurp|copy|save`). `save` skips the annotation
editor and prints the saved path. Screenshots land in the configured Pictures
directory (override with `OMARCHY_SCREENSHOT_DIR`).
The first argument picks the Omasnap mode (`smart|region|windows|fullscreen|scroll`). By default, a capture copies to the clipboard and shows a preview for 10 seconds. Use the preview's Edit action to annotate, or pass `--editor=overlay` or `--editor=window` to edit before output. A second argument of `copy` or `save` skips the preview and sends the screenshot straight to that destination. Saved screenshots land in `~/Pictures/Screenshots` by default (override with `OMASNAP_SCREENSHOT_DIR`; the legacy `OMARCHY_SCREENSHOT_DIR` is also honored by the Omarchy command).

## Screen Recording

Expand Down
5 changes: 4 additions & 1 deletion default/hypr/apps/screenshot-selection.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
-- Remove the 1px border around the slurp region selection used by screenshots.
-- Remove the 1px border around the slurp region selection used by recordings, OCR, and QR capture.
hl.layer_rule({ match = { namespace = "selection" }, no_anim = true, animation = "none" })

-- Keep the Omasnap overlay immediate and out of screen shares.
hl.layer_rule({ match = { namespace = "^omasnap$" }, no_anim = true, animation = "none", no_screen_share = true })
2 changes: 0 additions & 2 deletions default/hypr/apps/system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ o.window("org.omarchy.about", { float = true })
o.window("org.omarchy.about", { center = true })
o.window("org.omarchy.about", { size = { 920, 480 } })

o.window("dev.tensaku.Tensaku", { float = true })
o.window("dev.tensaku.Tensaku", { center = true })
o.window("omacalc", { float = true })

-- Fullscreen screensaver.
Expand Down
4 changes: 2 additions & 2 deletions default/uwsm/default
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export TERMINAL=xdg-terminal-exec
# Used by terminal programs to open files with the selected Omarchy default editor
export EDITOR="omarchy-launch-editor --inline"

# Use a custom directory for screenshots (remember to make the directory!)
# export OMARCHY_SCREENSHOT_DIR="$HOME/Pictures/Screenshots"
# Use a custom directory for screenshots
# export OMASNAP_SCREENSHOT_DIR="$HOME/Pictures/Screenshots"

# Use a custom directory for screenrecordings (remember to make the directory!)
# export OMARCHY_SCREENRECORD_DIR="$HOME/Videos/Screencasts"
1 change: 0 additions & 1 deletion docs/file-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ default/** ──► omarchy-settings /usr/share/omarchy
├─ hypr/toggles/*.lua (flags,
│ single-window-aspect-ratio, window-no-gaps) /etc/skel/.local/state/omarchy/toggles/hypr/
├─ nautilus-python/extensions/*.py /etc/skel/.local/share/nautilus-python/extensions/
├─ tensaku/state.toml /etc/skel/.local/state/tensaku/state.toml
├─ uwsm/env.d/10-omarchy /usr/share/uwsm/env.d/
├─ environment.d/*.conf /usr/lib/environment.d/
├─ fontconfig/conf.avail/50-omarchy.conf /usr/share/fontconfig/conf.avail/
Expand Down
2 changes: 1 addition & 1 deletion install/omarchy-base.packages
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ omacalc
omacut
omawrite
omarchy-nvim
omasnap
# OWE owns desktop video backgrounds and feeds the lock screen its frames.
owe
owe-lockfeed
Expand All @@ -115,7 +116,6 @@ qt6-imageformats
quickshell
ripgrep
ruby
tensaku
sddm
slurp
socat
Expand Down
22 changes: 13 additions & 9 deletions manual/12-screenshots-recording.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,34 @@ Everything you can grab off the screen hangs off the Print Screen key. One key o

## Screenshots

Hit `Print Screen` and the screen freezes so nothing shifts under you while you aim. Drag a box for a freeform region, or just click once and the shot snaps to whatever rectangle you clicked in — a window if you landed on one, the whole monitor if you landed on the bar or in a gap. Changed your mind? Hit `Print Screen` again to dismiss the picker.
Hit `Print Screen` and Omasnap captures the focused monitor before its overlay appears, so nothing shifts under you while you aim. Drag a freeform region, click a window to capture it, or click open space to capture the whole monitor. Press `S` before drawing to capture a scrolling region. Changed your mind? Hit `Print Screen` again to dismiss Omasnap.

The result goes two places at once: a PNG in your pictures directory, and the clipboard, so you can paste it straight into a chat window with `Super + V`. A notification pops up with a thumbnail. Click it (or hit `Super + Alt + ,` to invoke the last notification) and the shot opens in Tensaku, the annotation editor, where you can draw arrows and boxes on it before you send it.
After you select an area, Omasnap copies the capture to the clipboard and shows a preview for 10 seconds. Use the preview's pin button or `Ctrl + P` to keep it on screen, or choose Edit to annotate it.

Files land in `~/Pictures` by default, named `screenshot-2026-08-13_14-22-05.png`. If you'd rather keep them in their own folder, set `OMARCHY_SCREENSHOT_DIR` — see [the FAQ](46-faq.md) for where to put session environment variables. Omarchy creates the directory for you if it isn't there. You can swap the editor too with `OMARCHY_SCREENSHOT_EDITOR`.
The annotation editor can draw arrows, lines, shapes, highlights, numbered markers, text, and secure redactions; crop or cut out part of the image; OCR its text; and add a backdrop. In the editor, press `Enter` to copy and save the finished PNG, `Ctrl + C` to copy it without saving, or `Ctrl + S` to save it without copying.

From the terminal, `omarchy screenshot` takes the same shot, and you can be explicit about it: `omarchy capture screenshot region` for freeform only, `windows` to snap to window and monitor rectangles, or `fullscreen` to skip the picker entirely and grab the focused monitor. A second argument of `copy` puts the shot only on the clipboard, and `save` only on disk.
Saved screenshots land in `~/Pictures/Screenshots` by default, with a name such as `screenshot-2026-08-13_14-22-05-firefox.png`. Set `OMASNAP_SCREENSHOT_DIR` to use another directory — see [the FAQ](46-faq.md) for where to put session environment variables. Omasnap creates the directory when it saves the first shot.

From the terminal, `omarchy screenshot` opens the same overlay, and you can choose its starting mode: `omarchy capture screenshot region`, `windows`, `fullscreen`, or `scroll`. A second argument of `copy` or `save` skips the preview and sends the shot straight to that destination. To edit before output, use `omarchy screenshot --editor=overlay` for a fullscreen editor or `omarchy screenshot --editor=window` for a separate window.

### Driving the picker from the keyboard

While the selection is up, you don't have to use the mouse at all:

| Key | Function |
| --- | -------- |
| `S` | Toggle scrolling-region mode |
| `Super + Arrow keys` | Move among windows in Window mode |
| `Return` | Capture the highlighted window |
| `Ctrl + Return` | Capture the whole screen |
| `Tab` / `Ctrl + Tab` | Highlight the next / previous window |
| Arrow keys | Highlight the window in that direction |
| `Ctrl + A` | Capture the full focused monitor |
| `R` | Restore the last region drawn in this session |
| `Esc` | Dismiss Omasnap |

The arrows and Tab move the cursor to the window they pick, so the highlight follows along and you can see what you're about to capture. These bindings only exist while a selection is on screen, so they can't collide with anything in your own config.
These bindings only exist while Omasnap is open, so they can't collide with anything in your own config.

## Screen recording

`Alt + Print Screen` opens _Trigger > Capture > Screenrecord_, which asks what you want on the soundtrack: no audio, desktop audio, desktop plus microphone, or desktop plus microphone plus webcam. That last one only shows up if you actually have a camera plugged in. Pick one and you get the same picker as a screenshot: drag a region, or click a window or monitor.
`Alt + Print Screen` opens _Trigger > Capture > Screenrecord_, which asks what you want on the soundtrack: no audio, desktop audio, desktop plus microphone, or desktop plus microphone plus webcam. That last one only shows up if you actually have a camera plugged in. Pick one and Omarchy's recording picker lets you drag a region or click a window or monitor.

Recording runs on gpu-screen-recorder, which encodes on the GPU at 60fps and falls back to the CPU if it has to. The result is an MP4 in `~/Videos`, named `screenrecording-2026-08-13_14-22-05.mp4`. Set `OMARCHY_SCREENRECORD_DIR` to change that — but note that unlike the screenshot directory, this one has to exist already, or the recording refuses to start.

Expand Down
2 changes: 1 addition & 1 deletion manual/14-omarchy-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Capture commands — Screenshots and screen recording:
omarchy capture qr Decode a QR code from a screenshot region
omarchy capture screenrecording [--fullscreen] [--with-desktop-audio] [--with-microphone-audio] [--with-webcam] [--webcam-device=<device>] [--webcam-size=<small|medium|large>] [--resolution=<size>] [--stop-recording] Start or stop screen recording
omarchy capture screenrecording with webcam Pick a webcam and start a screen recording with it
omarchy capture screenshot [smart|region|windows|fullscreen] [slurp|copy|save] [--editor=<name>] Take a screenshot
omarchy capture screenshot [smart|region|windows|fullscreen|scroll] [copy|save] Take a screenshot
omarchy capture text Extract text from a screenshot region with OCR
omarchy capture webcam resize <smaller|larger|reset|small|medium|large> Resize the active webcam recording overlay
```
Expand Down
6 changes: 3 additions & 3 deletions manual/46-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ Automatic discovery, where printers on the network appear without being added, i

### How do I change where screenshots or screenrecordings are saved?

If you want screenshots to be saved to `~/Pictures/Screenshots` instead of just `~/Pictures`, you can add this to a file under `~/.config/uwsm/env.d/` (like `~/.config/uwsm/env.d/capture`):
Saved screenshots go to `~/Pictures/Screenshots` by default. To use another directory, add this to a file under `~/.config/uwsm/env.d/` (like `~/.config/uwsm/env.d/capture`):

```
export OMARCHY_SCREENSHOT_DIR="$HOME/Pictures/Screenshots"
export OMASNAP_SCREENSHOT_DIR="$HOME/Pictures/Captures"
```

You can do the same for screenrecordings using `OMARCHY_SCREENRECORD_DIR`.

Just remember to create the directory you want to save to and restart Omarchy for this to take effect.
Omasnap creates its screenshot directory automatically. Create the screenrecording directory yourself, then restart Omarchy for either environment change to take effect.

### How do I get the speakers + webcam working on my Apple Studio Display?

Expand Down
18 changes: 18 additions & 0 deletions migrations/1788129995.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
echo "Replace Satty and Tensaku with Omasnap"

omarchy-pkg-add omasnap

# The old source installer left a NoDisplay entry that overrides the packaged launcher.
rm -f "$HOME/.local/share/applications/omasnap.desktop"

imv_config="$HOME/.config/imv/config"
if [[ -f $imv_config ]]; then
sed -i --follow-symlinks \
-e 's/^# Edit the current image in Tensaku and quit the viewer$/# Edit the current image in Omasnap and quit the viewer/' \
-e 's/^# Edit the current image in Satty and quit the viewer$/# Edit the current image in Omasnap and quit the viewer/' \
-e 's|^<Ctrl+e> = exec tensaku-edit "$imv_current_file" & ; quit$|<Ctrl+e> = exec omasnap "$imv_current_file" \& ; quit|' \
-e 's|^<Ctrl+e> = exec satty --filename "$imv_current_file" & ; quit$|<Ctrl+e> = exec omasnap "$imv_current_file" \& ; quit|' \
"$imv_config"
fi

omarchy-pkg-drop satty tensaku
2 changes: 1 addition & 1 deletion shell/Commons/Util.qml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ QtObject {
// Run an argv vector without a shell interpreting it: the constant `exec "$@"`
// means the args only ever land in positional parameters, which bash expands
// without re-tokenizing — so untrusted data ($(id), a filename) stays literal.
// The login shell (-l) keeps the PATH/session env GUI targets (tensaku, mpv,
// The login shell (-l) keeps the PATH/session env GUI targets (omasnap, mpv,
// xdg-open) need. Prefer this over execDetached for anything built from input.
function execArgv(argv) {
Quickshell.execDetached(["bash", "-lc", 'exec "$@"', "bash"].concat(argv))
Expand Down
12 changes: 6 additions & 6 deletions test/shell.d/clipboard-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,12 @@ printf '%s\n' "$1" >"$EDITOR_PATH_OUT"
cat "$1" >"$EDITOR_TEXT_OUT"
SH

cat >"$TMPDIR/bin/tensaku-edit" <<'SH'
cat >"$TMPDIR/bin/omasnap" <<'SH'
#!/bin/bash
printf '%s\n' "$*" >"$TENSAKU_OUT"
printf '%s\n' "$*" >"$OMASNAP_OUT"
SH

chmod +x "$TMPDIR/bin/wl-copy" "$TMPDIR/bin/wl-paste" "$TMPDIR/bin/wtype" "$TMPDIR/bin/omarchy-launch-browser" "$TMPDIR/bin/omarchy-launch-editor" "$TMPDIR/bin/tensaku-edit"
chmod +x "$TMPDIR/bin/wl-copy" "$TMPDIR/bin/wl-paste" "$TMPDIR/bin/wtype" "$TMPDIR/bin/omarchy-launch-browser" "$TMPDIR/bin/omarchy-launch-editor" "$TMPDIR/bin/omasnap"

capture_output=$(XDG_RUNTIME_DIR="$TMPDIR" XDG_STATE_HOME="$TMPDIR/state" PATH="$TMPDIR/bin:$PATH" "$ROOT/shell/plugins/clipboard/capture.sh")
[[ $capture_output == '{"type":"text","text":"terminal copy"}' ]] || fail "clipboard capture records normal text events"
Expand Down Expand Up @@ -513,8 +513,8 @@ pass "clipboard open helper opens text entries in editor"
[[ $(<"$TMPDIR/editor-path") == "$TMPDIR"/state/omarchy/clipboard-open/clipboard.*.txt ]] || fail "clipboard open helper writes text entries to a temporary file"
pass "clipboard open helper writes text entries to a temporary file"

TENSAKU_OUT="$TMPDIR/tensaku" HOME="$TMPDIR/home" PATH="$TMPDIR/bin:$PATH" \
OMASNAP_OUT="$TMPDIR/omasnap" HOME="$TMPDIR/home" PATH="$TMPDIR/bin:$PATH" \
"$ROOT/bin/omarchy-clipboard-open" --history-index 2

[[ $(<"$TMPDIR/tensaku") == "$TMPDIR/image.png" ]] || fail "clipboard open helper opens image entries in Tensaku"
pass "clipboard open helper opens image entries in Tensaku"
[[ $(<"$TMPDIR/omasnap") == "$TMPDIR/image.png" ]] || fail "clipboard open helper opens image entries in Omasnap"
pass "clipboard open helper opens image entries in Omasnap"
Loading