-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
contributor friendlyA well-scoped, approachable issue for someone looking to contribute.A well-scoped, approachable issue for someone looking to contribute.renderer
Milestone
Description
Expose Ghostty's cursor shape enum to shaders:
ghostty/src/renderer/cursor.zig
Lines 8 to 17 in 469001b
| pub const Style = enum { | |
| // Typical cursor input styles | |
| block, | |
| block_hollow, | |
| bar, | |
| underline, | |
| // Special cursor styles | |
| lock, | |
// Macros for a more semantic usage. Though this could just be differed to the documentation too.
#define CURSORSTYLE_BLOCK 0
#define CURSORSTYLE_BLOCK_HOLLOW 1
#define CURSORSTYLE_BAR 2
#define CURSORSTYLE_UNDERLINE 3
uniform int iCursorStyle;Use case: Shaders can render contextually appropriate effects—for example, a full-cell glow for block cursors vs. a vertical beam glow for bar cursors, or a subtle underline ripple for underline cursors. I found that when I was making my shader, I just wanted to know what type of cursor I had so I could easily change the shape of it.
Metadata
Metadata
Assignees
Labels
contributor friendlyA well-scoped, approachable issue for someone looking to contribute.A well-scoped, approachable issue for someone looking to contribute.renderer