Set the cursor state.
visibility
0 for invisible, 1 for normal visible, or 2 for very visible.
If the terminal supports the visibility requested, the previous cursor
state is returned; otherwise, an exception is raised. On many
terminals, the "visible" mode is an underline cursor and the "very
visible" mode is a block cursor.