mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-10-10 03:21:16 +02:00
wayland: preliminary migration done
This commit is contained in:
@@ -5,13 +5,18 @@ audio_2=${CAPTURE_OUTPUT_AUDIO:-easyeffects_source}
|
||||
output=${CAPTURE_DIR:-$HOME/downloads}
|
||||
device=${CAPTURE_DEVICE:-cpu}
|
||||
|
||||
window=$(xdotool getwindowfocus)
|
||||
fps=60
|
||||
format="mp4"
|
||||
v_codec="h264"
|
||||
a_codec="opus"
|
||||
lenght=20
|
||||
|
||||
|
||||
if [ $DISPLAY_SERVER = "wayland" ]; then
|
||||
window="screen"
|
||||
elif [ $DISPLAY_SERVER = "xorg" ]; then
|
||||
window=$(xdotool getwindowfocus)
|
||||
fi
|
||||
|
||||
gpu-screen-recorder -encoder $device -w $window -f $fps -a $audio_1 -a $audio_2 -c $format -k $v_codec -ac $a_codec -r $lenght -o $output &
|
||||
# gpu-screen-recorder -encoder $device -w screen -f $fps -a $audio_1 -a $audio_2 -c $format -k $v_codec -ac $a_codec -r $lenght -o $output & # wayland command
|
||||
notify-send -u low 'Screen record' 'Replay started'
|
||||
|
@@ -5,13 +5,17 @@ audio_2=${CAPTURE_OUTPUT_AUDIO:-easyeffects_source}
|
||||
output=${CAPTURE_DIR:-$HOME/downloads}
|
||||
device=${CAPTURE_DEVICE:-cpu}
|
||||
|
||||
window=$(xdotool getwindowfocus)
|
||||
fps=30
|
||||
format="mp4"
|
||||
v_codec="h264"
|
||||
a_codec="aac"
|
||||
output="$output/recording-$(date '+%Y-%m-%d_%H-%M-%S').$format"
|
||||
|
||||
if [ $DISPLAY_SERVER = "wayland" ]; then
|
||||
window="screen"
|
||||
elif [ $DISPLAY_SERVER = "xorg" ]; then
|
||||
window=$(xdotool getwindowfocus)
|
||||
fi
|
||||
|
||||
gpu-screen-recorder -encoder $device -w $window -c $format -k $v_codec -ac $a_codec -f $fps -o $output &
|
||||
# gpu-screen-recorder -encoder $device -w screen -c $format -k $v_codec -ac $a_codec -f $fps -o $output & # wayland command
|
||||
notify-send -u low 'Screen record' 'Recording started'
|
||||
|
Reference in New Issue
Block a user