aboutsummaryrefslogtreecommitdiffstats
path: root/.config/init/funcs/scap
diff options
context:
space:
mode:
Diffstat (limited to '.config/init/funcs/scap')
-rwxr-xr-x.config/init/funcs/scap26
1 files changed, 13 insertions, 13 deletions
diff --git a/.config/init/funcs/scap b/.config/init/funcs/scap
index 489f7b8..bf9c66d 100755
--- a/.config/init/funcs/scap
+++ b/.config/init/funcs/scap
@@ -1,18 +1,18 @@
-#!/bin/zsh
-
+#!/usr/bin/env zsh
# capture webm
-scap() {
- archey3
- sleep .2
- if [[ -f '/tmp/cap.mp4' ]]; then
- rm '/tmp/cap.mp4'
- fi
+xset q
+[[ $? -ne 0 ]] && return 1
+
+archey3
+sleep .2
- echo 'recording...'
+if [[ -f '/tmp/cap.mp4' ]]; then
+ rm '/tmp/cap.mp4'
+fi
- ffmpeg -v panic -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 \
- -f pulse -ac 2 -i default -af aresample=async=1 \
- -c:v libx264 -q 0 -preset fast '/tmp/cap.mp4'
-}
+echo 'recording...'
+ffmpeg -v panic -video_size 1920x1080 -framerate 30 -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'