From c4f57beba214855aae38fac9b17b9d6e281630c9 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 8 Mar 2026 15:52:31 +0100 Subject: [PATCH 1/3] Show better with a preview notification that'll open recording on invocation --- bin/omarchy-cmd-screenrecord | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-cmd-screenrecord b/bin/omarchy-cmd-screenrecord index 3ee3d877..93e143a9 100755 --- a/bin/omarchy-cmd-screenrecord +++ b/bin/omarchy-cmd-screenrecord @@ -135,7 +135,17 @@ stop_screenrecording() { notify-send "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." -u critical -t 5000 else trim_first_frame - notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000 + local filename=$(cat "$RECORDING_FILE" 2>/dev/null) + local preview="${filename%.mp4}-preview.png" + + # Generate a preview thumbnail from the first frame + ffmpeg -y -i "$filename" -ss 00:00:00.1 -vframes 1 -q:v 2 "$preview" -loglevel quiet 2>/dev/null + + ( + ACTION=$(notify-send "Screen recording saved" "Open with Super + Alt + , (or click this)" -t 10000 -i "${preview:-$filename}" -A "default=open") + [[ $ACTION == "default" ]] && mpv "$filename" + rm -f "$preview" + ) & fi rm -f "$RECORDING_FILE" From 549cd59e48445c1f0e0810e3344ccdbda21411ed Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 8 Mar 2026 15:52:35 +0100 Subject: [PATCH 2/3] Style --- bin/omarchy-cmd-screenshot | 45 ++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/bin/omarchy-cmd-screenshot b/bin/omarchy-cmd-screenshot index 90555a23..16060e91 100755 --- a/bin/omarchy-cmd-screenshot +++ b/bin/omarchy-cmd-screenshot @@ -65,27 +65,30 @@ get_rectangles() { # Select based on mode case "$MODE" in - region) - hyprpicker -r -z >/dev/null 2>&1 & PID=$! - sleep .1 - SELECTION=$(slurp 2>/dev/null) - kill $PID 2>/dev/null - ;; - windows) - hyprpicker -r -z >/dev/null 2>&1 & PID=$! - sleep .1 - SELECTION=$(get_rectangles | slurp -r 2>/dev/null) - kill $PID 2>/dev/null - ;; - fullscreen) - SELECTION=$(hyprctl monitors -j | jq -r "${JQ_MONITOR_GEO} .[] | select(.focused == true) | format_geo") - ;; - smart|*) - RECTS=$(get_rectangles) - hyprpicker -r -z >/dev/null 2>&1 & PID=$! - sleep .1 - SELECTION=$(echo "$RECTS" | slurp 2>/dev/null) - kill $PID 2>/dev/null +region) + hyprpicker -r -z >/dev/null 2>&1 & + PID=$! + sleep .1 + SELECTION=$(slurp 2>/dev/null) + kill $PID 2>/dev/null + ;; +windows) + hyprpicker -r -z >/dev/null 2>&1 & + PID=$! + sleep .1 + SELECTION=$(get_rectangles | slurp -r 2>/dev/null) + kill $PID 2>/dev/null + ;; +fullscreen) + SELECTION=$(hyprctl monitors -j | jq -r "${JQ_MONITOR_GEO} .[] | select(.focused == true) | format_geo") + ;; +smart | *) + RECTS=$(get_rectangles) + hyprpicker -r -z >/dev/null 2>&1 & + PID=$! + sleep .1 + SELECTION=$(echo "$RECTS" | slurp 2>/dev/null) + kill $PID 2>/dev/null # If the selection area is L * W < 20, we'll assume you were trying to select whichever # window or output it was inside of to prevent accidental 2px snapshots From 9746370b622c7a9f2be02b417d52b901d5a8fbdb Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 8 Mar 2026 15:53:42 +0100 Subject: [PATCH 3/3] Default to full screen capture for hyprland preview picker --- config/hyprland-preview-share-picker/config.yaml | 2 +- migrations/1772981555.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 migrations/1772981555.sh diff --git a/config/hyprland-preview-share-picker/config.yaml b/config/hyprland-preview-share-picker/config.yaml index 6b939570..740fc7ae 100644 --- a/config/hyprland-preview-share-picker/config.yaml +++ b/config/hyprland-preview-share-picker/config.yaml @@ -3,7 +3,7 @@ # relative paths are resolved relative to the location of the config file stylesheets: ["../omarchy/current/theme/hyprland-preview-share-picker.css"] # default page selected when the picker is opened -default_page: windows +default_page: outputs window: # height of the application window diff --git a/migrations/1772981555.sh b/migrations/1772981555.sh new file mode 100644 index 00000000..d843150f --- /dev/null +++ b/migrations/1772981555.sh @@ -0,0 +1,7 @@ +echo "Update hyprland-preview-share-picker config to default to outputs page" + +CONFIG_FILE=~/.config/hyprland-preview-share-picker/config.yaml + +if [[ -f $CONFIG_FILE ]]; then + sed -i 's/^default_page: windows$/default_page: outputs/' "$CONFIG_FILE" +fi