/[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 45 - (hide annotations)
Sun Jul 29 11:12:42 2007 UTC (16 years, 8 months ago) by dpavlin
File size: 903 byte(s)
configurable geometry and font name for windows, 
create tmp files in /dev/shm

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 44 if [ "$2" == "term" ] ; then
9     id=`xwit -current -print | cut -d: -f1`
10 dpavlin 45 echo "*** uid $uid id $id to $id_f ***"
11 dpavlin 44 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 dpavlin 45 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 dpavlin 44 if [ ! -e $id_f ] ; then
30 dpavlin 42 $term
31     else
32 dpavlin 44 id=`cat $id_f`
33 dpavlin 42 info=`xwininfo -id $id`
34 dpavlin 45 echo "*** $id from $id_f = $info ***"
35 dpavlin 42 test ! -z "$info" && (
36     op="-unmap"
37     echo $info | grep 'Map State: IsViewable' > /dev/null || op="-pop"
38     xwit $op -id $id
39     ) || $term
40     fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26