Re: autostart terminal after init?

I wrote:

> I have this code in ~/.sawfish/rc:
>  (define-special-variable _init-sequence nil "sawfish has initialized")
>  (define (spott-init what)
>    (unless (or
>              _init-sequence
>              ; wm-spec-window-id
>              batch-mode)
>      (let ((first-term (concat xterm-program "-e bash &")))

must be

    (let ((first-term (concat xterm-program " -e bash &")))

note the blank before the "-e", otherwise first-term would be "urxvt-e
bash &".

>        (case what
>          (('terminal)

must be


I kept thinking "this is fishy, doesn't `case' quote the tags by itself?
And so it does.

>           (system first-term))
>          (t 'unidentified-object)
>          )
>        (setq _init-sequence (1+ (or _init-sequence 0))))))
>  (add-hook 'after-initialization-hook
>      (lambda () (spott-init 'terminal))
>      t)

For debugging I used:

    (let ((first-term (concat xterm-program " -e bash &")))
      (case what
         ;(message ; display-message &optional text attributes
           (concat "spott-init: system " first-term) ; [DISPLAY-NOW]
         (system first-term))
        ;(t 'unidentified-object)
        (t (message "spott-init: unidentified-initialization-object"))

ie. the builtin `message', whose output shows up in the x11 log.  is
there something better?  That 'display-message' somehow didn't work,
I had expected it to pop up a little window and show the text.  It does
when called from "sawfish-client", but not in my simple rc file.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]