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

Contents of /trunk/dwm-popup

Parent Directory Parent Directory | Revision Log Revision Log


Revision 45 - (show annotations)
Sun Jul 29 11:12:42 2007 UTC (14 years, 11 months ago) by dpavlin
File size: 903 byte(s)
configurable geometry and font name for windows, 
create tmp files in /dev/shm

1 #!/bin/sh -x
2
3 uid="$1"
4 test -z "$uid" && uid="null"
5 name="dwm-popup-$uid"
6 id_f="/dev/shm/$name.id"
7
8 if [ "$2" == "term" ] ; then
9 id=`xwit -current -print | cut -d: -f1`
10 echo "*** uid $uid id $id to $id_f ***"
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 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
30 $term
31 else
32 id=`cat $id_f`
33 info=`xwininfo -id $id`
34 echo "*** $id from $id_f = $info ***"
35 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