On Thu, Sep 1, 2011 at 7:46 PM, Bjartur Thorlacius <svartman95_AT_gmail.com> wrote:
> Žann miš 31.įgś 2011 12:09, skrifaši Rafa Garcia Gallego:
>> I sometimes use sandy in a SSH session, so I wrote some code around
>> dmenu to have it work in the console. The resulting program takes
>> input from stdin, reopens the tty, prints the UI to stderr, gets your
>> input (again from stdin) and prints the result to stdout, so it mostly
>> works as a drop-in replacement for dmenu. Stuff I don't use such as
>> the multiline menu and runtime selectable colors is not implemented.
>>
> Why not write the UI to tty directly? Or do you suppose redirecting stderr
> to null to get rid of the UI is worth supporting?
>
Actually I might as well had done this. However, I had nothing to
write to stderr anyways and it seems cleaner this way: the file
descriptor is open and points to the tty, so why not use it?. Bonus
feature: you may redirect it to another tty for -say- debugging.
Anyways, I doubt anyone redirects stderr to /dev/null by default,
much less for an interactive program. You could (maybe should)
redirect stderr in the command you use to feed slmenu its options
(unlike say for dmenu, which usually just pollutes your
.xsession-errors a bit). Either way, slmenu does not print its UI
until it's finished reading stdin, same as dmenu.
Received on Thu Sep 01 2011 - 22:05:33 CEST
This archive was generated by hypermail 2.2.0 : Thu Sep 01 2011 - 22:12:03 CEST