From 495f38d059629d773e7b0264fd4e8e2714b592d1 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 14 Mar 2013 11:13:16 +0100 Subject: [PATCH 1/1] contrib: add the am7xxx-play-window.sh script --- contrib/am7xxx-play-window.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 contrib/am7xxx-play-window.sh diff --git a/contrib/am7xxx-play-window.sh b/contrib/am7xxx-play-window.sh new file mode 100755 index 0000000..729a72e --- /dev/null +++ b/contrib/am7xxx-play-window.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# am7xxx-play-window - show only a given window with am7xxx-play +# +# Copyright (C) 2013 Antonio Ospite +# +# This program is free software. It comes without any warranty, to +# the extent permitted by applicable law. You can redistribute it +# and/or modify it under the terms of the Do What The Fuck You Want +# To Public License, Version 2, as published by Sam Hocevar. See +# http://sam.zoy.org/wtfpl/COPYING for more details. + +set -e + +DISPLAY=":0" + +WIN_INFO="$(xwininfo)" + +X=$(echo "$WIN_INFO" | sed -n -e "/^[[:space:]]*Absolute upper-left X:[[:space:]]*/s///p") +Y=$(echo "$WIN_INFO" | sed -n -e "/^[[:space:]]*Absolute upper-left Y:[[:space:]]*/s///p") +WIDTH=$(echo "$WIN_INFO" | sed -n -e "/^[[:space:]]*Width:[[:space:]]*/s///p") +HEIGHT=$(echo "$WIN_INFO" | sed -n -e "/^[[:space:]]*Height:[[:space:]]*/s///p") + +set -x +am7xxx-play -f x11grab -i "${DISPLAY}+${X},${Y}" -o video_size="${WIDTH}x${HEIGHT}" -- 2.1.4