Re: Execute a bash command in ratpoison

Martin Samuelsson <ratpoison-kkV9NS1dZ7+opA9ZTd/[email protected]> Mon, 11 Nov 2019 10:18:54 +0100
Newsgroups gmane.comp.window-managers.ratpoison.devel
Message-ID <[email protected]>
David Trombly @ 2019-11-11 (Monday), 06:24 (+0300)
>
>I was wondering if it would be possible to display the contents of a bas=
h script inside Ratpoison.

Likely, the command you're looking for is "echo". Try e.g.:

  ratpoison --command "echo $HOME `whoami`"

Documentation available at:

https://www.nongnu.org/ratpoison/doc/The-Status-Bar.html#The-Status-Bar

Hope that'll get you started!

>I coded my own menu in bash, using bash color codes, and I thought it mi=
ght be possible to view it inside Ratpoison. I've tried the straight exec=
 command, and it escapes with an error code "(1)".=A0

This might disappoint you, but ratpoison does not parse colour codes. So=20
they will not work in the bar.

If ratpoison reports a script to finish with an error code, that's becaus=
e=20
the script did. Try debugging it in a terminal at first. Executing it the=
re=20
should yield the same result as starting it with ratpoison's exec. There'=
s=20
no magic involved when launching.

>I'm assuming it's possible, since ratmen is based in bash as well too.
>I can post the code if you need me to, it's fairly basic echo commands w=
ith color codes and "#" used as borders and seperators as well.
>Any ideas?

Maybe looking at http://ratpoison.wxcvbn.org/cgi-bin/wiki.pl can bring so=
me=20
insight and inspiration? Especially the script section.