Questions about windows support

Adam D. Ruppe destructionator at gmail.com
Mon Feb 20 20:56:49 PST 2012


On Tuesday, 21 February 2012 at 03:53:20 UTC, H. S. Teoh wrote:
> But alas, if you were to implement such a terminal,
> pretty much *everything* would break, since everyone assumes the
> terminal is just a single stream of mixed controls + data.

Yeah... I've been wanting to do it, but it'd mean
redoing almost every app and that just isn't worth
it.

> Is that because you're trying to do this through gnu screen?

The shift+ certain keys is a limitation of the terminal
itself, not just screen.

Now, screen sometimes does some weird things, but I've
found it does a pretty good job on the whole.

(really annoying is if you start up vim from a box with X.
vim connects to X. Then detach it in screen and reattach
in another window. vim dies with a BadWindow X error when
you make a selection. Ugh.)


Anyway screen works well with what it has. Even if it has
bugs - terminal window titles never seem to be quite right
with it for example - its so well worth it.

screen is one of my favorite programs.

> Oh? I thought ncurses does.

The best I've seen is environment variables, which are
easy to get out of sync.


> Most *good* ncurses programs will repaint the screen on a 
> keystroke,
> like ^L. But yeah, that's a workaround, not a solution.

Yea. And then you lose your custom color anyway, as the
app repaints in its own way.

> Heh, never seen that before. I usually just turn off all fancy 
> settings
> after installing a new system, and just stick with a bare-bones 
> prompt.

I like slackware's default of \u@\h:\w\$

Simple, informative, reliable.


But, one of the sysadmins I worked with fell in love with
colors. I still have access to one of his systems, let
me pull this up... this system is slow! come on...

Here we go:
# echo $PS1
\033[0m\033[36mname\033[34mredacted\033[0m#

Two different colors forming the system's name! And no
useful info. This isn't a prompt. It's a logo.


But, he loved it. And it is kinda cool, just blargh,
especially when the escape sequences get broken up
for whatever reason and the whole thing goes to hell.

(Which is easy to happen - type a long line. bash offers
a special sequence to let it know what you're escaping, but
he didn't use it on this system so bash thinks the prompt
is longer than it is, which breaks the line wrapping.)


> Only seven years? ;-) I've been at it for several years longer.

I'm relatively new but just as grizzled :-)


> Oh? This must be new.

I think Windows NT or maybe 2000 introduced it.

I actually liked working with DOS though. Good old
segment b800 where can just write your bytes and see
them on screen.

Fond memories here of video mode 13h too. That was
easy programming, and good speed too, even on those
old computers.

When I finally switched to coding for these
newfangled multitasking OSes, it took a long time
to get used to not having my precious memory map.


> I've always argued that control
> and data needs a clean separation.

I agree entirely.

> I almost never download binaries, only source.

Me too, which is kinda sad when distributing software.

I like sharing my apps with Windows users because
I can say "grab this exe and have fun".

With Linux users, there's always some list of third
party stuff they need too. dmd, qt, whatever, but
always something.


> My favorite effect is this:
>
> 	mv filename.{oldext,newext}
>
> which only makes sense if the shell expands it.

Nice one!


> much more productive at the commandline than at a GUI.

command lines rock.


Actually, I complain, but my system is a hacked up
blackbox with rxvt and xterm on hotkeys, so I can
summon and dismiss them with ease. (I put them on
the menu key next to the right ctrl key. One press,
rxvt comes. I can order it around, then ctrl+d to
get rid of it. Easy come, easy go.)

It works so well that I barely need anything else.


What pains me most about using windows though? It isn't
the command line.... it is that you can't turn off click
to raise.

You can turn on sloppy focus and it is decently usable.
But, I've never found a way to make it so you can click
a window without it going to the top.

In fact, some Windows windows go to the top whenever they
focus.... which kinda neuters sloppy focus too.

Gah! I love that model. Stacking windows is just no fun
if they always insist on going to the top.


> I didn't have the luxury: it was a remote server (hosted at a 
> very remote location).

That sucks.


More information about the Digitalmars-d mailing list