:: Re: [DNG] mlterm to display path in…
Top Pagina
Delete this message
Reply to this message
Auteur: Haines Brown
Datum:  
Aan: dng
Onderwerp: Re: [DNG] mlterm to display path in window frame
On Sun, Nov 10, 2019 at 03:55:44PM +0100, Arnt Karlsen wrote:
> On Sat, 9 Nov 2019 20:58:03 -0500, Haines wrote in message
> <20191110015803.GB27009@???>:
>
> > I'm running mltrm as my main terminal under Beowulf. I vaguely recall
> > that with xterm the path to the location of the current session of
> > the terminal was printed along the top of the window frame. At
> > present it simply displays "mlterm".


In the manual I misunderstood --title=name to specify a title rather
than the path. I find the variable $PWD does return the path, and I
can start mlterm with the command $ mlterm -T $PWD to get the path
displayed in the window frame.

However, if I put into ~/.mlterm/main the line: title=$PWD, what then
appears in the wndow frame is: "$PWD". Somehow I'm missing the syntax
for expanding that variable.

> ...which means it should accept xterm tricks from e.g.
> https://invisible-island.net/xterm/xterm.faq.html#how2_title
> and: https://invisible-island.net/xterm/xterm.html


I found no help here.


> ..you may want to have your shell set the window (and tabs) title.
> Chk your output of 'env ', you may have unset what you want set.


My env has PWD=/home/haines, and so it seems $PWD should work.


> ..your ~/.mlterm/main config file may have a ...
>     title=name (-T, --title)
>          Title name.

>
> ...entry, which should accept shell strings like $PS1 and $PWD
> and ~/.mlterm/msg.log should tell you what works and not.


The only content in ~/.mlterm are where I define geometry=80x24.
bg_color=linen,fontsize=13, Nothing about accepting shell strings. The
msg.log only reports not caring for my choices of font size when I
find installed mlgerm.

> ..try launch it from e.g. an xterm cli with e.g.:
> mlterm -T $PS1 &


Yes, Launching it with -T $PWD & does return the current path.

> ..googling possible explanations to your findings, may be found in both
> https://invisible-island.net/ncurses/terminfo.src.html#tic-mlterm and
> https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Title-Modes


Looked at these, but found no help here.

> ...or:      titleModes (class TitleModes)
>                Tells xterm whether to accept or return window- and
>         icon-labels in ISO-8859-1 (the default) or UTF-8.
>         Either can be encoded in hexadecimal.  The default for
>         this resource is “0”.

>
>                Each bit (bit “0” is 1, bit “1” is 2, etc.)  corresponds
>                to one of the parameters set by the title modes control
>                sequence:

>
>                0    Set window/icon labels using hexadecimal

>
>                1    Query window/icon labels using hexadecimal

>
>                2    Set window/icon labels using UTF-8 (overrides
>                     utf8Title resource).

>
>                3    Query window/icon labels using UTF-8

>
> ...from man xterm, if you threw out everything ISO-8859-* and if 
> mlterm still needs such support, 
> http://mlterm.sourceforge.net/mlterm.1.html advices:
>        -8, --88591(=bool)
>               Use ISO8859-1 fonts for US-ASCII part  of  various
>               encodings.

>
> ...and:
>        -n, --noucsfont(=bool)
>               Use non-Unicode fonts even when mlterm encoding is
>               UTF-8.   Useful  when  you  don't  have ISO10646-1
>               fonts and you want to  use  UTF-8  encoding.   The
>               default is false.

>
> ...and:
>        -u, --onlyucsfont(=bool)
>               Use Unicode fonts even when mlterm encoding is not
>               UTF-8.  Useful when you have  ISO10646  fonts  but
>               you  don't  have  other fonts and want to use non-
>               UTF-8 encodings.  Note that conversion to  Unicode
>               is lossy.  i.e. if mlterm encoding is not a subset
>               of Unicode like ISO-2022-JP-2 or  EUC-TW,  charac-
>               ters  which  are  regarded  as a same character in
>               Unicode will be displayed with the same glyph  and
>               cannot be distinguished.

>
>               The default is false.

>
> ...and:
>        --ucsnoconv=value
>               Use  unicode  fonts  partially  regardless  of  -n
>               option.

>
>               e.g.) --ucsnoconv=U+1234-5678,U+0123-4567

>
> ...and:


I'm too dense to see how this related to title.


> CONFIGURATION
>        mlterm  loads  configuration  files  of  "main",  "font",
>        "vfont",   "tfont",   "aafont",   "vaafont",   "taafont",
>        "color", "key", "termcap", and "xim" on start up.  "menu"
>        configuration file is loaded  by  the  configurable  menu
>        displayer (mlterm-menu).  See the section of CONFIGURABLE
>        MENU for detail.
> ..also chk your mlterm's GUI CONFIGURATOR, which may have changed
> things to your displeasure.


the only config file I get is main. I found that Ctl=both mouse
buttons when mlterm open did raise a menu. None seemed of use. One
seems to have $SWP checked, but when I unchecked it I any access to
the configuration menu. Can't get it back.

> ..you may be looking for mlterm's equvivalent of konsole's %w (which
> also sets konsole's tab names) and xterm's -title (alias -T )
> in man xterm:


I don't run any desktop environment, and so konsole not installed.


>        title (class Title)
>                Specifies a string that may be used by the window
>            manager when displaying this application.


> ..try title=$PWD in your ~/.mlterm/main config file and tell us.
> Me, I find $PS1 sexier. ;o)


I did, and if I say title-$PWD, it is "$PWD" that is
displayed as title.

Haines Brown