summaryrefslogtreecommitdiff
path: root/bin/guiscripts
diff options
context:
space:
mode:
Diffstat (limited to 'bin/guiscripts')
-rwxr-xr-xbin/guiscripts/vrec10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/guiscripts/vrec b/bin/guiscripts/vrec
index f876da0..91443f4 100755
--- a/bin/guiscripts/vrec
+++ b/bin/guiscripts/vrec
@@ -5,7 +5,7 @@
# dependencies:
# - ffmpeg
# - hacksaw: part
-# - xdotool: active
+# - xdotool: active,window
# - xdg-user-dir
# - dmenu
# - clipp
@@ -21,6 +21,7 @@
# - full: record your full screen
# - last: copy the latest recording's path to the clipboard
# - audio: one of the prior recording commands but with sound
+# - window: select a window with xdotool and capture that geometry
# Recording:
# there is a lock file
@@ -87,7 +88,7 @@ fi
output="$(date +%F_%H-%M-%S)"
if [ -z "${option:="$1"}" ]; then
- option="$(printf 'active\npart\nstop\nfull\naudio\nlast\n' | dmenu -c)"
+ option="$(printf 'active\npart\nstop\nfull\naudio\nlast\nwindow\n' | dmenu -c)"
fi
[ "$option" ] || exit 1
@@ -96,6 +97,11 @@ case "$option" in
record_cmd $(xwininfo -id "$(xdotool getactivewindow)" |
sed '/Absolute\|Width:\|Height:/!d;s/.*:\s*//' | tr '\n' ' ') "$dir" "$output"
;;
+ window)
+ eval "$(xdotool getwindowgeometry --shell "$(xdotool selectwindow)")"
+
+ record_cmd $X $Y $WIDTH $HEIGHT "$dir" "$output"
+ ;;
part)
hacksaw | {
IFS=+x read -r w h x y