"Arregui-Garc�a, Javier" wrote:

> �Alg�n d�a, no! �Ahora!  :-))
>
> Javi
>
> > -----Mensaje original-----
> > De: Juan C. Amengual [mailto:[EMAIL PROTECTED]
> > (alg�n d�a os contar� c�mo usando el fichero "autostart" de
> > wmaker y una macro de gawk
> > consigo que al hacer login en el xdm se me "coloque"
> > autom�ticamente un tema de wmaker
> > elegido al azar entre todos los que tengo)

cediendo a la presi�n popular ... ;-)

[EMAIL PROTECTED](~)_$ cat GNUstep/Library/WindowMaker/autostart
#!/bin/sh
# fijo par�metros de respuesta del "mouse"
xset m 20/10 4

# fijo par�metros DPMS (Energy Star) pa'l monitor (standby, suspend y off en 
segundos)
xset dpms 2700 3600 5400  --->  en segundos

# matar el xscreensaver general
xscreensaver-command -exit

# arranco xscreensaver para que lea mi configuraci�n de usuario (.xscreensaver)
xscreensaver &

# elecci�n aleatoria de firma del e-mail. El "echo" es para ver salida en 
.xsession-errors
kk1=~/Firmas/
kk2=`ls -l $kk1 | gawk -f ~/SelFicheAzar.awk`
kk=$kk1$kk2

# copio firma a fichero membrete (fichero de firma pa'l Notescapes)
cp "$kk" ~/membrete
echo "La firma es $kk."

# elecci�n aleatoria de tema del WindowMaker (general del sistema + temas 
particulares)
kk=`ls -l /usr/share/WindowMaker/Themes/ ~/GNUstep/Library/WindowMaker/Themes/ 
| gawk -f
~/SelFicheAzar.awk`

# fijar tema elegido en wmaker. El "echo" es para ver salida en .xsession-errors
setstyle "$kk"
echo "El estilo es $kk."

# Lanzo el m�dulo de gesti�n de sonidos de wmaker
wmsound &

# ... y el reloj. La opci�n "-exe" permite que al clicar en el reloj me "diga" 
la hora
asclock -shape -led green2 -exe 'saytime' &

# fijo par�metros SoundBlaster (guardados en mi .aumixrc)
aumix -L > /dev/null

[EMAIL PROTECTED](~)_$ cat SelFicheAzar.awk
BEGIN { i = 0; path = ""; }
/^\// { l = length($1); path = substr($1,1,l-1); }
/^-/ { a[i] = path $9;
       for (j = 10; j <= NF; j++)
         a[i] = a[i] " " $j;
       i++; }
END { srand();
      j = entazar(i);
      print a[j] }

function entazar(n) {
  return int(n * rand());
}

Saludos,

================================================================================

JUAN CARLOS AMENGUAL            Suddenly I stop,
UNIVERSIDAD JAUME I             but I know it's too late.
DEPARTAMENTO DE INFORM�TICA     I'm lost in a forest, all alone.
CAMPUS DE RIU SEC, EDIFICIO TI  The girl was never there, it's always the same,
CASTELLON, 12071. SPAIN.        I'm running towards nothing
Phone: +34 964 728361           again and again and again and again.
Fax: +34 964 728435                     Robert Smith (The Cure)
e-mail: [EMAIL PROTECTED]       - "A Forest", Seventeen Seconds, 1980,
                                                Fiction Rec. -

================================================================================



Responder a