Sway : Exxxtra refactor for screenshots!

This commit is contained in:
Dmitry Voronin 2024-09-07 06:00:57 +03:00
parent ec5e4c450b
commit 6c8dbea10c
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -54,12 +54,18 @@ in {
-c:v copy \
-c:a libopus \
-shortest \
-f ${container} "''${scrFile}_" \
-f ${container} \
"''${scrFile}_" \
&& mv "''${scrFile}_" "''${scrFile}" \
&& [[ -n "''${scrTransform}" ]] \
&& ffmpeg -display_rotation ''${scrTransform} -i ''${scrFile} -c copy -f ${container} ''${scrFile}_ \
&& mv ''${scrFile}_ ''${scrFile} \
|| rm ''${scrFile}_
&& ffmpeg \
-display_rotation ''${scrTransform} \
-i "''${scrFile}" \
-c copy \
-f ${container} \
"''${scrFile}_" \
&& mv "''${scrFile}_" "''${scrFile}" \
|| rm "''${scrFile}_"
};
'';
@ -83,12 +89,18 @@ in {
-c:v copy \
-c:a libopus \
-shortest \
-f ${container} "''${scrFile}_" \
-f ${container} \
"''${scrFile}_" \
&& mv "''${scrFile}_" "''${scrFile}" \
&& [[ -n "''${scrTransform}" ]] \
&& ffmpeg -display_rotation ''${scrTransform} -i ''${scrFile} -c copy -f ${container} ''${scrFile}_ \
&& mv ''${scrFile}_ ''${scrFile} \
|| rm ''${scrFile}_
&& ffmpeg \
-display_rotation ''${scrTransform} \
-i "''${scrFile}" \
-c copy \
-f ${container} \
"''${scrFile}_" \
&& mv "''${scrFile}_" "''${scrFile}" \
|| rm "''${scrFile}_"
};
'';
in ''