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