Revision 46

Date:
2007/08/02 09:58:43
Author:
dpavlin
Revision Log:
put startup/cleanup code in function, should solve problems with popups
which grab wrong windows because of hanging id files in /dev/shm
Files:

Legend:

 
Added
 
Removed
 
Modified
  • trunk/dwm-popup

     
    5 5 name="dwm-popup-$uid"
    6 6 id_f="/dev/shm/$name.id"
    7 7
    8 if [ "$2" == "term" ] ; then
    8 function start() {
    9 9 id=`xwit -current -print | cut -d: -f1`
    10 echo "*** uid $uid id $id to $id_f ***"
    10 echo "*** start uid $uid id $id to $id_f ***"
    11 11 echo $id > $id_f
    12 $@;
    13 rm -f $id_f;
    14 exit
    15 }
    12 16
    17 if [ "$2" == "term" ] ; then
    13 18 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 ;;
    19 a) start screen -R -S $name ;;
    20 s) start screen -R -S $name irssi ;;
    21 *) start bash ;;
    17 22 esac
    18 23 fi
    19 24
     
    23 28 *) g="80x25+100+100"; f="neep-alt-iso8859-2-18" ; echo "*** default ***" ;;
    24 29 esac
    25 30
    26 term="xterm -geometry $g -name $name -fn $f -rv +sb -n $name -ls -e $0 $uid term"
    31 xterm=`which rxvt-2.7.10 || whixh rxvt`
    32 term="$xterm -geometry $g -name $name -fn $f -rv +sb -n $name -ls -e $0 $uid term"
    27 33 echo "*** using term: $term ***"
    28 34
    29 35 if [ ! -e $id_f ] ; then