Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Alacritty cursor not blinking
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
gentoo181
n00b
n00b


Joined: 30 Mar 2021
Posts: 18

PostPosted: Sat Apr 03, 2021 8:56 am    Post subject: Alacritty cursor not blinking Reply with quote

Hi guys, I'm having this little problem with alacritty which is not having a blinking cursor despite of turning this option on.

My use flags for alacritty are:
Code:
-X -debug wayland

Here are the cursor configurations:
Code:

cursor:
  # Cursor style
  #
  # Values for 'style':
  #   - ▇ Block
  #   - _ Underline
  #   - | Beam
  style: Block

  blinking: On
  blink_interval: 750


I can't really think nor know what is the issue source since this option was working in previous distros.

So here are some more informations maybe it will help to find out the source of the problem:
WM: sway with these use flags:
Code:
X elogind man  swaybar swayidle swaybg swaylock swaymsg swaynag -fish-completion -seated -systemd -tray -wallpapers -zsh-completion

Thanks for any help.
Back to top
View user's profile Send private message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 120

PostPosted: Sat Apr 03, 2021 10:13 am    Post subject: Reply with quote

TL;DR: Indent your "blinking: On" by two spaces because it is a child of style: not a child of cursor: and whitespace is meaningful here. Leave blink_interval: how it is.

I copied your config (poorly) but then I couldn't control the blink interval at all until I noticed in the default config file, the (commented) example line for that value is aligned under cursor:, not under style:. When I removed my 2-space indent (making it no longer aligned with blinking:) then it correctly used my non-default 75 or 1500. This is reflected in the changelog when they added it:
Code:
- New `cursor.style.blinking` option to set the default blinking state
- New `cursor.blink_interval` option to configure the blinking frequency


Note that it's not "cursor.style.blink_interval" so the way I had it was ignored. Here is that section of my config, and no I don't actually keep the thing maddeningly flickering like this:

Code:
cursor:
  # Cursor style
  style:
    # Cursor shape
    #
    # Values for `shape`:
    #   - ▇ Block
    #   - _ Underline
    #   - | Beam
    shape: Beam

    # Cursor blinking state
    #
    # Values for `blinking`:
    #   - Never: Prevent the cursor from ever blinking
    #   - Off: Disable blinking by default
    #   - On: Enable blinking by default
    #   - Always: Force the cursor to always blink
    blinking: On
  blink_interval:   75 

  # Vi mode cursor style
  #
  # If the vi mode cursor style is `None` or not specified, it will fall ba>

gl hf
Back to top
View user's profile Send private message
gentoo181
n00b
n00b


Joined: 30 Mar 2021
Posts: 18

PostPosted: Sat Apr 03, 2021 10:45 am    Post subject: Reply with quote

dbtx wrote:
TL;DR: Indent your "blinking: On" by two spaces because it is a child of style: not a child of cursor: and whitespace is meaningful here. Leave blink_interval: how it is.

I copied your config (poorly) but then I couldn't control the blink interval at all until I noticed in the default config file, the (commented) example line for that value is aligned under cursor:, not under style:. When I removed my 2-space indent (making it no longer aligned with blinking:) then it correctly used my non-default 75 or 1500. This is reflected in the changelog when they added it:
Code:
- New `cursor.style.blinking` option to set the default blinking state
- New `cursor.blink_interval` option to configure the blinking frequency


Note that it's not "cursor.style.blink_interval" so the way I had it was ignored. Here is that section of my config, and no I don't actually keep the thing maddeningly flickering like this:

Code:
cursor:
  # Cursor style
  style:
    # Cursor shape
    #
    # Values for `shape`:
    #   - ▇ Block
    #   - _ Underline
    #   - | Beam
    shape: Beam

    # Cursor blinking state
    #
    # Values for `blinking`:
    #   - Never: Prevent the cursor from ever blinking
    #   - Off: Disable blinking by default
    #   - On: Enable blinking by default
    #   - Always: Force the cursor to always blink
    blinking: On
  blink_interval:   75 

  # Vi mode cursor style
  #
  # If the vi mode cursor style is `None` or not specified, it will fall ba>

gl hf

Hi thanks for the help, I tried and copied the example you showed here, I made sure that the parent cursor has child which is style and style has to sections in it: shape and blinking then blink_interval which is a child of cursor and that gave me config error:
Code:
invalid value: map, expected map with a single value


(Update)
I even copied the lines: cursor, style, shape, blinking and blink_interval line by line from the alacritty original config file in their github repo then uncommented them and just changed the values and its still gives me an error.

Here is the cursor section:
Code:
cursor:
  #Cursor style
  style:
    # Cursor shape
    #
    # Values for `shape`:
    #   - ▇ Block
    #   - _ Underline
    #   - | Beam
    shape: Block

    # Cursor blinking state
    #
    # Values for `blinking`:
    #   - Never: Prevent the cursor from ever blinking
    #   - Off: Disable blinking by default
    #   - On: Enable blinking by default
    #   - Always: Force the cursor to always blink
    blinking: On
  blink_interval: 750


And here is the /tmp/Alacritty-1856.log:
Code:
[2021-04-03 13:59:58.182125226] [ERROR] Problem with config: invalid value: map, expected map with a single key; using default value
Back to top
View user's profile Send private message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 120

PostPosted: Sat Apr 03, 2021 11:31 am    Post subject: Reply with quote

There seems to be an older bug like this but I don't understand it at all and I really don't know anything else such as when they (apparently) stopped creating a default config file in its absence. I didn't seem to have any so I bzcat'ed and edited /usr/share/doc/alacritty-0.7.2/alacritty.yml.bz2. All I can think is maybe you made a typo in the process, maybe there's some version difference and/or some parser is really picky or just imperfectly integrated. :shrug: They moved to using some different config backend besides that file, too.
Back to top
View user's profile Send private message
gentoo181
n00b
n00b


Joined: 30 Mar 2021
Posts: 18

PostPosted: Sat Apr 03, 2021 12:20 pm    Post subject: Reply with quote

Ok thanks for you time and I appreciate the effort you made to try to help me :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum