From bc06b8ae7e83c2901dff2bc7a2947b3e870be168 Mon Sep 17 00:00:00 2001 From: katherine Date: Sun, 8 Dec 2019 09:43:44 -0700 Subject: use tmpdir in vars --- .config/init/funcs/scap | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '.config/init/funcs/scap') 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" -- cgit v1.2.3