/[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 44 - (hide annotations)
Sat Jul 28 23:49:51 2007 UTC (15 years, 4 months ago) by dpavlin
File size: 731 byte(s)
moved all functionality into single script which calls itself

1 dpavlin 44 #!/bin/sh
2 dpavlin 42
3 dpavlin 44 uid="$1"
4     test -z "$uid" && uid="null"
5     name="dwm-popup-$uid"
6     id_f="/tmp/$name.id"
7 dpavlin 42
8 dpavlin 44 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 dpavlin 42 $term
25     else
26 dpavlin 44 id=`cat $id_f`
27 dpavlin 42 info=`xwininfo -id $id`
28 dpavlin 44 echo "*** $id from $id_f ***"
29 dpavlin 42 test ! -z "$info" && (
30     op="-unmap"
31     echo $info | grep 'Map State: IsViewable' > /dev/null || op="-pop"
32     xwit $op -id $id
33     ) || $term
34     fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26