~aleteoryx/ntalk

cdd0f7e8649b36a8ded5db0c863ca3af65d9645d — Aleteoryx 19 days ago 9a0915a
remove URL hover

finally fix extra long line at end of buffer
1 files changed, 5 insertions(+), 18 deletions(-)

M ntalk.tcl
M ntalk.tcl => ntalk.tcl +5 -18
@@ 281,25 281,12 @@ bind . <Control-N> runself
bind . <Control-s> {.menu.opt invoke "show raw sixel codes"}

.buffer tag configure rawsixel -elide true -foreground DarkSlateGrey
.buffer tag configure motd -foreground DarkOliveGreen -justify center -spacing1 5 -spacing3 5 -underline 1
.buffer tag configure motd -foreground DarkOliveGreen -justify center -underline 1
.buffer tag configure mention -foreground DarkOrchid4
.buffer tag configure url -underline 1 -foreground "dark cyan"
.buffer tag configure url2 -underline 1 -foreground "dark blue"
.buffer tag configure url -underline 1 -foreground "dark blue"

.buffer tag bind url <Enter> {
.buffer tag bind url <Button-1> {
	set range [.buffer tag prevrange url current]
	.buffer tag add url2 {*}$range
	.buffer tag remove url {*}$range
	.buffer configure -cursor hand2
}
.buffer tag bind url2 <Leave> {
	set range [.buffer tag prevrange url2 current]
	.buffer tag add url {*}$range
	.buffer tag remove url2 {*}$range
	.buffer configure -cursor xterm
}
.buffer tag bind url2 <Button-1> {
	set range [.buffer tag prevrange url2 current]
	exec xdg-open [.buffer get {*}$range] &
}



@@ 319,7 306,7 @@ menu .menu.server.rm -tearoff 0
.menu.nt add command -label "about ntalk" -command {
	tk_messageBox -title "about ntalk" \
		-message "ntalk\nby aleteoryx" \
		-detail "last updated 2025-10-21" \
		-detail "last updated 2025-11-19" \
		-icon "info"
}
.menu.nt add separator


@@ 876,7 863,7 @@ proc bufpush {line} {
		set tag motd
	} elseif {[string first "MOTD" $line] == 0} {
		setmotd [string trim [string range $line 4 end]]
		set line "<<< $motd >>>"
		set line "\n<<< $motd >>>\n"
		set tag motd
	} elseif {[regexp "\[^\\w\]${user}\\M" $line]} {
		set tag mention