/[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 44 by dpavlin, Sat Jul 28 23:49:51 2007 UTC revision 45 by dpavlin, Sun Jul 29 11:12:42 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh -x
2    
3  uid="$1"  uid="$1"
4  test -z "$uid" && uid="null"  test -z "$uid" && uid="null"
5  name="dwm-popup-$uid"  name="dwm-popup-$uid"
6  id_f="/tmp/$name.id"  id_f="/dev/shm/$name.id"
7    
8  if [ "$2" == "term" ] ; then  if [ "$2" == "term" ] ; then
9          id=`xwit -current -print | cut -d: -f1`          id=`xwit -current -print | cut -d: -f1`
10          echo "*** uid $uid id $id ***"          echo "*** uid $uid id $id to $id_f ***"
11          echo $id > $id_f          echo $id > $id_f
12    
13          case $uid in          case $uid in
# Line 17  if [ "$2" == "term" ] ; then Line 17  if [ "$2" == "term" ] ; then
17          esac          esac
18  fi  fi
19    
20  #  
21  term="rxvt -geometry 100x43+100-20 -name $name -fn neep-alt-iso8859-2-24 -rv +sb -n $name -ls -e $0 $uid term"  case $uid in
22    a) g="100x43+100-20"; f="neep-alt-iso8859-2-24" ;;
23    *) g="80x25+100+100"; f="neep-alt-iso8859-2-18" ; echo "*** default ***" ;;
24    esac
25    
26    term="xterm -geometry $g -name $name -fn $f -rv +sb -n $name -ls -e $0 $uid term"
27    echo "*** using term: $term ***"
28    
29  if [ ! -e $id_f ] ; then  if [ ! -e $id_f ] ; then
30          $term          $term
31  else  else
32          id=`cat $id_f`          id=`cat $id_f`
33          info=`xwininfo -id $id`          info=`xwininfo -id $id`
34          echo "*** $id from $id_f ***"          echo "*** $id from $id_f = $info ***"
35          test ! -z "$info" && (          test ! -z "$info" && (
36                  op="-unmap"                  op="-unmap"
37                  echo $info | grep 'Map State: IsViewable' > /dev/null || op="-pop"                  echo $info | grep 'Map State: IsViewable' > /dev/null || op="-pop"

Legend:
Removed from v.44  
changed lines
  Added in v.45

  ViewVC Help
Powered by ViewVC 1.1.26