1
0
Fork 0

wm: screen grabbing

This commit is contained in:
Vladimír Dudr 2024-09-07 10:03:45 +02:00
parent ad4efbbe9a
commit 4ccab0b916
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#!/bin/zsh
pidfile=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/recording.status
win=$(xdotool getactivewindow)
if [[ -e $pidfile ]]
then
read pid file < $pidfile
kill -INT $pid
xclip <<<$file
notify-send "Recording stopped"
rm $pidfile
exit
fi
file=~/Videos/screengrab-$(date +%FT%T).ogv
recordmydesktop --windowid=$win --no-sound -o $file --on-the-fly-encoding &
echo $! $file> $pidfile
notify-send "Recording window $(xdotool getwindowname $win)"

View file

@ -146,6 +146,7 @@ hc keybind Print spawn systemd-run --scope --user sh -c 'maim --hidecursor | xcl
hc keybind Shift-Print spawn systemd-run --scope --user sh -c 'maim --select --hidecursor | xclip -t image/png -selection clip'
# shellcheck disable=SC2016
hc keybind Ctrl-Print spawn systemd-run --scope --user sh -c 'maim -i $(xdotool getactivewindow) | xclip -t image/png -selection clip'
hc keybind Ctrl-Print spawn systemd-run --scope --user sh -c "$HOME/bin/recordcurrwin"f=documents recordmydesktop --windowid=$(xdotool getactivewindow) | xclip -t image/png -selection clip
# theme
hc attr theme.tiling.reset 1