Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal emulation: blinking cursor? #153

Closed
Mihara opened this issue Sep 7, 2016 · 9 comments
Closed

Terminal emulation: blinking cursor? #153

Mihara opened this issue Sep 7, 2016 · 9 comments

Comments

@Mihara
Copy link

Mihara commented Sep 7, 2016

I'm not sure it's a bug, because the last time I dug into the intricacies of Unix terminal definitions was really long ago, and I ran away screaming. But it kind of presents a practical problem:

The cursor does not natively blink, and Emacs can't make it blink.

Also, the result of running tput cnorm and tput cvvis commands is identical, a rectangle cursor, when the first one is supposed to produce an underscore cursor, so something is very probably wrong.

This is kind of a problem in Emacs, because when background is used for highlighting (i.e. on TODO items in org-mode) the block cursor can become completely invisible while over the highlighted text, and blinking cursor becomes a necessity.

@Quasic
Copy link
Contributor

Quasic commented Jul 23, 2018

I don't think the cursor ANSI escape sequences for blinking are supported, either, but block, | and _ are:
printf '\e[2 q'
printf '\e[4 q'
printf '\e[6 q'

@rendiix
Copy link

rendiix commented Jun 30, 2019

Any progress for this issue?

@ghost ghost deleted a comment from deisgoku Aug 17, 2019
@Freed-Wu
Copy link

So far, blink style is not supported by termux.

pip install rich
python -m rich|grep blink

the word blink will be still not blinking.

@trygveaa
Copy link
Contributor

@Freed-Wu: This issue is about having a blinking cursor. That is not the same thing as blinking text.

@Freed-Wu
Copy link

sorry for my error :(
I'll open a new issue to ask whether it can support blinking text.

@fanlei
Copy link

fanlei commented May 1, 2021

Hope the terminal emulation can support the blinking cursor. Without it, there are two practical problems I met when using termux:

  1. When switching between two windows using a keyboard shortcut like Alt + Tab, the blinking cursor can indicate which window is active immediately. Without it, I many times have to type something to make sure I am on the correct window. Annoying.
  2. Block shape cursor in Vim makes the text under the cursor invisible. Just like @Mihara mentioned in Emacs.

@Folayemi-Idowu-Praise
Copy link

Folayemi-Idowu-Praise commented May 15, 2021 via email

@agnostic-apollo
Copy link
Member

It shows this but it doesn't show the password stuff

It doesn't should what password "stuff"?

@Bayu12345677

This comment has been minimized.

@ghost ghost locked and limited conversation to collaborators Oct 17, 2021
AdamMickiewich pushed a commit to VolyaTeam/dzida-app that referenced this issue Aug 8, 2022
This `terminal-cursor-blink-rate` key can be used to enable terminal cursor blinking. The user can set an int value between `100` and `2000` which will be used as blink rate in millisecond. The default value is `0`, which disables cursor blinking. So adding an entry like `terminal-cursor-blink-rate=600` to `~/termux.properties` file will make the cursor attempt to blink every 600ms. Running `termux-reload-settings` command will also update the cursor blinking rate instantaneously if changed.

A background thread is used to control the blinking by toggling the cursor visibility and then invalidating the view every x milliseconds set. This will have a performance impact, so use wisely and at your own risk.

If the cursor itself is disabled, which is controlled by whether DECSET_BIT_CURSOR_ENABLED (DECSET 25, DECTCEM), then blinking will be automatically disabled. You can enable the cursor with `tput cnorm` or `echo -e '\e[?25h'` and disable it with `tput civis` or `echo -e '\e[?25l'`.

Note that you can also change the cursor color by adding `cursor` property to `~/colors.properties` file, like `cursor=#FFFFFF` for a white cursor.

The `TermuxPropertyConstants` class has been updated to `v0.9.0`. Check its Changelog sections for info on changes.

Closes termux#153
shrihankp pushed a commit to reisxd/termux-app that referenced this issue Oct 20, 2022
This `terminal-cursor-blink-rate` key can be used to enable terminal cursor blinking. The user can set an int value between `100` and `2000` which will be used as blink rate in millisecond. The default value is `0`, which disables cursor blinking. So adding an entry like `terminal-cursor-blink-rate=600` to `~/termux.properties` file will make the cursor attempt to blink every 600ms. Running `termux-reload-settings` command will also update the cursor blinking rate instantaneously if changed.

A background thread is used to control the blinking by toggling the cursor visibility and then invalidating the view every x milliseconds set. This will have a performance impact, so use wisely and at your own risk.

If the cursor itself is disabled, which is controlled by whether DECSET_BIT_CURSOR_ENABLED (DECSET 25, DECTCEM), then blinking will be automatically disabled. You can enable the cursor with `tput cnorm` or `echo -e '\e[?25h'` and disable it with `tput civis` or `echo -e '\e[?25l'`.

Note that you can also change the cursor color by adding `cursor` property to `~/colors.properties` file, like `cursor=#FFFFFF` for a white cursor.

The `TermuxPropertyConstants` class has been updated to `v0.9.0`. Check its Changelog sections for info on changes.

Closes termux#153
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants