/[scripts]/trunk/dwm-popup
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/dwm-popup

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46 - (show annotations)
Thu Aug 2 09:58:43 2007 UTC (16 years, 8 months ago) by dpavlin
File size: 956 byte(s)
put startup/cleanup code in function, should solve problems with popups
which grab wrong windows because of hanging id files in /dev/shm

1 #!/bin/sh -x
2
3 uid="$1"
4 test -z "$uid" && uid="null"
5 name="dwm-popup-$uid"
6 id_f="/dev/shm/$name.id"
7
8 function start() {
9 id=`xwit -current -print | cut -d: -f1`
10 echo "*** start uid $uid id $id to $id_f ***"
11 echo $id > $id_f
12 $@;
13 rm -f $id_f;
14 exit
15 }
16
17 if [ "$2" == "term" ] ; then
18 case $uid in
19 a) start screen -R -S $name ;;
20 s) start screen -R -S $name irssi ;;
21 *) start bash ;;
22 esac
23 fi
24
25
26 case $uid in
27 a) g="100x43+100-20"; f="neep-alt-iso8859-2-24" ;;
28 *) g="80x25+100+100"; f="neep-alt-iso8859-2-18" ; echo "*** default ***" ;;
29 esac
30
31 xterm=`which rxvt-2.7.10 || whixh rxvt`
32 term="$xterm -geometry $g -name $name -fn $f -rv +sb -n $name -ls -e $0 $uid term"
33 echo "*** using term: $term ***"
34
35 if [ ! -e $id_f ] ; then
36 $term
37 else
38 id=`cat $id_f`
39 info=`xwininfo -id $id`
40 echo "*** $id from $id_f = $info ***"
41 test ! -z "$info" && (
42 op="-unmap"
43 echo $info | grep 'Map State: IsViewable' > /dev/null || op="-pop"
44 xwit $op -id $id
45 ) || $term
46 fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26