From b1dc9065fc7f47b751a186a10858dc53b1135fbd Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Sun, 21 Sep 2025 14:46:19 -0400 Subject: [PATCH] colorized sixels --- ntalk.tcl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ntalk.tcl b/ntalk.tcl index a551df12bba05c4aede116f6d2e29a920af87263..27b6bc54797aef2a2627208eb44b50b59ac2c9c5 100755 --- a/ntalk.tcl +++ b/ntalk.tcl @@ -92,6 +92,7 @@ proc splitsixels {str} { foreach c [split $str {}] { switch -regexp -- $c { - { + set row [string trimright $row "? "] lappend ret $row set row {} } @@ -149,6 +150,8 @@ proc sixels2image {sixels} { } set image [image create bitmap -data $xbm] + image create bitmap motd$image -data $xbm -foreground DarkOliveGreen + image create bitmap mention$image -data $xbm -foreground DarkOrchid4 dict set images "sixel:$sixels" $image dict set images "xbm:$xbm" $image dict set images "image:$image" $sixels @@ -247,10 +250,10 @@ menu .menu.sixels.rm -tearoff 0 .menu add cascade -label "ntalk" -menu .menu.nt .menu.nt add command -label "about ntalk" -command { - tk_dialog .about "about ntalk" \ - "ntalk\nby aleteoryx\nlast updated 2025-09-20" \ - "info" \ - 0 okay + tk_messageBox -title "about ntalk" \ + -message "ntalk\nby aleteoryx" \ + -detail "last updated 2025-09-21" \ + -icon "info" } .menu.nt add separator .menu.nt add command -label "restart" -command restart -accelerator "Ctrl-Shift-R" @@ -516,6 +519,7 @@ proc bufpush {line} { if {$image != {}} { lassign $image raw image + set image $tag$image .buffer insert end $raw [concat rawsixel $tag] .buffer image create end -image $image .buffer tag add $tag {end -1 chars}