From da16f88ec397aa063c2d80d0aa3e945bafce4639 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 14 Aug 2026 12:33:25 +0000 Subject: [PATCH] updates to swappy in screenshots --- scripts/screenshot/screenshot_area.sh | 6 ++++-- scripts/screenshot/screenshot_monitor.sh | 6 ++++-- scripts/screenshot/screenshot_window.sh | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/screenshot/screenshot_area.sh b/scripts/screenshot/screenshot_area.sh index 3dcac38..bc3a285 100755 --- a/scripts/screenshot/screenshot_area.sh +++ b/scripts/screenshot/screenshot_area.sh @@ -20,9 +20,11 @@ if command -v notify-send >/dev/null 2>&1; then notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file" fi -# Open the editor if swappy is available (blocks until it is closed) +# Open the editor if swappy is available (blocks until it is closed). +# swappy never overwrites the opened file on Ctrl+s (it saves a new +# timestamped copy to save_dir), so -o writes the final surface back here. if command -v swappy >/dev/null 2>&1; then - swappy -f "$dir/$file" + swappy -f "$dir/$file" -o "$dir/$file" wl-copy -t image/png < "$dir/$file" fi diff --git a/scripts/screenshot/screenshot_monitor.sh b/scripts/screenshot/screenshot_monitor.sh index 273863b..990bffc 100755 --- a/scripts/screenshot/screenshot_monitor.sh +++ b/scripts/screenshot/screenshot_monitor.sh @@ -21,9 +21,11 @@ if command -v notify-send >/dev/null 2>&1; then notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file" fi -# Open the editor if swappy is available (blocks until it is closed) +# Open the editor if swappy is available (blocks until it is closed). +# swappy never overwrites the opened file on Ctrl+s (it saves a new +# timestamped copy to save_dir), so -o writes the final surface back here. if command -v swappy >/dev/null 2>&1; then - swappy -f "$dir/$file" + swappy -f "$dir/$file" -o "$dir/$file" wl-copy -t image/png < "$dir/$file" fi diff --git a/scripts/screenshot/screenshot_window.sh b/scripts/screenshot/screenshot_window.sh index cb39ed5..10e5828 100755 --- a/scripts/screenshot/screenshot_window.sh +++ b/scripts/screenshot/screenshot_window.sh @@ -40,9 +40,11 @@ if command -v notify-send >/dev/null 2>&1; then notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file" fi -# Open the editor if swappy is available (blocks until it is closed) +# Open the editor if swappy is available (blocks until it is closed). +# swappy never overwrites the opened file on Ctrl+s (it saves a new +# timestamped copy to save_dir), so -o writes the final surface back here. if command -v swappy >/dev/null 2>&1; then - swappy -f "$dir/$file" + swappy -f "$dir/$file" -o "$dir/$file" wl-copy -t image/png < "$dir/$file" fi