aboutsummaryrefslogtreecommitdiffstats
path: root/.config/init/funcs/scap
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2016-10-01 13:58:31 -0700
committerkatherine <shmibs@shmibbles.me>2016-10-01 13:58:31 -0700
commitbacc4127b7da22c61671fe3ce0cef6db103884dd (patch)
treee631d8a0f5609c5137afade0a8b36589997d8346 /.config/init/funcs/scap
parent4a879cb286f97f317b1109d8d07be4508c76e5f8 (diff)
downloaddotfiles-bacc4127b7da22c61671fe3ce0cef6db103884dd.tar.gz
overhaul init system
gen files now kept in gen directory. funcs now included in $PATH only if their funcreqs are successfully passed at login, making things cleaner and more system-independent
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'