oh-my-fish / theme-agnoster

MIT License
94 stars 63 forks source link

change cursor when switching between vi modes #40

Closed gordolio closed 5 years ago

gordolio commented 5 years ago

In addition to changing the right segment, this changes the cursor when switching between different vi modes.

I'm very new to fish. So I'm open to any suggestions on a better way of accomplishing this.

sn0cr commented 5 years ago

Hm, that looks interesting. However, I think that's highly specific to iTerm, right? Or is that also possible in other terminal emulators?

gordolio commented 5 years ago

I just tested in MacOS Terminal, Gnome Terminal, and mintty on Windows. Each support it. You can test using the following commands... echo -ne "\e[\x31 q" # Blinking Block echo -ne "\e[\x32 q" # Block echo -ne "\e[\x33 q" # Blinking Underscore echo -ne "\e[\x34 q" # Underscore echo -ne "\e[\x35 q" # Blinking bar echo -ne "\e[\x36 q" # Bar

Although, it appears gnome terminal stops blinking when focus is taken away(expected) and then does not begin blinking again when focus comes back (IMO unexpected). Pressing a key brings the blinking back. This appears to be unique to Gnome Terminal.

gordolio commented 5 years ago

This appears to also be documented at: https://vt100.net/docs/vt510-rm/DECSCUSR.html

Though vt100 documentation leaves out the blinking and steady bar.

sn0cr commented 5 years ago

Perfect 👍