move from swappy to satty

This commit is contained in:
Your Name
2026-08-14 12:41:06 +00:00
parent 4e40d20092
commit bac0151865
4 changed files with 19 additions and 40 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ OPTIONAL_PKGS=(
imagemagick "Image tools" OFF imagemagick "Image tools" OFF
playerctl "Media control" OFF playerctl "Media control" OFF
wlopm "Monitor power" OFF wlopm "Monitor power" OFF
swappy "Screenshot editor" OFF satty "Screenshot editor" OFF
oxipng "PNG compressor" OFF oxipng "PNG compressor" OFF
matugen "Theme generator" OFF matugen "Theme generator" OFF
) )
+6 -13
View File
@@ -20,19 +20,12 @@ if command -v notify-send >/dev/null 2>&1; then
notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file" notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file"
fi fi
# Open the editor if swappy is available (blocks until it is closed). # Open the editor if satty is available (blocks until it is closed).
# swappy never overwrites the opened file on Ctrl+s (it saves a new # satty writes the annotated image to --output-filename on Ctrl+s (and on
# timestamped copy to save_dir), so pass it a temporary config pointing # Esc/Enter here) and exits immediately.
# save_dir/save_filename_format at our exact file: Ctrl+s then saves and if command -v satty >/dev/null 2>&1; then
# exits (early_exit). -o writes the final surface when quitting with Esc/q. satty --filename "$dir/$file" --output-filename "$dir/$file" \
# Note: closing with Ctrl+w or the X button quits without saving (swappy). --copy-command wl-copy --actions-on-escape save-to-file --early-exit
if command -v swappy >/dev/null 2>&1; then
cfg=$(mktemp -d)
mkdir -p "$cfg/swappy"
printf '[Default]\nsave_dir=%s\nsave_filename_format=%s\nearly_exit=true\n' \
"$dir" "$file" > "$cfg/swappy/config"
XDG_CONFIG_HOME="$cfg" swappy -f "$dir/$file" -o "$dir/$file"
rm -rf "$cfg"
wl-copy -t image/png < "$dir/$file" wl-copy -t image/png < "$dir/$file"
fi fi
+6 -13
View File
@@ -21,19 +21,12 @@ if command -v notify-send >/dev/null 2>&1; then
notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file" notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file"
fi fi
# Open the editor if swappy is available (blocks until it is closed). # Open the editor if satty is available (blocks until it is closed).
# swappy never overwrites the opened file on Ctrl+s (it saves a new # satty writes the annotated image to --output-filename on Ctrl+s (and on
# timestamped copy to save_dir), so pass it a temporary config pointing # Esc/Enter here) and exits immediately.
# save_dir/save_filename_format at our exact file: Ctrl+s then saves and if command -v satty >/dev/null 2>&1; then
# exits (early_exit). -o writes the final surface when quitting with Esc/q. satty --filename "$dir/$file" --output-filename "$dir/$file" \
# Note: closing with Ctrl+w or the X button quits without saving (swappy). --copy-command wl-copy --actions-on-escape save-to-file --early-exit
if command -v swappy >/dev/null 2>&1; then
cfg=$(mktemp -d)
mkdir -p "$cfg/swappy"
printf '[Default]\nsave_dir=%s\nsave_filename_format=%s\nearly_exit=true\n' \
"$dir" "$file" > "$cfg/swappy/config"
XDG_CONFIG_HOME="$cfg" swappy -f "$dir/$file" -o "$dir/$file"
rm -rf "$cfg"
wl-copy -t image/png < "$dir/$file" wl-copy -t image/png < "$dir/$file"
fi fi
+6 -13
View File
@@ -40,19 +40,12 @@ if command -v notify-send >/dev/null 2>&1; then
notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file" notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file"
fi fi
# Open the editor if swappy is available (blocks until it is closed). # Open the editor if satty is available (blocks until it is closed).
# swappy never overwrites the opened file on Ctrl+s (it saves a new # satty writes the annotated image to --output-filename on Ctrl+s (and on
# timestamped copy to save_dir), so pass it a temporary config pointing # Esc/Enter here) and exits immediately.
# save_dir/save_filename_format at our exact file: Ctrl+s then saves and if command -v satty >/dev/null 2>&1; then
# exits (early_exit). -o writes the final surface when quitting with Esc/q. satty --filename "$dir/$file" --output-filename "$dir/$file" \
# Note: closing with Ctrl+w or the X button quits without saving (swappy). --copy-command wl-copy --actions-on-escape save-to-file --early-exit
if command -v swappy >/dev/null 2>&1; then
cfg=$(mktemp -d)
mkdir -p "$cfg/swappy"
printf '[Default]\nsave_dir=%s\nsave_filename_format=%s\nearly_exit=true\n' \
"$dir" "$file" > "$cfg/swappy/config"
XDG_CONFIG_HOME="$cfg" swappy -f "$dir/$file" -o "$dir/$file"
rm -rf "$cfg"
wl-copy -t image/png < "$dir/$file" wl-copy -t image/png < "$dir/$file"
fi fi