dotfiles/scripts/replay_application_name.sh

10 lines
527 B
Bash
Raw Normal View History

2024-05-24 00:20:58 +02:00
#!/bin/sh
window=$(i3-msg -t get_tree | jq -r ".. | select(.focused? == true) | .window")
window_name=$(xdotool getwindowclassname "$window" || xdotool getwindowname "$window" || echo "?")
echo $window_name > /tmp/replay.tmp
gpu-screen-recorder -w "$window" -f 60 -a "$(pactl get-default-sink).monitor|$(pactl get-default-source)" -c mp4 -k h264 -r 150 -o "$HOME/Videos/Replays/$window_name"
#gpu-screen-recorder -w "$window" -f 60 -c mkv -a "$(pactl get-default-sink).monitor" -r 60 -o "$HOME/Videos/Replays/$window_name"