wm: screen grabbing
This commit is contained in:
parent
ad4efbbe9a
commit
4ccab0b916
2 changed files with 24 additions and 0 deletions
23
bin/executable_recordcurrwin
Normal file
23
bin/executable_recordcurrwin
Normal 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)"
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue