I am trying to change the cursor color inside Emacs to a different color dynamically.
I am using emacs -nw for an Emacs terminal. The terminal I'm using is Rxvt-Unicode (Urxvt).
Since Emacs cannot (I think) make changes to the terminal, (set-cursor-color "red") will not work. To change the color of the terminal cursor, I can run echo -ne '\033]12;red\007' . This changes the color of the cursor to red.
What I tried to do in Emacs was to run this command inside it. Mx shell-command RET echo -ne '\033]12;red\007' RET
However, Emacs will exit the echo line and print it at the bottom of the window, and will not actually make any changes to the cursor.
I really don't know what else I can do from here, I don't want to use the Emacs GUI. Does anyone know about this? I want to change the color of my cursor depending on my current mode, so it should be dynamic. If anyone has any other suggestions, I'd love to hear them!
terminal emacs elisp
Attic
source share