Hyper: [v2] Can't change cursor

Created on 21 Sep 2017  路  8Comments  路  Source: vercel/hyper

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: Ubuntu Mate 16.04.3
  • Hyper.app version: 2.0.2
  • Link of a Gist with the contents of your .hyper.js: Link
  • Relevant information from devtools: Two plugins get a warning about cursor-node is a deprecated CSS class. But as this is reproducable without plugins, I guess it's irrelevant
  • The issue is reproducible in vanilla Hyper.app: Yes

Issue

Even though it's stated with caps in my hyper.js config that I want BEAM as cursor, I still get the default block.

Also related: cursorBlink: 'true' doesn't work either. Want me to submit a separate issue?

v2 Bug

Most helpful comment

Just had some time to dig in. In the code term.js line 43, xterm module (version 2.9.2) does not accept cursorStyle parameter which is the cursor style being set. This means the cursor style from ~/.hyper.js is not being used. Is this an API mismatch that can be resolved once upgraded to xterm.js v3? If so, suggest deferring this issue.

All 8 comments

Same issue different platform

  • Hyper App 2.0.3 (canary)
  • OS ARCH VERSION: darwin, x64, 16.7.0
  • Electron: 1.7.6 LANG: en_US.UTF-8
  • SHELL: /bin/bash


~/.hyper.js contents


{
"fontSize": 14,
"updateChannel": "canary",
"fontFamily": "Menlo, \"DejaVu Sans Mono\", Consolas, \"Lucida Console\", monospace",
"cursorColor": "rgba(248,28,229,0.8)",
"cursorShape": "BEAM",
"cursorBlink": true,
"foregroundColor": "#fff",
"backgroundColor": "#000",
"borderColor": "#333",
"css": "",
"termCSS": "",
"showHamburgerMenu": "",
"showWindowControls": "",
"padding": "12px 14px",
"colors": {
"black": "#000000",
"red": "#ff0000",
"green": "#33ff00",
"yellow": "#ffff00",
"blue": "#0066ff",
"magenta": "#cc00ff",
"cyan": "#00ffff",
"white": "#d0d0d0",
"lightBlack": "#808080",
"lightRed": "#ff0000",
"lightGreen": "#33ff00",
"lightYellow": "#ffff00",
"lightBlue": "#0066ff",
"lightMagenta": "#cc00ff",
"lightCyan": "#00ffff",
"lightWhite": "#ffffff"
},
"shell": "",
"shellArgs": [
"--login"
],
"env": {},
"bell": "SOUND",
"copyOnSelect": false
}

{
"plugins": [
"hyperlinks"
],
"localPlugins": []
}


@PerStirpes @moso This is definitely a bug in version 2.0.3

If you want to use BEAM I recommend to go back to the stable version.

@MAPESO Yeah, I'm staying on 1.4.7 for the time being.

@albinekb "BEAM" works well mac, windows and linux (check in 3). The only problem is that it has to be in the stable version (1.4.8)

we can rule out that it is an issue related to the operating system 馃槃

Same here with Hyper v2.0.4 on Arch Linux.
But cursorBlink works for me. @moso Try using true instead of 'true'.

If you use the ZSH shell, a workaround is to use the ZSH line editor, then you can have whatever cursor you want. It is pretty easy to setup a blinking i-beam. Below at the bottom of your .zshrc would work.

# zle config
bindkey -v # vi mode
export KEYTIMEOUT=1 # mode change timeout = 0.1sec
function zle-keymap-select zle-line-init
{
    # change cursor shape in xterm
    case $KEYMAP in
        vicmd)      echo -e -n "\x1b[\x32 q";;  # block cursor
        viins|main) echo -e -n "\x1b[\x35 q";;  # blinking line cursor
    esac

    zle reset-prompt
    zle -R
}

zle -N zle-line-init
zle -N zle-keymap-select

Just had some time to dig in. In the code term.js line 43, xterm module (version 2.9.2) does not accept cursorStyle parameter which is the cursor style being set. This means the cursor style from ~/.hyper.js is not being used. Is this an API mismatch that can be resolved once upgraded to xterm.js v3? If so, suggest deferring this issue.

I just encountered this with hyper v2 as wel; i cannot change the cursor type to anything but the default block style cursor.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cilice picture cilice  路  3Comments

yvan-sraka picture yvan-sraka  路  3Comments

ConstantinChirila picture ConstantinChirila  路  3Comments

hxnt picture hxnt  路  3Comments

rauchg picture rauchg  路  3Comments