-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathd-record
More file actions
executable file
·30 lines (25 loc) · 802 Bytes
/
d-record
File metadata and controls
executable file
·30 lines (25 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
source d-var.conf
menuopts=("record VA" "rec+cam" "video" "crop record" "stop")
# action=$(printf '%s\n' "${menuopts[@]}" | $D_MENU -p ' ')
action="${1:-$(printf '%s\n' "${menuopts[@]}" | $D_MENU -p ' ')}"
if [[ "$action" != "stop" ]]; then
filename="/home/idlip/media/stream/$(echo "" | $D_MENU -p "File name: ").mp4"
fi
command="wl-screenrec"
# opts="--encode-resolution 1440x900 -b 1MB"
# opts="--encode-resolution 1440x900"
opts=""
case "$action" in
"${menuopts[0]}")
$command $opts --audio -f $filename ;;
"${menuopts[1]}")
d-webcam & $command $opts --audio -f $filename ;;
"${menuopts[2]}")
$command $opts -f $filename ;;
"${menuopts[3]}")
$command $opts -g "$(slurp)" -f $filename ;;
"${menuopts[4]}")
pkill -INT $command ;;
*) exit 1 ;;
esac