[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] Re: poundbang
From: |
Shawn Betts |
Subject: |
Re: [RP] Re: poundbang |
Date: |
Thu Mar 4 23:55:01 2004 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Ryan Yeske <address@hidden> writes:
> Shawn Betts <address@hidden> writes:
>
> > John Meacham <address@hidden> writes:
> > >
> > > the correct solution is to add a single option
> > >
> > > -f <file> - read commands from file.
> > >
> > > then put
> > > #!/usr/bin/ratpoison -f
> > >
> > > at the beginning of your files.
> >
> > I'm not sure I understand the point of being able to use ratpoison
> > this way. Ratpoison will never have conditionals, looping, or
> > variables as part of it's command set. So the only thing you'll ever
> > be able to do is list a bunch of hard-coded commands.
> >
> > Let's also not forget that if you want to run the sh script
> > 'doit.sh' you can run:
> >
> > $ doit.sh
> >
> > if the permissions are setup or
> >
> > $ sh doit.sh
> >
> > If you want to run a batch of commands you can always run:
> >
> > $ ratpoison -c "source <file>"
> >
> > And if you do it often then you can bind a key or an alias to it and
> > execute it quickly.
>
> While this is all true, I do think its still *slightly* more
> convenient to be able to write the file 'doit.rp' as:
>
> #!/usr/bin/ratpoison -f
> next
> banish
> prev
>
> I'll try to state the case for #!/usr/bin/ratpoison:
>
> 1) First of all, never say never. Who can really say what ratpoison
> will look like in 5/10 years? It may have conditionals, looping,
> whatever. Hopefully we are all running stumpwm then, but...
No way man. If you want a programming language wrap the rp commands
in your favorite language load the rp command wrapper and hack away:
#!/usr/bin/lisp
(asdf:operate 'asdf:load-op 'ratpoison-cmd)
(if (eq (yer-daddy) 'sabetts)
(rp:split)
(rp:echo "Not even."))
(loop for i in (rp:windows "%n")
for j from 1 to (length (rp:windows))
do (rp:number (i j)))
There will never be an rp scripting language.
> 5) From the shell, its slightly easier to fit ratpoison into a
> pipeline. Where you want it to read commands from stdin if you
> just need to write foobar|ratpoison -f /dev/stdin rather than
> foobar|ratpoison -c "source /dev/stdin". Not only is it NINE
> characters shorter, but there is a layer of quotes removed, which
> is always good.
ratpoison -c "source /dev/stdin" won't work because it tells the
window managing ratpoison to source /dev/stdin which is who knows
where.
After reading your argument I do agree that there is some benefit to
telling ratpoison to send the contents of a file to the mother
process.
I'll prolly sit on the patch for a month and then apply it like I
usually do :).
-Shawn
- Re: [RP] poundbang, (continued)
- Re: [RP] poundbang, Shawn Betts, 2004/03/04
- Re: [RP] poundbang, Joshua Neuheisel, 2004/03/04
- Re: [RP] Re: poundbang, twb, 2004/03/04
- [RP] Re: poundbang, Björn Lindström, 2004/03/04
- Re: [RP] Re: poundbang, John Meacham, 2004/03/04
- Re: [RP] Re: poundbang, Shawn Betts, 2004/03/04
- Re: [RP] Re: poundbang, Ryan Yeske, 2004/03/05
- Re: [RP] Re: poundbang,
Shawn Betts <=
- Re: [RP] Re: poundbang, twb, 2004/03/05
- Re: [RP] Re: poundbang, Cameron Patrick, 2004/03/05
- Re: [RP] Re: poundbang, twb, 2004/03/05
- Re: [RP] Re: poundbang, Joshua Neuheisel, 2004/03/05
- Re: [RP] Re: poundbang, Patrick Goldmann, 2004/03/07
- JNPatch problem [Was: Re: [RP] Re: poundbang], Joshua Neuheisel, 2004/03/08
- Re: JNPatch problem [Was: Re: [RP] Re: poundbang], Patrick Goldmann, 2004/03/08
- Re: JNPatch problem [Was: Re: [RP] Re: poundbang], Joshua Neuheisel, 2004/03/08
- Re: JNPatch problem [Was: Re: [RP] Re: poundbang], Patrick Goldmann, 2004/03/08
- Re: JNPatch problem [Was: Re: [RP] Re: poundbang], Joshua Neuheisel, 2004/03/09