Re: sawfish script file

On Thu, Sep 21, 2006 at 12:10:06PM -0600, Michal Jaegermann wrote:
> sawfish-client can read its input from stdin.  Therefore
> you can always write your script in such way
> #! /bin/sh
> sawfish-client - <<"EOI"
> (require 'myself.coolthings)
> (do-something)

Well, it works, but I'm quite unsatisfied with it (I can't use the
syntax highlight specific for sawfish when editing the script file).

For who could be interested I also tried with binfmt_misc (see
/usr/src/linux/Documentation/binfmt_misc.txt) using this entry for the
binfmt_misc register:

name sawfish
type E
offset 0
magic jl
mask 0xff
interpreter /usr/bin/sawfish-client
flags P

This entry corresponds to a string to be passed to the binfmt register
(somewhere in the system startup procedure) in this way:

echo -n :sawfish:E:0:jl:0xff:/usr/local/bin/sawfish-client-wrapper:P > /proc/sys/fs/binfmt_misc/register

while the sawfish-client-wrapper is defined in this way:
#! /bin/sh
cat $1 | /usr/bin/sawfish-client -

The sawfish-client scripts have to have the jl extension and have to be
The problem with this approach is that isn't portable (and I don't
like executables with an extension...).

It would be definitively a nice feature to implement the possibility
of a #! method (emacs already did it in the CVS version). 

Thanks for the replies.

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