Open nick87720z opened 3 years ago
Wow! That's a nice idea! What do you think about this option:
title
, to configure the window title (with the same format as we have for format
);For HTML pages , it configures the window title (<head><title>{{ title }}</title></head>
),
and for the ANSI output, configures the terminal output.
If it is not specified, the standard title format is used for HTML, and no title for the ANSI output.
Agreed?
Ok
I have to note yet - these features (tsl/fsl) are not included in most TERM types, suitable to be set in terminals (like xterm, xterm-256color, mlterm, vte). Instead there are few separate files, ending with "+sl" (I have only {xterm,dec,sun}+sl). I'm not sure, how best match is determined automatically. At least MC has no problem setting title in any gui term, without even providing extra option for what specific term type to use.
xterm+sl works in all gui terminals I have installed (xterm, mlterm, alacritty, all vte-based), though at least one (rxvt-unicode) has it in core term defs (though also ok with xterm+sl).
These terms seem to have no features but statusline support - at least no colors, font styles, and mc showes mess instead of ui (as if piped through cat).
There is what I first found, how to do it with tput: https://serverfault.com/questions/23978/how-can-one-set-a-terminals-title-with-the-tput-command
This oneliner lists terminals with sl support (there are many of them):
find /usr/share/terminfo -type f -printf '%f\n' | sort | { while read t; do TERM=$t tput hs && echo $t; done; }
TODO
title
with one-line format to configure title output for HTML/ANSI responsesDetails
For now page name looks like "Weather report for Cityname". Would be way more useful if it allowed to be set from one of 4 one-line formats, 1..4. With browser/viewer own auto-update this would allow to monitor weather right in taskbar.
Btw, tittle could be set in X terminals with termcap sequences (just like text style), but that will require URL option to pass TERM, as well as move to non-hardcoded termcap codes. Here is my bash test for such feature (w3m would be great viewer if not problems with colors and png at least at wttr):
Edit: My example screenshot with xterm variant.