/[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

Annotation of /trunk/dwm-popup

Parent Directory Parent Directory | Revision Log Revision Log


Revision 66 - (hide annotations)
Fri Feb 15 22:00:35 2008 UTC (14 years, 3 months ago) by dpavlin
File size: 1005 byte(s)
resize chat window

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