Re: [gentoo-portage-dev] [PATCH] xtermTitle: support st (simple terminal)

2017-12-04 Thread Christoph Böhmwalder
On Mon, Dec 04, 2017 at 06:27:39AM +0100, Christoph Böhmwalder wrote:
> Maybe we should be using the 'stterm' symlinks instead?
> 
> --
> Regards,
> Christoph

Uh, actually that doesn't make any sense, since the $TERM variable is
still set to just 'st-...'.  It was a little too early when I wrote that
I suppose :)

So yeah, I think we might need to just roll with 'st-256color' anyways
and just see how it goes

--
Regards,
Christoph



Re: [gentoo-portage-dev] [PATCH] xtermTitle: support st (simple terminal)

2017-12-03 Thread Christoph Böhmwalder
On Sun, Dec 03, 2017 at 01:00:37PM -0800, Zac Medico wrote:
> Your change will match any TERM value that starts with 'st', which seems
> too loose. How about if we match st-256color instead?
> -- 
> Thanks,
> Zac
> 

Yes, you're right, though there's still one more issue with that.
Although st-256color seems to be the default $TERM value for st (it is
on my system and I don't recall changing it), there are a few other
terminfo entries for st:

$ ls -lah /usr/share/terminfo/s/st*
-rw-r--r-- 1 root root 2,2K Dez  1 14:23 /usr/share/terminfo/s/st
-rw-r--r-- 1 root root 2,4K Dez  1 14:23 /usr/share/terminfo/s/st-16color
-rw-r--r-- 1 root root 2,3K Dez  1 14:23 /usr/share/terminfo/s/st-256color
-rw-r--r-- 1 root root  856 Dez  1 14:23 /usr/share/terminfo/s/st52
-rw-r--r-- 1 root root 2,0K Dez  1 14:23 /usr/share/terminfo/s/st52-color
lrwxrwxrwx 1 root root4 Dez  1 14:23 /usr/share/terminfo/s/st52-m -> st52
-rw-r--r-- 1 root root  562 Dez  1 14:23 /usr/share/terminfo/s/st52-old
lrwxrwxrwx 1 root root2 Dez  1 14:23 /usr/share/terminfo/s/stterm -> st
lrwxrwxrwx 1 root root   10 Dez  1 14:23 /usr/share/terminfo/s/stterm-16color 
-> st-16color
lrwxrwxrwx 1 root root   11 Dez  1 14:23 /usr/share/terminfo/s/stterm-256color 
-> st-256color
-rw-r--r-- 1 root root  916 Dez  1 14:23 /usr/share/terminfo/s/stv52
-rw-r--r-- 1 root root  848 Dez  1 14:23 /usr/share/terminfo/s/stv52pc

Maybe we should be using the 'stterm' symlinks instead?

--
Regards,
Christoph



[gentoo-portage-dev] [PATCH] xtermTitle: support st (simple terminal)

2017-12-03 Thread Christoph Böhmwalder
Currently users of suckless' simple terminal have to rely on ugly hacks
like this in order to make portage display merging progress in the
terminals title bar:

alias emerge="TERM=xterm emerge"

Officially support st by adding it to the list of legal terminals.

Signed-off-by: Christoph Böhmwalder <christ...@boehmwalder.at>
---
 pym/portage/output.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/output.py b/pym/portage/output.py
index 6d8c6324a..05aa7ba5c 100644
--- a/pym/portage/output.py
+++ b/pym/portage/output.py
@@ -234,7 +234,7 @@ def nc_len(mystr):
tmp = re.sub(esc_seq + "^m]+m", "", mystr);
return len(tmp)
 
-_legal_terms_re = 
re.compile(r'^(xterm|xterm-color|Eterm|aterm|rxvt|screen|kterm|rxvt-unicode|gnome|interix|tmux)')
+_legal_terms_re = 
re.compile(r'^(xterm|xterm-color|Eterm|aterm|rxvt|screen|kterm|rxvt-unicode|gnome|interix|tmux|st)')
 _disable_xtermTitle = None
 _max_xtermTitle_len = 253
 
-- 
2.15.1