diff --git a/.config/sway/wayland-screenshot b/.config/sway/wayland-screenshot index 1fa9591..5ec8f51 100755 --- a/.config/sway/wayland-screenshot +++ b/.config/sway/wayland-screenshot @@ -66,14 +66,16 @@ if [ -z "$clipboard" ] || [ "$clipboard" == yes ];then fi else if [ -z "$GEO" ]; then - grim $OPTION $FILEDIR/Screenshot_$(date +%F_%H.%M.%S).png + name_screenshot="$FILEDIR/Screenshot_$(date +%F_%H.%M.%S).png" + grim $OPTION "$name_screenshot" if [ -f /usr/bin/ristretto ] ; then - ristretto $FILEDIR/Screenshot_$(date +%F_%H.%M.%S).png + ristretto "$name_screenshot" fi else - grim $OPTION -g "$GEO" $FILEDIR/Screenshot_$(date +%F_%H.%M.%S).png + name_screenshot="$FILEDIR/Screenshot_$(date +%F_%H.%M.%S).png" + grim $OPTION -g "$GEO" "$name_screenshot" if [ -f /usr/bin/ristretto ] ; then - ristretto $FILEDIR/Screenshot_$(date +%F_%H.%M.%S).png + ristretto "$name_screenshot" fi fi fi