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

Diff of /trunk/dwm-popup

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 43 by dpavlin, Sat Jul 28 20:00:07 2007 UTC revision 51 by dpavlin, Wed Aug 22 21:06:52 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh -x  #!/bin/sh -x
2    
3  name="dwm-popup"  uid="$1"
4  term="rxvt -geometry 100x30+100-0 -name $name -fn neep-alt-iso8859-2-24 -rv +sb -n $name -ls -e dwm-popup-term"  test -z "$uid" && uid="null"
5    name="dwm-popup-$uid"
6    id_f="/dev/shm/$name.id"
7    
8  if [ ! -e /tmp/popup.id ] ; then  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          $term
38  else  else
39          id=`cat /tmp/popup.id`          id=`cat $id_f`
40          info=`xwininfo -id $id`          info=`xwininfo -id $id`
41          echo "*** $id ***"          echo "*** $id from $id_f = $info ***"
42          test ! -z "$info" && (          test ! -z "$info" && (
43                  op="-unmap"                  op="-unmap"
44                  echo $info | grep 'Map State: IsViewable' > /dev/null || op="-pop"                  echo $info | grep 'Map State: IsViewable' > /dev/null || op="-pop"

Legend:
Removed from v.43  
changed lines
  Added in v.51

  ViewVC Help
Powered by ViewVC 1.1.26