/[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 44 by dpavlin, Sat Jul 28 23:49:51 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh -x  #!/bin/sh
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="/tmp/$name.id"
7    
8  if [ ! -e /tmp/popup.id ] ; then  if [ "$2" == "term" ] ; then
9            id=`xwit -current -print | cut -d: -f1`
10            echo "*** uid $uid id $id ***"
11            echo $id > $id_f
12    
13            case $uid in
14            a) exec screen -R -S $name ;;
15            s) exec screen -R -S $name irssi ;;
16            *) echo "*** default fallback for $uid ***" ; exec bash ;;
17            esac
18    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"
22    
23    if [ ! -e $id_f ] ; then
24          $term          $term
25  else  else
26          id=`cat /tmp/popup.id`          id=`cat $id_f`
27          info=`xwininfo -id $id`          info=`xwininfo -id $id`
28          echo "*** $id ***"          echo "*** $id from $id_f ***"
29          test ! -z "$info" && (          test ! -z "$info" && (
30                  op="-unmap"                  op="-unmap"
31                  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.44

  ViewVC Help
Powered by ViewVC 1.1.26