mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[GH-ISSUE #611] feat: custom cursor styles #932
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#932
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @m4saurabh on GitHub (Feb 1, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/611
I saw something very cool recently and was wondering can we get it inside opentui.
Cursor styles on hover.
The TUI shown in the video is ampcode.
https://github.com/user-attachments/assets/16f27d6e-6813-4aa5-aa87-ac952491ceae
@kommander commented on GitHub (Feb 2, 2026):
Sure, why not.
@viralcodex commented on GitHub (Feb 4, 2026):
Hi, is there any chance I can explore this and maybe contribute on this? Would love to do it.
Thanks
@viralcodex commented on GitHub (Feb 11, 2026):
Hi @kommander @simonklee , I was reading and searching about it, and got to know that many native CLI don't support cursor hover styles natively. Umm, I do have some implementation written but I would like to know if I can do it or how you guys expect it to work?
Currently I am doing a similar impl as the CursorStyle with mouseOut and mouseOver events within recheckHoverState().
@kommander commented on GitHub (Feb 11, 2026):
Hi @viralcodex it cannot be guaranteed to work in all terminal emulators, but that's fine, many features depend on the terminal.
If there is a way to detect support, it would be good to add it to
terminal.zigcapabilities.There are methods to
setCursorStyleon the renderer, I would probably add the option there.It needs to make sure it is properly reset in the shutdown sequence in
terminal.zigif not already done with the current cursor reset.@viralcodex commented on GitHub (Feb 11, 2026):
Hi @kommander, thanks for clarifying. Yeah I started from there it felt better to have a separate MouseHoverStyles using OSC 22 Escape Characters, not only pointer but also blocked/busy state as well.
Sure, will look into it if it is feasible to extend in the current cursor implementation and raise a PR. If anything is needed to be changed, will update accordingly in review