axyl-iso icon indicating copy to clipboard operation
axyl-iso copied to clipboard

Can't change cursor shape and behavior

Open xenomorphling opened this issue 3 years ago • 13 comments

Can't change cursor shape and behavior, any terminal, any WM. I set cursor shape to Block and blinking off in GUI and in config (alacritty.yml) - no results.

xenomorphling avatar Aug 10 '22 03:08 xenomorphling

I believe phinger-cursors is the new default for axyl. Are you having the same issues with the xfce4-terminal? I belive it is also the default for axyl instead of alacritty.

lknows avatar Aug 10 '22 03:08 lknows

Sorry, I'm talking about terminal cursor. Terminal doesn't matter, same shape and behavior everywhere.

xenomorphling avatar Aug 10 '22 04:08 xenomorphling

If you're talking terminal cursor, have you tried tweaking your .Xresources file yet?

lknows avatar Aug 10 '22 04:08 lknows

Also, are you sure you're editing the correct alacritty config files? The location of each file is window manager specific. For instance, I use i3, so my alacritty.yml isn't stored in my base .config directory. Instead, the full path is ~/.config/i3/alacritty/alacritty.yml

Many users work around this with a symbolic link in ~/.config/ so their terminal looks the same across window managers.

lknows avatar Aug 10 '22 04:08 lknows

I also use i3 and I edit my ~/.config/i3/alacritty/alacritty.yml. Fonts, colors editing works, but I have cursor config:

cursor: style: shape: Block blinking: Off

And it still I-Beam and blinking.

I have no .Xresources in my home directory, what should I do exactly?

xenomorphling avatar Aug 10 '22 07:08 xenomorphling

The same behavior over ssh. I assume something rewrite cursor config independent of terminal client.

xenomorphling avatar Aug 10 '22 08:08 xenomorphling

Set blinking to Never does function as expected for me, but I easily reproduce the shape persistently defaulting to Beam functionality no matter what attribute I enter. I'm looking into it, but don't see any signs of a solution anytime soon from me lool

lknows avatar Aug 10 '22 08:08 lknows

OK, I installed xterm and set in .Xresources xtermcursorBlink: false nothing happened, cursor still blinks but config fonts, like XTermXftFont: Segoe UI:size=10:antialias=true:style=Regular works

xenomorphling avatar Aug 10 '22 08:08 xenomorphling

I can successfully set unfocused_hollow to true and I do get a nonblinking block cursor, but when I go back to focusing alacritty the Beam cursor returns. Partial solution almost lol

lknows avatar Aug 10 '22 09:08 lknows

I completely remove zsh configs and reinstall zsh and now alacritty cursor works as expected. So I think there is some zsh script which overwrite term configs every time.

xenomorphling avatar Aug 10 '22 09:08 xenomorphling

I completely remove zsh configs and reinstall zsh and now alacritty cursor works as expected. So I think there is some zsh script which overwrite term configs every time.

You might be right. This was found in my ~/.zshrc-personal Screenshot_2022-08-10_15:00:12

Around line 90:

function zle-keymap-select {
  if [[ ${KEYMAP} == vicmd ]] ||
	 [[ $1 = 'block' ]]; then
	echo -ne '\e[1 q'
  elif [[ ${KEYMAP} == main ]] ||
	   [[ ${KEYMAP} == viins ]] ||
	   [[ ${KEYMAP} = '' ]] ||
	   [[ $1 = 'beam' ]]; then
	echo -ne '\e[5 q'
  fi
}
zle -N zle-keymap-select
zle-line-init() {
	zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
	echo -ne "\e[5 q"
}
zle -N zle-line-init
echo -ne '\e[5 q' # Use beam shape cursor on startup.
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.

EDIT: Nvm, changing this block didn't solve anything either. I also tried just removing all of it and still had a beam cursor, so I'm not so sure we can close this issue just yet

EDIT#2: @ajeshp is correct, I proved us both very correct by commenting every line mentioned in this comment and got the desired behavior out of my alacritty cursor.

lknows avatar Aug 10 '22 19:08 lknows

On Axyl, by default, zsh is using vim mode, which effects the cursor. You have to comment out a bunch of stuff in ~/.zshrc-personal to disable vim mode.

ajeshp avatar Aug 11 '22 02:08 ajeshp

On Axyl, by default, zsh is using vim mode, which effects the cursor. You have to comment out a bunch of stuff in ~/.zshrc-personal to disable vim mode.

To combine my and @ajeshp's solution, one must comment out lines 90-108 of your base ~/.zshrc-personal file to disable the default vim mode that takes priority in styling the terminal cursor.

I see no other reason to keep this issue thread open.

lknows avatar Aug 11 '22 02:08 lknows