/[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 51 - (show annotations)
Wed Aug 22 21:06:52 2007 UTC (16 years, 7 months ago) by dpavlin
File size: 1006 byte(s)
add geometry and font for s

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 s) g="130x48-35-35"; f="neep-alt-iso8859-2-18" ;;
29 *) g="80x25+100+100"; f="neep-alt-iso8859-2-18" ; echo "*** default ***" ;;
30 esac
31
32 xterm=`which rxvt-2.7.10 || whixh rxvt`
33 term="$xterm -geometry $g -name $name -fn $f -rv +sb -n $name -ls -e $0 $uid term"
34 echo "*** using term: $term ***"
35
36 if [ ! -e $id_f ] ; then
37 $term
38 else
39 id=`cat $id_f`
40 info=`xwininfo -id $id`
41 echo "*** $id from $id_f = $info ***"
42 test ! -z "$info" && (
43 op="-unmap"
44 echo $info | grep 'Map State: IsViewable' > /dev/null || op="-pop"
45 xwit $op -id $id
46 ) || $term
47 fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26