mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-10-09 19:11:15 +02:00
profile: added source for optional env variables
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -z "$CAPTURE_INPUT_AUDIO" ] && audio_1="easyeffects_sink.monitor" || audio_1="$CAPTURE_INPUT_AUDIO"
|
||||
[ -z "$CAPTURE_OUTPUT_AUDIO" ] && audio_2="easyeffects_source" || audio_2="$CAPTURE_OUTPUT_AUDIO"
|
||||
[ -z "$CAPTURE_DIR" ] && output="$HOME/downloads" || output="$CAPTURE_DIR"
|
||||
|
||||
window=$(xdotool getwindowfocus)
|
||||
fps=60
|
||||
audio_1="easyeffects_sink.monitor"
|
||||
audio_2="easyeffects_source"
|
||||
format="mp4"
|
||||
v_codec="h264"
|
||||
a_codec="opus"
|
||||
lenght=20
|
||||
output="$HOME/downloads"
|
||||
|
||||
gpu-screen-recorder -w $window -f $fps -a $audio_1 -a $audio_2 -c $format -k $v_codec -ac $a_codec -r $lenght -o $output &
|
||||
notify-send -u low 'Screen record' 'Replay started'
|
||||
|
@@ -1,13 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -z "$CAPTURE_INPUT_AUDIO" ] && audio_1="easyeffects_sink.monitor" || audio_1="$CAPTURE_INPUT_AUDIO"
|
||||
[ -z "$CAPTURE_OUTPUT_AUDIO" ] && audio_2="easyeffects_source" || audio_2="$CAPTURE_OUTPUT_AUDIO"
|
||||
[ -z "$CAPTURE_DIR" ] && output_dir="$HOME/downloads" || output_dir="$CAPTURE_DIR"
|
||||
|
||||
window=$(xdotool getwindowfocus)
|
||||
fps=30
|
||||
audio_1="$(pactl get-default-sink).monitor"
|
||||
audio_2="$(pactl get-default-source)"
|
||||
format="mp4"
|
||||
v_codec="h264"
|
||||
a_codec="opus"
|
||||
output="$HOME/downloads/recording-$(date '+%Y-%m-%d_%H-%M-%S').$format"
|
||||
output="$output_dir/recording-$(date '+%Y-%m-%d_%H-%M-%S').$format"
|
||||
|
||||
gpu-screen-recorder -w $window -c $format -k $v_codec -ac $a_codec -f $fps -a $audio_1 -a $audio_2 -o $output &
|
||||
notify-send -u low 'Screen record' 'Recording started'
|
||||
|
Reference in New Issue
Block a user