Skip to content

Instantly share code, notes, and snippets.

@theodric
Created July 17, 2025 21:49
Show Gist options
  • Save theodric/b066271a35161a0b0b6425e8b7c83faa to your computer and use it in GitHub Desktop.
Save theodric/b066271a35161a0b0b6425e8b7c83faa to your computer and use it in GitHub Desktop.
Hot pink cursor everywhere hot pink cursors are supported
# set cursor color to bright pink in terminals that support OSC 12
set_cursor_color() {
# only do this if we're in an interactive tty and not a dumb term
[[ $- == *i* && $TERM != "dumb" ]] || return
# OSC 12 escape
printf '\e]12;#ff00ff\a'
}
# detect if we're inside tmux
if [[ -n $TMUX ]]; then
# pass through tmux by wrapping in DCS passthrough
printf '\ePtmux;\e\e]12;#ff00ff\a\e\\'
else
set_cursor_color
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment