#!/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"