1a5ae21e4Smrg#!/bin/sh
204b94745Smrg# $XTermId: bounce.sh,v 1.3 2020/01/12 22:51:16 tom Exp $
3a5ae21e4Smrg# -----------------------------------------------------------------------------
4a5ae21e4Smrg# this file is part of xterm
5a5ae21e4Smrg#
6a5ae21e4Smrg# Copyright 2020 by Thomas E. Dickey
7a5ae21e4Smrg# 
8a5ae21e4Smrg#                         All Rights Reserved
9a5ae21e4Smrg# 
10a5ae21e4Smrg# Permission is hereby granted, free of charge, to any person obtaining a
11a5ae21e4Smrg# copy of this software and associated documentation files (the
12a5ae21e4Smrg# "Software"), to deal in the Software without restriction, including
13a5ae21e4Smrg# without limitation the rights to use, copy, modify, merge, publish,
14a5ae21e4Smrg# distribute, sublicense, and/or sell copies of the Software, and to
15a5ae21e4Smrg# permit persons to whom the Software is furnished to do so, subject to
16a5ae21e4Smrg# the following conditions:
17a5ae21e4Smrg# 
18a5ae21e4Smrg# The above copyright notice and this permission notice shall be included
19a5ae21e4Smrg# in all copies or substantial portions of the Software.
20a5ae21e4Smrg# 
21a5ae21e4Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22a5ae21e4Smrg# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23a5ae21e4Smrg# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24a5ae21e4Smrg# IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
25a5ae21e4Smrg# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26a5ae21e4Smrg# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27a5ae21e4Smrg# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28a5ae21e4Smrg# 
29a5ae21e4Smrg# Except as contained in this notice, the name(s) of the above copyright
30a5ae21e4Smrg# holders shall not be used in advertising or otherwise to promote the
31a5ae21e4Smrg# sale, use or other dealings in this Software without prior written
32a5ae21e4Smrg# authorization.
33a5ae21e4Smrg# -----------------------------------------------------------------------------
34a5ae21e4Smrg# iconify/deiconify, recording the window properties
35a5ae21e4SmrgLOG=1
36a5ae21e4Smrglogit() {
37a5ae21e4Smrg	sleep 2
38a5ae21e4Smrg	[ -n "$WINDOWID" ] && xprop -id $WINDOWID >bounce${LOG}.log
39a5ae21e4Smrg	LOG=`expr $LOG + 1`
40a5ae21e4Smrg}
41a5ae21e4Smrg
42a5ae21e4Smrg[ -n "$WINDOWID" ] && rm -f bounce*.log
43a5ae21e4Smrg
44a5ae21e4Smrgprintf 'Hello ...\n'
45a5ae21e4Smrglogit
46a5ae21e4Smrg
47a5ae21e4Smrgprintf '\033[2t'
48a5ae21e4Smrglogit
49a5ae21e4Smrg
50a5ae21e4Smrgprintf '\033[1t'
51a5ae21e4Smrglogit
52a5ae21e4Smrg
53a5ae21e4Smrgprintf 'World!\n'
54a5ae21e4Smrglogit
55a5ae21e4Smrg
56a5ae21e4Smrg[ -n "$WINDOWID" ] && ls -l bounce*.log
57