diff options
author | katherine <ageha@airen-no-jikken.icu> | 2019-12-08 09:43:44 -0700 |
---|---|---|
committer | katherine <ageha@airen-no-jikken.icu> | 2019-12-08 09:43:44 -0700 |
commit | bc06b8ae7e83c2901dff2bc7a2947b3e870be168 (patch) | |
tree | e9fc5116b42e7f8672c90a4baf2312562ad80ced /.config/init/funcs/scap | |
parent | 965f07eb383810da6c2233d324d427eb147e40f4 (diff) | |
download | dotfiles-bc06b8ae7e83c2901dff2bc7a2947b3e870be168.tar.gz |
use tmpdir in vars
Diffstat (limited to '.config/init/funcs/scap')
-rwxr-xr-x | .config/init/funcs/scap | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/.config/init/funcs/scap b/.config/init/funcs/scap index f87eb93..94c39f7 100755 --- a/.config/init/funcs/scap +++ b/.config/init/funcs/scap @@ -1,18 +1,20 @@ #!/usr/bin/env zsh # capture webm +source $HOME/.config/init/vars + xset q [[ $? -ne 0 ]] && return 1 archey3 sleep .2 -if [[ -e '/tmp/cap.mp4' ]]; then - rm '/tmp/cap.mp4' || return 1 +if [[ -e "$tmpdir/cap.mp4" ]]; then + rm "$tmpdir/cap.mp4" || return 1 fi echo 'recording...' ffmpeg -v panic -video_size 1920x1080 -framerate 20 -f x11grab -i :0.0 \ -f pulse -ac 2 -i default -af aresample=async=1 \ - -c:v libx264 -q 0 -preset ultrafast '/tmp/cap.mp4' + -c:v libx264 -q 0 -preset ultrafast "$tmpdir/cap.mp4" |