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

1 #!/bin/sh
2
3 uid="$1"
4 test -z "$uid" && uid="null"
5 name="dwm-popup-$uid"
6 id_f="/tmp/$name.id"
7
8 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
25 else
26 id=`cat $id_f`
27 info=`xwininfo -id $id`
28 echo "*** $id from $id_f ***"
29 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