refactor(hypr): improve recording videos
This commit is contained in:
parent
45668b51b6
commit
7bc66d6e17
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
# Some of this is hacky because I can't get wf-recorder to nicely output GIFs by itself :(
|
# Some of this is hacky because I can't get wf-recorder to nicely output GIFs by itself :(
|
||||||
|
|
||||||
mk-mp4() {
|
mk-video() {
|
||||||
local program_name="Screen Capture"
|
local program_name="Screen Capture"
|
||||||
local pid_file="/tmp/mk-gif-pid"
|
local pid_file="/tmp/mk-gif-pid"
|
||||||
local output_type="${1:-MP4}"
|
local output_type="${1:-MP4}"
|
||||||
@ -38,7 +38,7 @@ mk-mp4() {
|
|||||||
pwd
|
pwd
|
||||||
gifski_tmpoutput="${tmp_dir}/$(mktemp gifski.XXXXXXXXXXX).gif"
|
gifski_tmpoutput="${tmp_dir}/$(mktemp gifski.XXXXXXXXXXX).gif"
|
||||||
gifski "${input_tmpfile}" --output "${gifski_tmpoutput}"
|
gifski "${input_tmpfile}" --output "${gifski_tmpoutput}"
|
||||||
wl-copy --type image/gif <"${gifski_tmpoutput}"
|
wl-copy --type image/png <"${gifski_tmpoutput}"
|
||||||
else
|
else
|
||||||
wl-copy --type video/mp4 <"${input_tmpfile}"
|
wl-copy --type video/mp4 <"${input_tmpfile}"
|
||||||
fi
|
fi
|
||||||
@ -47,4 +47,4 @@ mk-mp4() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
mk-mp4 "${@}"
|
mk-video "${@}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user